@ixo/editor 6.7.0 → 6.8.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/action-manifest.json +7 -7
- package/dist/{chunk-JS7P4DUX.js → chunk-ABM3ZZIX.js} +389 -650
- package/dist/chunk-ABM3ZZIX.js.map +1 -0
- package/dist/{chunk-RIJGQ4W6.js → chunk-VPMDJE6B.js} +2 -2
- package/dist/{chunk-ETSJMVZ7.js → chunk-ZE2EEZH6.js} +512 -246
- package/dist/chunk-ZE2EEZH6.js.map +1 -0
- package/dist/core/index.d.ts +114 -2
- package/dist/core/index.js +30 -2
- package/dist/core/index.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/mantine/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-ETSJMVZ7.js.map +0 -1
- package/dist/chunk-JS7P4DUX.js.map +0 -1
- /package/dist/{chunk-RIJGQ4W6.js.map → chunk-VPMDJE6B.js.map} +0 -0
|
@@ -2,14 +2,12 @@ import {
|
|
|
2
2
|
GMAIL_SEND_SCHEMA,
|
|
3
3
|
GOOGLECALENDAR_CREATE_SCHEMA,
|
|
4
4
|
LATEST_VERSION,
|
|
5
|
-
LINE_ITEM_FIELD_KEYS,
|
|
6
5
|
NODE_CONTEXT_MAP_NAME,
|
|
7
6
|
NODE_CONTEXT_OVERRIDES_MAP_NAME,
|
|
8
7
|
OUTLOOK_SEND_SCHEMA,
|
|
9
8
|
SLACK_SEND_SCHEMA,
|
|
10
9
|
STEP_COMPLETED_EVENT_NAME,
|
|
11
10
|
buildActionRunInputs,
|
|
12
|
-
buildClaimScope,
|
|
13
11
|
buildDomainCardLinkedResource,
|
|
14
12
|
buildFlowNodeFromBlock,
|
|
15
13
|
buildGovernanceGroupLinkedEntities,
|
|
@@ -21,13 +19,11 @@ import {
|
|
|
21
19
|
createRuntimeStateManager,
|
|
22
20
|
createUcanDelegationStore,
|
|
23
21
|
createUcanService,
|
|
24
|
-
emptyLineItemCells,
|
|
25
22
|
executeActionBlock,
|
|
26
23
|
extractDid,
|
|
27
24
|
extractSurveyAnswerSchema,
|
|
28
25
|
extractSurveyAnswersTemplate,
|
|
29
26
|
fieldValues,
|
|
30
|
-
finaliseLineItem,
|
|
31
27
|
findXeroWorkItemsForEditor,
|
|
32
28
|
formatCoin,
|
|
33
29
|
formatCoinAmount,
|
|
@@ -37,7 +33,6 @@ import {
|
|
|
37
33
|
getAllCanMappings,
|
|
38
34
|
getDiffResolver,
|
|
39
35
|
getEventsForBlock,
|
|
40
|
-
getInvoiceTotal,
|
|
41
36
|
getOutputSchemaForBlock,
|
|
42
37
|
getVersionPolicy,
|
|
43
38
|
hasDiffResolver,
|
|
@@ -55,8 +50,6 @@ import {
|
|
|
55
50
|
parseDelegatedToolInputs,
|
|
56
51
|
parseLinkedEntities,
|
|
57
52
|
parseReferences,
|
|
58
|
-
parseXeroInvoiceCreateInputs,
|
|
59
|
-
parseXeroPaymentCreateInputs,
|
|
60
53
|
readPendingInvocations,
|
|
61
54
|
reconcileActionReadBack,
|
|
62
55
|
reconcilePendingInvocations,
|
|
@@ -65,16 +58,12 @@ import {
|
|
|
65
58
|
requiredCapabilityForCommand,
|
|
66
59
|
resolveActionType,
|
|
67
60
|
resolveEntityTypeFromSchema,
|
|
68
|
-
resolvePaymentWorkPayload,
|
|
69
61
|
resolveReferences,
|
|
70
62
|
resolveReferencesDetailed,
|
|
71
63
|
resolveSingleReference,
|
|
72
|
-
resolveXeroBindings,
|
|
73
64
|
sendDirectMessage,
|
|
74
65
|
serializeCalendarEventCreateInputs,
|
|
75
66
|
serializeDelegatedToolInputs,
|
|
76
|
-
serializeXeroInvoiceCreateInputs,
|
|
77
|
-
serializeXeroPaymentCreateInputs,
|
|
78
67
|
setActiveEditor,
|
|
79
68
|
tempDomainCreatorSurvey,
|
|
80
69
|
transformSurveyToCredentialSubject,
|
|
@@ -84,7 +73,7 @@ import {
|
|
|
84
73
|
verifyCompletion,
|
|
85
74
|
warnOnce,
|
|
86
75
|
writeRunRecordAndReconcile
|
|
87
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-ABM3ZZIX.js";
|
|
88
77
|
|
|
89
78
|
// src/mantine/hooks/usePanel.ts
|
|
90
79
|
import { useCallback, useMemo, useEffect, useRef } from "react";
|
|
@@ -23857,7 +23846,7 @@ function buildPreview(editor, invocation) {
|
|
|
23857
23846
|
const fields = event?.pendingDisplayFields || [];
|
|
23858
23847
|
if (fields.length === 0) return summarizePayload(invocation.payload);
|
|
23859
23848
|
const parts = fields.map((path) => {
|
|
23860
|
-
const value =
|
|
23849
|
+
const value = getNestedValue3(invocation.payload, path);
|
|
23861
23850
|
return value != null ? String(value) : "\u2014";
|
|
23862
23851
|
});
|
|
23863
23852
|
return parts.join(" \xB7 ");
|
|
@@ -23867,7 +23856,7 @@ function summarizePayload(payload) {
|
|
|
23867
23856
|
if (keys.length === 0) return "(no payload fields)";
|
|
23868
23857
|
return keys.slice(0, 2).map((k) => `${k}: ${String(payload[k])}`).join(" \xB7 ");
|
|
23869
23858
|
}
|
|
23870
|
-
function
|
|
23859
|
+
function getNestedValue3(obj, path) {
|
|
23871
23860
|
const parts = path.split(".");
|
|
23872
23861
|
let current = obj;
|
|
23873
23862
|
for (const part of parts) {
|
|
@@ -33815,9 +33804,28 @@ import { IconChecks as IconChecks4 } from "@tabler/icons-react";
|
|
|
33815
33804
|
|
|
33816
33805
|
// src/mantine/blocks/action/actionTypes/evaluateClaim/EvaluateClaimConfig.tsx
|
|
33817
33806
|
import React316, { useCallback as useCallback111, useEffect as useEffect113, useMemo as useMemo117, useRef as useRef43, useState as useState166 } from "react";
|
|
33818
|
-
import { Alert as Alert73, Button as Button68, Loader as Loader62, Stack as Stack210, Text as Text198 } from "@mantine/core";
|
|
33807
|
+
import { Alert as Alert73, Button as Button68, Group as Group114, Loader as Loader62, Stack as Stack210, Switch as Switch12, Text as Text198 } from "@mantine/core";
|
|
33819
33808
|
|
|
33820
33809
|
// src/mantine/blocks/action/actionTypes/evaluateClaim/types.ts
|
|
33810
|
+
var EMPTY_XERO_INVOICE_DEFAULTS = {
|
|
33811
|
+
Type: "",
|
|
33812
|
+
Status: "",
|
|
33813
|
+
CurrencyCode: "",
|
|
33814
|
+
tenant_id: "",
|
|
33815
|
+
ContactID: "",
|
|
33816
|
+
ContactName: ""
|
|
33817
|
+
};
|
|
33818
|
+
function parseXeroInvoiceDefaults(raw) {
|
|
33819
|
+
const source = raw && typeof raw === "object" && !Array.isArray(raw) ? raw : {};
|
|
33820
|
+
return {
|
|
33821
|
+
Type: typeof source.Type === "string" ? source.Type : "",
|
|
33822
|
+
Status: typeof source.Status === "string" ? source.Status : "",
|
|
33823
|
+
CurrencyCode: typeof source.CurrencyCode === "string" ? source.CurrencyCode : "",
|
|
33824
|
+
tenant_id: typeof source.tenant_id === "string" ? source.tenant_id : "",
|
|
33825
|
+
ContactID: typeof source.ContactID === "string" ? source.ContactID : "",
|
|
33826
|
+
ContactName: typeof source.ContactName === "string" ? source.ContactName : ""
|
|
33827
|
+
};
|
|
33828
|
+
}
|
|
33821
33829
|
function parseEvaluateClaimActionInputs(json) {
|
|
33822
33830
|
try {
|
|
33823
33831
|
const parsed = typeof json === "string" ? JSON.parse(json) : json;
|
|
@@ -33825,16 +33833,16 @@ function parseEvaluateClaimActionInputs(json) {
|
|
|
33825
33833
|
deedDid: parsed?.deedDid || "",
|
|
33826
33834
|
collectionId: parsed?.collectionId || "",
|
|
33827
33835
|
surveyAnswersSchema: Array.isArray(parsed?.surveyAnswersSchema) ? parsed.surveyAnswersSchema : [],
|
|
33828
|
-
|
|
33829
|
-
|
|
33836
|
+
xeroOracleInvoiceOnApprove: parsed?.xeroOracleInvoiceOnApprove === true || parsed?.xeroOracleInvoiceOnApprove === "true",
|
|
33837
|
+
xeroInvoiceDefaults: parseXeroInvoiceDefaults(parsed?.xeroInvoiceDefaults)
|
|
33830
33838
|
};
|
|
33831
33839
|
} catch {
|
|
33832
33840
|
return {
|
|
33833
33841
|
deedDid: "",
|
|
33834
33842
|
collectionId: "",
|
|
33835
33843
|
surveyAnswersSchema: [],
|
|
33836
|
-
|
|
33837
|
-
|
|
33844
|
+
xeroOracleInvoiceOnApprove: false,
|
|
33845
|
+
xeroInvoiceDefaults: { ...EMPTY_XERO_INVOICE_DEFAULTS }
|
|
33838
33846
|
};
|
|
33839
33847
|
}
|
|
33840
33848
|
}
|
|
@@ -33948,8 +33956,12 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
33948
33956
|
})),
|
|
33949
33957
|
[collections]
|
|
33950
33958
|
);
|
|
33951
|
-
const
|
|
33952
|
-
|
|
33959
|
+
const updateXeroDefaults = useCallback111(
|
|
33960
|
+
(patch) => {
|
|
33961
|
+
update({ xeroInvoiceDefaults: { ...localRef.current.xeroInvoiceDefaults, ...patch } });
|
|
33962
|
+
},
|
|
33963
|
+
[update]
|
|
33964
|
+
);
|
|
33953
33965
|
return /* @__PURE__ */ React316.createElement(Stack210, { gap: "md" }, /* @__PURE__ */ React316.createElement(
|
|
33954
33966
|
DataInput,
|
|
33955
33967
|
{
|
|
@@ -33994,56 +34006,94 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
33994
34006
|
), local.collectionId && /* @__PURE__ */ React316.createElement(Stack210, { gap: 4 }, schemaLoading && /* @__PURE__ */ React316.createElement(Text198, { size: "xs", c: "dimmed" }, t("actionTypes.shared.loadingSurveySchema", { defaultValue: "Loading survey schema..." })), !schemaLoading && local.surveyAnswersSchema.length > 0 && /* @__PURE__ */ React316.createElement(Text198, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.config.outputsPrefix", { defaultValue: "Outputs" }), " ", /* @__PURE__ */ React316.createElement("code", null, "surveyAnswers"), " ", t("actionTypes.evaluateClaim.config.outputsWith", { defaultValue: "with" }), " ", local.surveyAnswersSchema.length, " ", t("actionTypes.evaluateClaim.config.typedField", {
|
|
33995
34007
|
count: local.surveyAnswersSchema.length,
|
|
33996
34008
|
defaultValue: local.surveyAnswersSchema.length === 1 ? "typed field" : "typed fields"
|
|
33997
|
-
}), ". ", t("actionTypes.evaluateClaim.config.listenerBlocksCanReference", { defaultValue: "Listener blocks can reference" }), " ", /* @__PURE__ */ React316.createElement("code", null, "$", "{", "thisBlock.output.surveyAnswers.<field>", "}"), "."), schemaError && /* @__PURE__ */ React316.createElement(Alert73, { color: "yellow", styles: actionAlertStyles }, schemaError)), local.collectionId && /* @__PURE__ */ React316.createElement(Stack210, { gap: "xs" }, /* @__PURE__ */ React316.createElement(Text198, { size: "sm", fw: 600, mt: "md" }, t("actionTypes.evaluateClaim.config.xeroSectionTitle", { defaultValue: "{{xero}} bookkeeping (optional)", xero: "Xero" })), /* @__PURE__ */ React316.createElement(
|
|
33998
|
-
|
|
33999
|
-
|
|
34000
|
-
|
|
34009
|
+
}), ". ", t("actionTypes.evaluateClaim.config.listenerBlocksCanReference", { defaultValue: "Listener blocks can reference" }), " ", /* @__PURE__ */ React316.createElement("code", null, "$", "{", "thisBlock.output.surveyAnswers.<field>", "}"), "."), schemaError && /* @__PURE__ */ React316.createElement(Alert73, { color: "yellow", styles: actionAlertStyles }, schemaError)), local.collectionId && /* @__PURE__ */ React316.createElement(Stack210, { gap: "xs" }, /* @__PURE__ */ React316.createElement(Text198, { size: "sm", fw: 600, mt: "md" }, t("actionTypes.evaluateClaim.config.xeroSectionTitle", { defaultValue: "{{xero}} bookkeeping (optional)", xero: "Xero" })), /* @__PURE__ */ React316.createElement(
|
|
34010
|
+
Switch12,
|
|
34011
|
+
{
|
|
34012
|
+
label: t("actionTypes.evaluateClaim.config.xeroOracleInvoiceOnApprove", { defaultValue: "{{xero}} oracle invoice on approval", xero: "Xero" }),
|
|
34013
|
+
description: t("actionTypes.evaluateClaim.config.xeroOracleInvoiceOnApproveDescription", {
|
|
34014
|
+
defaultValue: "Create a {{xero}} draft invoice via the contracted {{xero}}-oracle when a claim is approved.",
|
|
34015
|
+
xero: "Xero"
|
|
34016
|
+
}),
|
|
34017
|
+
checked: local.xeroOracleInvoiceOnApprove,
|
|
34018
|
+
onChange: (event) => update({ xeroOracleInvoiceOnApprove: event.currentTarget.checked })
|
|
34019
|
+
}
|
|
34020
|
+
), local.xeroOracleInvoiceOnApprove && /* @__PURE__ */ React316.createElement(Stack210, { gap: "xs", mt: 4 }, /* @__PURE__ */ React316.createElement(Text198, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.config.xeroInvoiceDefaultsDescription", {
|
|
34021
|
+
defaultValue: "Optional invoice defaults pinned into the oracle payload. Anything left empty is extracted from the claim material; Status defaults to Draft."
|
|
34022
|
+
})), /* @__PURE__ */ React316.createElement(Group114, { grow: true }, /* @__PURE__ */ React316.createElement(
|
|
34001
34023
|
BaseSelect,
|
|
34002
34024
|
{
|
|
34003
|
-
label: t("actionTypes.evaluateClaim.config.
|
|
34004
|
-
|
|
34005
|
-
|
|
34006
|
-
|
|
34007
|
-
|
|
34008
|
-
|
|
34009
|
-
|
|
34010
|
-
disabled: xeroInvoiceOptions.length === 0
|
|
34025
|
+
label: t("actionTypes.evaluateClaim.config.xeroInvoiceType", { defaultValue: "Type" }),
|
|
34026
|
+
data: [
|
|
34027
|
+
{ value: "ACCREC", label: "Sale (ACCREC)" },
|
|
34028
|
+
{ value: "ACCPAY", label: "Bill (ACCPAY)" }
|
|
34029
|
+
],
|
|
34030
|
+
value: local.xeroInvoiceDefaults.Type || "ACCREC",
|
|
34031
|
+
onChange: (value) => updateXeroDefaults({ Type: value || "ACCREC" })
|
|
34011
34032
|
}
|
|
34012
34033
|
), /* @__PURE__ */ React316.createElement(
|
|
34013
34034
|
BaseSelect,
|
|
34014
34035
|
{
|
|
34015
|
-
label: t("actionTypes.evaluateClaim.config.
|
|
34016
|
-
|
|
34017
|
-
|
|
34018
|
-
|
|
34019
|
-
|
|
34020
|
-
|
|
34021
|
-
|
|
34022
|
-
disabled: xeroPaymentOptions.length === 0
|
|
34036
|
+
label: t("actionTypes.evaluateClaim.config.xeroInvoiceStatus", { defaultValue: "Status" }),
|
|
34037
|
+
data: [
|
|
34038
|
+
{ value: "DRAFT", label: "Draft" },
|
|
34039
|
+
{ value: "SUBMITTED", label: "Submitted" }
|
|
34040
|
+
],
|
|
34041
|
+
value: local.xeroInvoiceDefaults.Status || "DRAFT",
|
|
34042
|
+
onChange: (value) => updateXeroDefaults({ Status: value || "DRAFT" })
|
|
34023
34043
|
}
|
|
34024
|
-
))
|
|
34044
|
+
)), /* @__PURE__ */ React316.createElement(Group114, { grow: true }, /* @__PURE__ */ React316.createElement(
|
|
34045
|
+
DataInput,
|
|
34046
|
+
{
|
|
34047
|
+
label: t("actionTypes.evaluateClaim.config.xeroCurrencyCode", { defaultValue: "Currency (optional)" }),
|
|
34048
|
+
placeholder: "USD",
|
|
34049
|
+
value: local.xeroInvoiceDefaults.CurrencyCode,
|
|
34050
|
+
onChange: (value) => updateXeroDefaults({ CurrencyCode: value }),
|
|
34051
|
+
editorDocument: editor?.document || [],
|
|
34052
|
+
currentBlockId: blockId
|
|
34053
|
+
}
|
|
34054
|
+
), /* @__PURE__ */ React316.createElement(
|
|
34055
|
+
DataInput,
|
|
34056
|
+
{
|
|
34057
|
+
label: t("actionTypes.evaluateClaim.config.xeroTenantId", { defaultValue: "{{xero}} org (optional)", xero: "Xero" }),
|
|
34058
|
+
value: local.xeroInvoiceDefaults.tenant_id,
|
|
34059
|
+
onChange: (value) => updateXeroDefaults({ tenant_id: value }),
|
|
34060
|
+
editorDocument: editor?.document || [],
|
|
34061
|
+
currentBlockId: blockId
|
|
34062
|
+
}
|
|
34063
|
+
)), /* @__PURE__ */ React316.createElement(Group114, { grow: true }, /* @__PURE__ */ React316.createElement(
|
|
34064
|
+
DataInput,
|
|
34065
|
+
{
|
|
34066
|
+
label: t("actionTypes.evaluateClaim.config.xeroContactId", { defaultValue: "Contact ID (optional)" }),
|
|
34067
|
+
description: t("actionTypes.evaluateClaim.config.xeroContactIdDescription", {
|
|
34068
|
+
defaultValue: "{{xero}} ContactID (UUID). Preferred over Contact name.",
|
|
34069
|
+
xero: "Xero"
|
|
34070
|
+
}),
|
|
34071
|
+
value: local.xeroInvoiceDefaults.ContactID,
|
|
34072
|
+
onChange: (value) => updateXeroDefaults({ ContactID: value }),
|
|
34073
|
+
editorDocument: editor?.document || [],
|
|
34074
|
+
currentBlockId: blockId
|
|
34075
|
+
}
|
|
34076
|
+
), /* @__PURE__ */ React316.createElement(
|
|
34077
|
+
DataInput,
|
|
34078
|
+
{
|
|
34079
|
+
label: t("actionTypes.evaluateClaim.config.xeroContactName", { defaultValue: "Contact name (optional)" }),
|
|
34080
|
+
value: local.xeroInvoiceDefaults.ContactName,
|
|
34081
|
+
onChange: (value) => updateXeroDefaults({ ContactName: value }),
|
|
34082
|
+
editorDocument: editor?.document || [],
|
|
34083
|
+
currentBlockId: blockId
|
|
34084
|
+
}
|
|
34085
|
+
)))));
|
|
34025
34086
|
};
|
|
34026
|
-
function buildBlockOptions(editorDocument, actionType, excludeBlockId) {
|
|
34027
|
-
if (!Array.isArray(editorDocument)) return [];
|
|
34028
|
-
return editorDocument.filter((b) => b && b.type === "action" && b.props?.actionType === actionType && b.id !== excludeBlockId).map((b) => {
|
|
34029
|
-
const title = String(b.props?.title || "").trim();
|
|
34030
|
-
const idTail = String(b.id || "").slice(-8);
|
|
34031
|
-
return {
|
|
34032
|
-
value: b.id,
|
|
34033
|
-
label: title ? `${title} \xB7 ${idTail}` : `Untitled \xB7 ${idTail}`
|
|
34034
|
-
};
|
|
34035
|
-
});
|
|
34036
|
-
}
|
|
34037
34087
|
|
|
34038
34088
|
// src/mantine/blocks/action/actionTypes/evaluateClaim/EvaluateClaimFlowDetail.tsx
|
|
34039
34089
|
import React320, { useCallback as useCallback113, useEffect as useEffect115, useMemo as useMemo119, useRef as useRef45, useState as useState169 } from "react";
|
|
34040
|
-
import { ActionIcon as ActionIcon47, Alert as Alert74, Box as Box62, Button as Button69, Checkbox as Checkbox14, Divider as Divider23, Group as
|
|
34090
|
+
import { ActionIcon as ActionIcon47, Alert as Alert74, Box as Box62, Button as Button69, Checkbox as Checkbox14, Divider as Divider23, Group as Group118, Loader as Loader64, ScrollArea as ScrollArea8, Stack as Stack214, Text as Text202, UnstyledButton as UnstyledButton5 } from "@mantine/core";
|
|
34041
34091
|
import { IconArrowLeft as IconArrowLeft11, IconCheck as IconCheck26, IconFilter as IconFilter2 } from "@tabler/icons-react";
|
|
34042
34092
|
import { SurveyModel as SurveyModel11 } from "@ixo/surveys";
|
|
34043
34093
|
|
|
34044
34094
|
// src/mantine/blocks/action/actionTypes/evaluateClaim/FlowManagerAdvisorySections.tsx
|
|
34045
34095
|
import React317, { useState as useState167 } from "react";
|
|
34046
|
-
import { ActionIcon as ActionIcon46, Badge as Badge53, Group as
|
|
34096
|
+
import { ActionIcon as ActionIcon46, Badge as Badge53, Group as Group115, Stack as Stack211, Text as Text199, Tooltip as Tooltip29 } from "@mantine/core";
|
|
34047
34097
|
import { IconCheck as IconCheck25, IconLink as IconLink5, IconPencil as IconPencil2, IconSparkles as IconSparkles7, IconUser as IconUser14, IconX as IconX18 } from "@tabler/icons-react";
|
|
34048
34098
|
|
|
34049
34099
|
// src/mantine/blocks/action/actionTypes/evaluateClaim/evaluationReportModel.ts
|
|
@@ -34165,7 +34215,7 @@ var FlowManagerContextSection = ({ record, onOverride, disabled }) => {
|
|
|
34165
34215
|
setEditingTheme(false);
|
|
34166
34216
|
setThemeDraft("");
|
|
34167
34217
|
};
|
|
34168
|
-
return /* @__PURE__ */ React317.createElement(CollapsibleSection, { title: t("actionTypes.evaluateClaim.flow.flowManager.understanding", { defaultValue: "Flow Manager understanding" }) }, /* @__PURE__ */ React317.createElement(Stack211, { gap: "xs" }, (theme || editingTheme) && /* @__PURE__ */ React317.createElement(
|
|
34218
|
+
return /* @__PURE__ */ React317.createElement(CollapsibleSection, { title: t("actionTypes.evaluateClaim.flow.flowManager.understanding", { defaultValue: "Flow Manager understanding" }) }, /* @__PURE__ */ React317.createElement(Stack211, { gap: "xs" }, (theme || editingTheme) && /* @__PURE__ */ React317.createElement(Group115, { gap: "xs", align: "center", wrap: "nowrap" }, /* @__PURE__ */ React317.createElement(Text199, { size: "xs", c: "dimmed", style: { flexShrink: 0 } }, t("actionTypes.evaluateClaim.flow.flowManager.theme", { defaultValue: "Theme" })), editingTheme ? /* @__PURE__ */ React317.createElement(React317.Fragment, null, /* @__PURE__ */ React317.createElement("span", { ref: (node) => node?.querySelector("input")?.focus(), style: { flex: 1, display: "flex", minWidth: 0 } }, /* @__PURE__ */ React317.createElement(
|
|
34169
34219
|
BaseTextInput,
|
|
34170
34220
|
{
|
|
34171
34221
|
size: "xs",
|
|
@@ -34208,7 +34258,7 @@ var FlowManagerContextSection = ({ record, onOverride, disabled }) => {
|
|
|
34208
34258
|
"aria-label": t("actionTypes.evaluateClaim.flow.flowManager.editTheme", { defaultValue: "Edit theme" })
|
|
34209
34259
|
},
|
|
34210
34260
|
icon(IconPencil2, 14)
|
|
34211
|
-
))), topics.length > 0 && /* @__PURE__ */ React317.createElement(
|
|
34261
|
+
))), topics.length > 0 && /* @__PURE__ */ React317.createElement(Group115, { gap: "xs", align: "center" }, /* @__PURE__ */ React317.createElement(Text199, { size: "xs", c: "dimmed", style: { flexShrink: 0 } }, t("actionTypes.evaluateClaim.flow.flowManager.topics", { defaultValue: "Topics" })), /* @__PURE__ */ React317.createElement(Group115, { gap: 4 }, topics.map((topic) => /* @__PURE__ */ React317.createElement(Badge53, { key: topic, variant: "light", color: "gray", size: "sm", style: { textTransform: "none" } }, topic))), /* @__PURE__ */ React317.createElement(ProvenanceHint, { provenance: provenance.topics })), summary && /* @__PURE__ */ React317.createElement(Group115, { gap: "xs", align: "flex-start", wrap: "nowrap" }, /* @__PURE__ */ React317.createElement(Text199, { size: "xs", c: "dimmed", style: { flexShrink: 0 } }, t("actionTypes.evaluateClaim.flow.flowManager.summary", { defaultValue: "Summary" })), /* @__PURE__ */ React317.createElement(Text199, { size: "sm", style: { flex: 1, minWidth: 0 } }, summary), /* @__PURE__ */ React317.createElement(ProvenanceHint, { provenance: provenance.summary }))));
|
|
34212
34262
|
};
|
|
34213
34263
|
function truncateClaimId(value) {
|
|
34214
34264
|
if (value.length <= 17) return value;
|
|
@@ -34223,14 +34273,14 @@ var EvaluationReportSection = ({ runtime, selectedClaimId }) => {
|
|
|
34223
34273
|
id: truncateClaimId(model.claimId),
|
|
34224
34274
|
defaultValue: `Claim ${truncateClaimId(model.claimId)}`
|
|
34225
34275
|
})) : void 0;
|
|
34226
|
-
return /* @__PURE__ */ React317.createElement(CollapsibleSection, { title: t("actionTypes.evaluateClaim.flow.flowManager.evaluationReport", { defaultValue: "Evaluation report" }), badge: headerClaimBadge }, /* @__PURE__ */ React317.createElement(Stack211, { gap: "xs" }, model.recommendation && /* @__PURE__ */ React317.createElement(
|
|
34276
|
+
return /* @__PURE__ */ React317.createElement(CollapsibleSection, { title: t("actionTypes.evaluateClaim.flow.flowManager.evaluationReport", { defaultValue: "Evaluation report" }), badge: headerClaimBadge }, /* @__PURE__ */ React317.createElement(Stack211, { gap: "xs" }, model.recommendation && /* @__PURE__ */ React317.createElement(Group115, { gap: "xs", align: "center" }, /* @__PURE__ */ React317.createElement(Text199, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.flowManager.recommendation", { defaultValue: "Recommendation" })), /* @__PURE__ */ React317.createElement(Badge53, { variant: "light", color: recommendationColor(model.recommendation), size: "sm" }, model.recommendation)), model.completeness && /* @__PURE__ */ React317.createElement(Stack211, { gap: 2 }, (model.completeness.answered !== null || model.completeness.total !== null) && /* @__PURE__ */ React317.createElement(Text199, { size: "sm" }, t("actionTypes.evaluateClaim.flow.flowManager.completeness", {
|
|
34227
34277
|
answered: model.completeness.answered ?? "?",
|
|
34228
34278
|
total: model.completeness.total ?? "?",
|
|
34229
34279
|
defaultValue: `Completeness: ${model.completeness.answered ?? "?"}/${model.completeness.total ?? "?"} answered`
|
|
34230
34280
|
})), model.completeness.missingRequired.length > 0 && /* @__PURE__ */ React317.createElement(Text199, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.flowManager.missingRequired", {
|
|
34231
34281
|
fields: model.completeness.missingRequired.join(", "),
|
|
34232
34282
|
defaultValue: `Missing required: ${model.completeness.missingRequired.join(", ")}`
|
|
34233
|
-
}))), model.findings.length > 0 && /* @__PURE__ */ React317.createElement(Stack211, { gap: 4 }, /* @__PURE__ */ React317.createElement(Text199, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.flowManager.findings", { defaultValue: "Findings" })), model.findings.map((finding, index) => /* @__PURE__ */ React317.createElement(
|
|
34283
|
+
}))), model.findings.length > 0 && /* @__PURE__ */ React317.createElement(Stack211, { gap: 4 }, /* @__PURE__ */ React317.createElement(Text199, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.flowManager.findings", { defaultValue: "Findings" })), model.findings.map((finding, index) => /* @__PURE__ */ React317.createElement(Group115, { key: `${finding.severity}-${finding.issue}-${index}`, gap: "xs", align: "flex-start", wrap: "nowrap" }, finding.severity && /* @__PURE__ */ React317.createElement(Badge53, { variant: "light", color: findingSeverityColor(finding.severity), size: "sm", style: { flexShrink: 0 } }, finding.severity), /* @__PURE__ */ React317.createElement(Text199, { size: "sm", style: { flex: 1, minWidth: 0 } }, finding.issue)))), model.rationale && /* @__PURE__ */ React317.createElement(Group115, { gap: "xs", align: "flex-start", wrap: "nowrap" }, /* @__PURE__ */ React317.createElement(Text199, { size: "xs", c: "dimmed", style: { flexShrink: 0 } }, t("actionTypes.evaluateClaim.flow.flowManager.rationale", { defaultValue: "Rationale" })), /* @__PURE__ */ React317.createElement(Text199, { size: "sm", style: { flex: 1, minWidth: 0 } }, model.rationale)), model.narrative && /* @__PURE__ */ React317.createElement(Text199, { size: "sm", c: "dimmed" }, model.narrative), /* @__PURE__ */ React317.createElement(Text199, { size: "xs", c: "dimmed", title: model.invocationId }, t("actionTypes.evaluateClaim.flow.flowManager.reportAttribution", {
|
|
34234
34284
|
oracleDid: model.oracleDid,
|
|
34235
34285
|
receivedAt: new Date(model.receivedAt).toLocaleString(),
|
|
34236
34286
|
defaultValue: `By ${model.oracleDid} \xB7 ${new Date(model.receivedAt).toLocaleString()}`
|
|
@@ -34239,12 +34289,12 @@ var EvaluationReportSection = ({ runtime, selectedClaimId }) => {
|
|
|
34239
34289
|
|
|
34240
34290
|
// src/mantine/blocks/action/actionTypes/evaluateClaim/ClaimAttachments.tsx
|
|
34241
34291
|
import React319, { useCallback as useCallback112, useEffect as useEffect114, useMemo as useMemo118, useRef as useRef44, useState as useState168 } from "react";
|
|
34242
|
-
import { Box as Box61, Group as
|
|
34292
|
+
import { Box as Box61, Group as Group117, Loader as Loader63, SimpleGrid as SimpleGrid4, Stack as Stack213, Text as Text201, Tooltip as Tooltip30, UnstyledButton as UnstyledButton4 } from "@mantine/core";
|
|
34243
34293
|
import { IconFile as IconFile5, IconFileText as IconFileText6, IconMusic, IconPhoto as IconPhoto5, IconVideo } from "@tabler/icons-react";
|
|
34244
34294
|
|
|
34245
34295
|
// src/mantine/components/MediaPreviewModal.tsx
|
|
34246
34296
|
import React318 from "react";
|
|
34247
|
-
import { Anchor, Box as Box60, Center as Center13, Group as
|
|
34297
|
+
import { Anchor, Box as Box60, Center as Center13, Group as Group116, Modal as Modal3, Stack as Stack212, Text as Text200 } from "@mantine/core";
|
|
34248
34298
|
import { useMediaQuery as useMediaQuery2 } from "@mantine/hooks";
|
|
34249
34299
|
import { IconDownload as IconDownload4 } from "@tabler/icons-react";
|
|
34250
34300
|
function detectKind(type, name) {
|
|
@@ -34268,7 +34318,7 @@ var MediaPreviewModal = ({ file, onClose }) => {
|
|
|
34268
34318
|
onClose,
|
|
34269
34319
|
zIndex: 1e4,
|
|
34270
34320
|
portalProps: typeof document !== "undefined" ? { target: document.body } : void 0,
|
|
34271
|
-
title: /* @__PURE__ */ React318.createElement(
|
|
34321
|
+
title: /* @__PURE__ */ React318.createElement(Group116, { gap: "sm", wrap: "nowrap", style: { width: "100%" } }, /* @__PURE__ */ React318.createElement(Text200, { fw: 500, size: "sm", truncate: true, style: { flex: 1, minWidth: 0 } }, file?.name || "Preview"), file && /* @__PURE__ */ React318.createElement(Anchor, { href: file.content, target: "_blank", rel: "noopener noreferrer", download: file.name, size: "xs", c: "dimmed", style: { flexShrink: 0 } }, /* @__PURE__ */ React318.createElement(Box60, { style: { display: "inline-flex", alignItems: "center", gap: 4 } }, icon(IconDownload4, 14), "Download"))),
|
|
34272
34322
|
size: wide ? "95vw" : "xl",
|
|
34273
34323
|
centered: true,
|
|
34274
34324
|
styles: wide ? {
|
|
@@ -34488,7 +34538,7 @@ var ClaimAttachments = ({ surveyModel, credentialSubject, entityDid }) => {
|
|
|
34488
34538
|
}
|
|
34489
34539
|
}
|
|
34490
34540
|
) : isFetching ? /* @__PURE__ */ React319.createElement(Loader63, { size: "sm" }) : icon(IconCmp, 28)
|
|
34491
|
-
), /* @__PURE__ */ React319.createElement(
|
|
34541
|
+
), /* @__PURE__ */ React319.createElement(Group117, { gap: 6, p: 8, wrap: "nowrap" }, icon(IconCmp, 14), /* @__PURE__ */ React319.createElement(Text201, { size: "xs", truncate: true, style: { flex: 1 } }, item.name)))
|
|
34492
34542
|
));
|
|
34493
34543
|
})), /* @__PURE__ */ React319.createElement(MediaPreviewModal, { file: active, onClose: () => setActive(null) }));
|
|
34494
34544
|
};
|
|
@@ -34595,10 +34645,6 @@ var EvaluateClaimFlowDetail = ({
|
|
|
34595
34645
|
const [loadingDispute] = useState169(false);
|
|
34596
34646
|
const [evaluationOutcomePatch] = useState169(null);
|
|
34597
34647
|
const [evaluationAmount] = useState169(null);
|
|
34598
|
-
const xeroBlocks = useMemo119(
|
|
34599
|
-
() => resolveXeroBindings(editor?.document, parsed.xeroInvoiceBlockId, parsed.xeroPaymentBlockId),
|
|
34600
|
-
[editor, parsed.xeroInvoiceBlockId, parsed.xeroPaymentBlockId]
|
|
34601
|
-
);
|
|
34602
34648
|
const selectedClaim = useMemo119(() => claims.find((claim) => claim.claimId === selectedClaimId) || null, [claims, selectedClaimId]);
|
|
34603
34649
|
const filteredClaims = useMemo119(() => {
|
|
34604
34650
|
if (activeFilter === "all") return claims;
|
|
@@ -35031,8 +35077,6 @@ var EvaluateClaimFlowDetail = ({
|
|
|
35031
35077
|
error: step.error
|
|
35032
35078
|
})),
|
|
35033
35079
|
granteeAddress: actorDid,
|
|
35034
|
-
xeroInvoiceBlockId: parsed.xeroInvoiceBlockId,
|
|
35035
|
-
xeroPaymentBlockId: parsed.xeroPaymentBlockId,
|
|
35036
35080
|
claimSnapshot: selectedClaim
|
|
35037
35081
|
}
|
|
35038
35082
|
});
|
|
@@ -35064,9 +35108,7 @@ var EvaluateClaimFlowDetail = ({
|
|
|
35064
35108
|
evaluationResult,
|
|
35065
35109
|
outcomeResponses,
|
|
35066
35110
|
disputeReason,
|
|
35067
|
-
executeAction
|
|
35068
|
-
parsed.xeroInvoiceBlockId,
|
|
35069
|
-
parsed.xeroPaymentBlockId
|
|
35111
|
+
executeAction
|
|
35070
35112
|
]);
|
|
35071
35113
|
const flowManagerContext = /* @__PURE__ */ React320.createElement(FlowManagerContextSection, { record: nodeContext, onOverride: setNodeContextOverride, disabled: isDisabled });
|
|
35072
35114
|
if (selectedClaim) {
|
|
@@ -35074,7 +35116,7 @@ var EvaluateClaimFlowDetail = ({
|
|
|
35074
35116
|
const selectedClaimProfile = profilesByDid[selectedClaim.agentDid];
|
|
35075
35117
|
const selectedDisplayName = selectedClaimProfile?.displayname || selectedClaim.agentDid || selectedClaim.agentAddress;
|
|
35076
35118
|
const selectedAvatarLabel = (selectedClaimProfile?.displayname || selectedClaim.agentDid || selectedClaim.agentAddress || "?")[0]?.toUpperCase();
|
|
35077
|
-
return /* @__PURE__ */ React320.createElement(Stack214, { gap: "md" }, /* @__PURE__ */ React320.createElement(
|
|
35119
|
+
return /* @__PURE__ */ React320.createElement(Stack214, { gap: "md" }, /* @__PURE__ */ React320.createElement(Group118, { gap: "xs", align: "center" }, /* @__PURE__ */ React320.createElement(ActionIcon47, { variant: "subtle", color: "gray", size: "sm", onClick: () => setSelectedClaimId("") }, /* @__PURE__ */ React320.createElement(IconArrowLeft11, { size: 16 })), /* @__PURE__ */ React320.createElement(Text202, { fw: 500, size: "sm", title: selectedClaim.claimId }, t("actionTypes.claim.flow.claimNumber", { id: truncateId2(selectedClaim.claimId), defaultValue: `Claim #${truncateId2(selectedClaim.claimId)}` }))), /* @__PURE__ */ React320.createElement(Group118, { gap: 16, align: "center", style: { width: "100%" } }, /* @__PURE__ */ React320.createElement(
|
|
35078
35120
|
Box62,
|
|
35079
35121
|
{
|
|
35080
35122
|
style: {
|
|
@@ -35095,17 +35137,17 @@ var EvaluateClaimFlowDetail = ({
|
|
|
35095
35137
|
}
|
|
35096
35138
|
},
|
|
35097
35139
|
selectedClaimProfile?.avatarUrl ? null : selectedAvatarLabel
|
|
35098
|
-
), /* @__PURE__ */ React320.createElement(Stack214, { gap: 0, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React320.createElement(Text202, { fw: 500, size: "md", truncate: true }, selectedDisplayName), /* @__PURE__ */ React320.createElement(Text202, { size: "xs", c: "dimmed", truncate: true }, truncateAddress5(selectedClaim.agentAddress))), /* @__PURE__ */ React320.createElement(Stack214, { gap: 0, align: "flex-end", style: { flexShrink: 0 } }, /* @__PURE__ */ React320.createElement(Text202, { fw: 500, size: "md", c: claimStatus.color }, claimStatus.key === "approved" && /* @__PURE__ */ React320.createElement(IconCheck26, { size: 14, style: { verticalAlign: "middle", marginRight: 4 } }), claimStatus.label), /* @__PURE__ */ React320.createElement(Text202, { size: "xs", c: "dimmed" }, getTimeAgo4(selectedClaim.submissionDate || "")))), claimStatus.key === "disputed" && /* @__PURE__ */ React320.createElement(Alert74, { color: "orange", title: t("actionTypes.claim.flow.disputed.title", { defaultValue: "Claim disputed" }), styles: actionAlertStyles }, loadingDispute ? /* @__PURE__ */ React320.createElement(
|
|
35140
|
+
), /* @__PURE__ */ React320.createElement(Stack214, { gap: 0, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React320.createElement(Text202, { fw: 500, size: "md", truncate: true }, selectedDisplayName), /* @__PURE__ */ React320.createElement(Text202, { size: "xs", c: "dimmed", truncate: true }, truncateAddress5(selectedClaim.agentAddress))), /* @__PURE__ */ React320.createElement(Stack214, { gap: 0, align: "flex-end", style: { flexShrink: 0 } }, /* @__PURE__ */ React320.createElement(Text202, { fw: 500, size: "md", c: claimStatus.color }, claimStatus.key === "approved" && /* @__PURE__ */ React320.createElement(IconCheck26, { size: 14, style: { verticalAlign: "middle", marginRight: 4 } }), claimStatus.label), /* @__PURE__ */ React320.createElement(Text202, { size: "xs", c: "dimmed" }, getTimeAgo4(selectedClaim.submissionDate || "")))), claimStatus.key === "disputed" && /* @__PURE__ */ React320.createElement(Alert74, { color: "orange", title: t("actionTypes.claim.flow.disputed.title", { defaultValue: "Claim disputed" }), styles: actionAlertStyles }, loadingDispute ? /* @__PURE__ */ React320.createElement(Group118, { gap: "xs" }, /* @__PURE__ */ React320.createElement(Loader64, { size: "xs" }), /* @__PURE__ */ React320.createElement(Text202, { size: "xs" }, t("actionTypes.claim.flow.disputed.loadingDetails", { defaultValue: "Loading dispute details\u2026" }))) : disputeDetails ? /* @__PURE__ */ React320.createElement(Stack214, { gap: 6 }, disputeDetails.reason ? /* @__PURE__ */ React320.createElement(Text202, { size: "sm" }, disputeDetails.reason) : /* @__PURE__ */ React320.createElement(Text202, { size: "sm", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.disputed.noMessageAttached", { defaultValue: "A dispute was recorded but no message was attached." })), (disputeDetails.evaluatorDid || disputeDetails.disputedAt) && /* @__PURE__ */ React320.createElement(Text202, { size: "xs", c: "dimmed" }, disputeDetails.evaluatorDid ? t("actionTypes.claim.flow.disputed.byEvaluator", {
|
|
35099
35141
|
address: truncateAddress5(disputeDetails.evaluatorDid),
|
|
35100
35142
|
defaultValue: `By ${truncateAddress5(disputeDetails.evaluatorDid)}`
|
|
35101
|
-
}) : "", disputeDetails.evaluatorDid && disputeDetails.disputedAt ? " \xB7 " : "", disputeDetails.disputedAt ? new Date(disputeDetails.disputedAt).toLocaleString() : ""), /* @__PURE__ */ React320.createElement(Text202, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.disputed.amendNeeded", { defaultValue: "The submitter needs to amend and resubmit before this claim can be evaluated." }))) : typeof handlers.getClaimDisputeDetails !== "function" ? /* @__PURE__ */ React320.createElement(Text202, { size: "xs", c: "dimmed" }, t("actionTypes.claim.flow.disputed.unavailable", { defaultValue: "Dispute details unavailable in this environment." })) : /* @__PURE__ */ React320.createElement(Text202, { size: "xs", c: "dimmed" }, t("actionTypes.claim.flow.disputed.noRecord", { defaultValue: "No dispute record found on-chain for this claim." }))), /* @__PURE__ */ React320.createElement(CollapsibleSection, { title: t("actionTypes.evaluateClaim.flow.section.submission", { defaultValue: "Submission" }) }, surveyLoading ? /* @__PURE__ */ React320.createElement(
|
|
35143
|
+
}) : "", disputeDetails.evaluatorDid && disputeDetails.disputedAt ? " \xB7 " : "", disputeDetails.disputedAt ? new Date(disputeDetails.disputedAt).toLocaleString() : ""), /* @__PURE__ */ React320.createElement(Text202, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.disputed.amendNeeded", { defaultValue: "The submitter needs to amend and resubmit before this claim can be evaluated." }))) : typeof handlers.getClaimDisputeDetails !== "function" ? /* @__PURE__ */ React320.createElement(Text202, { size: "xs", c: "dimmed" }, t("actionTypes.claim.flow.disputed.unavailable", { defaultValue: "Dispute details unavailable in this environment." })) : /* @__PURE__ */ React320.createElement(Text202, { size: "xs", c: "dimmed" }, t("actionTypes.claim.flow.disputed.noRecord", { defaultValue: "No dispute record found on-chain for this claim." }))), /* @__PURE__ */ React320.createElement(CollapsibleSection, { title: t("actionTypes.evaluateClaim.flow.section.submission", { defaultValue: "Submission" }) }, surveyLoading ? /* @__PURE__ */ React320.createElement(Group118, { gap: "xs" }, /* @__PURE__ */ React320.createElement(Loader64, { size: "xs" }), /* @__PURE__ */ React320.createElement(Text202, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.loadingSubmissionDetails", { defaultValue: "Loading submission details..." }))) : surveyModel ? /* @__PURE__ */ React320.createElement(ScrollArea8, { h: 280 }, /* @__PURE__ */ React320.createElement(StableSurvey, { model: surveyModel })) : /* @__PURE__ */ React320.createElement(Text202, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.noSubmissionTemplate", { defaultValue: "No submission template/data available." }))), /* @__PURE__ */ React320.createElement(CollapsibleSection, { title: t("actionTypes.evaluateClaim.flow.section.attachments", { defaultValue: "Attachments" }) }, /* @__PURE__ */ React320.createElement(ClaimAttachments, { surveyModel, credentialSubject: resolvedCredentialSubject, entityDid: deedDid })), /* @__PURE__ */ React320.createElement(CollapsibleSection, { title: t("actionTypes.evaluateClaim.flow.section.aiEvaluation", { defaultValue: "AI Evaluation" }) }, evaluationLoading ? /* @__PURE__ */ React320.createElement(Group118, { gap: "xs" }, /* @__PURE__ */ React320.createElement(Loader64, { size: "xs" }), /* @__PURE__ */ React320.createElement(Text202, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.runningRubric", { defaultValue: "Running rubric evaluation..." }))) : evaluationResult ? /* @__PURE__ */ React320.createElement(ScrollArea8, { h: 280 }, /* @__PURE__ */ React320.createElement(RubricEvaluationResults, { evaluation: evaluationResult })) : /* @__PURE__ */ React320.createElement(Text202, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.noRubric", { defaultValue: "No rubric evaluation available for this claim." }))), flowManagerContext, /* @__PURE__ */ React320.createElement(EvaluationReportSection, { runtime, selectedClaimId: selectedClaim.claimId }), parsed.xeroOracleInvoiceOnApprove && /* @__PURE__ */ React320.createElement(CollapsibleSection, { title: "Xero work", defaultOpen: false }, /* @__PURE__ */ React320.createElement(Alert74, { color: "blue", variant: "light", p: "xs" }, /* @__PURE__ */ React320.createElement(Text202, { size: "xs" }, "Approving this claim queues a Xero invoice work item. The contracted Xero oracle creates a draft invoice from the claim material \u2014 no Xero side effects run in the browser."))), (outcomeTemplateLoading || outcomeTemplateJson) && /* @__PURE__ */ React320.createElement(
|
|
35102
35144
|
CollapsibleSection,
|
|
35103
35145
|
{
|
|
35104
35146
|
title: t("actionTypes.evaluateClaim.flow.section.outcome", { defaultValue: "Outcome" }),
|
|
35105
35147
|
defaultOpen: true,
|
|
35106
35148
|
badge: /* @__PURE__ */ React320.createElement(React320.Fragment, null, outcomeTemplateJson && !outcomeComplete && !isClaimAlreadyEvaluated && /* @__PURE__ */ React320.createElement(Text202, { size: "xs", c: "yellow" }, t("actionTypes.evaluateClaim.flow.outcome.requiredBadge", { defaultValue: "(required)" })), (outcomeComplete || isClaimAlreadyEvaluated) && /* @__PURE__ */ React320.createElement(IconCheck26, { size: 14, color: "var(--mantine-color-green-6)" }))
|
|
35107
35149
|
},
|
|
35108
|
-
outcomeTemplateLoading ? /* @__PURE__ */ React320.createElement(
|
|
35150
|
+
outcomeTemplateLoading ? /* @__PURE__ */ React320.createElement(Group118, { gap: "xs" }, /* @__PURE__ */ React320.createElement(Loader64, { size: "xs" }), /* @__PURE__ */ React320.createElement(Text202, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.outcome.loading", { defaultValue: "Loading evaluation template..." }))) : outcomeSurveyModel ? /* @__PURE__ */ React320.createElement(ScrollArea8, { h: 320 }, /* @__PURE__ */ React320.createElement(StableSurvey, { model: outcomeSurveyModel })) : /* @__PURE__ */ React320.createElement(Text202, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.outcome.noTemplate", { defaultValue: "No evaluation template available." }))
|
|
35109
35151
|
), !isClaimAlreadyEvaluated && /* @__PURE__ */ React320.createElement(CollapsibleSection, { title: t("actionTypes.evaluateClaim.flow.section.evaluation", { defaultValue: "Evaluation" }), defaultOpen: true }, /* @__PURE__ */ React320.createElement(Stack214, { gap: "md" }, /* @__PURE__ */ React320.createElement(Divider23, { color: "color-mix(in srgb, var(--mantine-color-text) 6%, transparent)" }), decision === "dispute" ? /* @__PURE__ */ React320.createElement(Stack214, { gap: "md" }, /* @__PURE__ */ React320.createElement(
|
|
35110
35152
|
BaseTextArea,
|
|
35111
35153
|
{
|
|
@@ -35119,7 +35161,7 @@ var EvaluateClaimFlowDetail = ({
|
|
|
35119
35161
|
required: true,
|
|
35120
35162
|
disabled: isDisabled || submitting || isClaimAlreadyEvaluated
|
|
35121
35163
|
}
|
|
35122
|
-
)) : /* @__PURE__ */ React320.createElement(React320.Fragment, null, /* @__PURE__ */ React320.createElement(Text202, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.payment.label", { defaultValue: "Payment (optional custom payouts)" })), paymentRows.map((row, index) => /* @__PURE__ */ React320.createElement(Stack214, { key: row.id, gap: 8 }, /* @__PURE__ */ React320.createElement(
|
|
35164
|
+
)) : /* @__PURE__ */ React320.createElement(React320.Fragment, null, /* @__PURE__ */ React320.createElement(Text202, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.payment.label", { defaultValue: "Payment (optional custom payouts)" })), paymentRows.map((row, index) => /* @__PURE__ */ React320.createElement(Stack214, { key: row.id, gap: 8 }, /* @__PURE__ */ React320.createElement(Group118, { justify: "space-between", align: "center" }, /* @__PURE__ */ React320.createElement(Text202, { size: "sm" }, t("actionTypes.evaluateClaim.flow.payment.token", { index: index + 1, defaultValue: `Token ${index + 1}` })), paymentRows.length > 1 && /* @__PURE__ */ React320.createElement(Button69, { variant: "subtle", size: "compact-xs", color: "red", onClick: () => removePaymentRow(row.id), disabled: isDisabled || submitting }, t("actionTypes.evaluateClaim.flow.payment.remove", { defaultValue: "Remove" }))), /* @__PURE__ */ React320.createElement(
|
|
35123
35165
|
BaseSelect,
|
|
35124
35166
|
{
|
|
35125
35167
|
value: row.denom,
|
|
@@ -35186,7 +35228,7 @@ var EvaluateClaimFlowDetail = ({
|
|
|
35186
35228
|
defaultValue: "Configure {{did}} and {{claimCollection}} in template mode before running this action.",
|
|
35187
35229
|
did: "DID",
|
|
35188
35230
|
claimCollection: "claim collection"
|
|
35189
|
-
})) : /* @__PURE__ */ React320.createElement(React320.Fragment, null, flowManagerContext, /* @__PURE__ */ React320.createElement(EvaluationReportSection, { runtime }), /* @__PURE__ */ React320.createElement(
|
|
35231
|
+
})) : /* @__PURE__ */ React320.createElement(React320.Fragment, null, flowManagerContext, /* @__PURE__ */ React320.createElement(EvaluationReportSection, { runtime }), /* @__PURE__ */ React320.createElement(Group118, { justify: "space-between", align: "center" }, /* @__PURE__ */ React320.createElement(Group118, { gap: 0 }, filterTabs.map((tab) => /* @__PURE__ */ React320.createElement(
|
|
35190
35232
|
UnstyledButton5,
|
|
35191
35233
|
{
|
|
35192
35234
|
key: tab.value,
|
|
@@ -35200,12 +35242,12 @@ var EvaluateClaimFlowDetail = ({
|
|
|
35200
35242
|
}
|
|
35201
35243
|
},
|
|
35202
35244
|
/* @__PURE__ */ React320.createElement(Text202, { size: "sm", fw: 500, c: activeFilter === tab.value ? "var(--mantine-color-text)" : "dimmed" }, tab.label)
|
|
35203
|
-
))), /* @__PURE__ */ React320.createElement(ActionIcon47, { variant: "subtle", color: "gray", size: "sm" }, /* @__PURE__ */ React320.createElement(IconFilter2, { size: 16 }))), loadingClaims && /* @__PURE__ */ React320.createElement(
|
|
35245
|
+
))), /* @__PURE__ */ React320.createElement(ActionIcon47, { variant: "subtle", color: "gray", size: "sm" }, /* @__PURE__ */ React320.createElement(IconFilter2, { size: 16 }))), loadingClaims && /* @__PURE__ */ React320.createElement(Group118, { gap: "xs", justify: "center", py: "md" }, /* @__PURE__ */ React320.createElement(Loader64, { size: "xs" }), /* @__PURE__ */ React320.createElement(Text202, { size: "xs", c: "dimmed" }, t("actionTypes.evaluateClaim.flow.loadingClaims", { defaultValue: "Loading claims..." }))), !loadingClaims && filteredClaims.length === 0 && /* @__PURE__ */ React320.createElement(Text202, { size: "sm", c: "dimmed", ta: "center", py: "md" }, claims.length === 0 ? t("actionTypes.evaluateClaim.flow.empty.allCollections", { defaultValue: "No claims available for this collection." }) : t("actionTypes.evaluateClaim.flow.empty.filtered", { filter: activeFilter, defaultValue: `No ${activeFilter} claims found.` })), filteredClaims.length > 0 && /* @__PURE__ */ React320.createElement(Stack214, { gap: 12 }, filteredClaims.map((claim) => {
|
|
35204
35246
|
const status = getClaimStatusInfo(claim);
|
|
35205
35247
|
const profile = profilesByDid[claim.agentDid];
|
|
35206
35248
|
const displayName = profile?.displayname || claim.agentDid || claim.agentAddress;
|
|
35207
35249
|
const avatarLabel = (profile?.displayname || claim.agentDid || claim.agentAddress || "?")[0]?.toUpperCase();
|
|
35208
|
-
return /* @__PURE__ */ React320.createElement(ListItemContainer, { key: claim.claimId, isChecked: false, onClick: () => setSelectedClaimId(claim.claimId) }, /* @__PURE__ */ React320.createElement(
|
|
35250
|
+
return /* @__PURE__ */ React320.createElement(ListItemContainer, { key: claim.claimId, isChecked: false, onClick: () => setSelectedClaimId(claim.claimId) }, /* @__PURE__ */ React320.createElement(Group118, { gap: 16, align: "center", style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React320.createElement(
|
|
35209
35251
|
Box62,
|
|
35210
35252
|
{
|
|
35211
35253
|
style: {
|
|
@@ -35390,7 +35432,7 @@ var ProposalCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
35390
35432
|
|
|
35391
35433
|
// src/mantine/blocks/action/actionTypes/proposalCreate/ProposalCreateFlowDetail.tsx
|
|
35392
35434
|
import React322, { useCallback as useCallback115, useEffect as useEffect117, useMemo as useMemo121, useState as useState171 } from "react";
|
|
35393
|
-
import { Alert as Alert75, Badge as Badge54, Button as Button70, Card as Card29, Group as
|
|
35435
|
+
import { Alert as Alert75, Badge as Badge54, Button as Button70, Card as Card29, Group as Group119, Loader as Loader66, Stack as Stack216, Text as Text204 } from "@mantine/core";
|
|
35394
35436
|
import { IconPlus as IconPlus9, IconPlayerPlay as IconPlayerPlay7 } from "@tabler/icons-react";
|
|
35395
35437
|
|
|
35396
35438
|
// src/mantine/blocks/action/hooks/useResolvedInputs.ts
|
|
@@ -35599,7 +35641,7 @@ var ProposalCreateFlowDetail = ({ inputs, editor, block, runtime, updateRuntime,
|
|
|
35599
35641
|
border: `1px solid ${statusColor2[currentStatus] || "var(--mantine-color-neutralColor-5)"}`
|
|
35600
35642
|
}
|
|
35601
35643
|
},
|
|
35602
|
-
/* @__PURE__ */ React322.createElement(Stack216, { gap: "xs" }, /* @__PURE__ */ React322.createElement(
|
|
35644
|
+
/* @__PURE__ */ React322.createElement(Stack216, { gap: "xs" }, /* @__PURE__ */ React322.createElement(Group119, { justify: "space-between" }, /* @__PURE__ */ React322.createElement(Text204, { size: "sm", fw: 500, style: { color: "var(--mantine-color-text)" } }, "Proposal #", proposalId), /* @__PURE__ */ React322.createElement(Badge54, { color: statusColor2[currentStatus], variant: "filled", size: "sm", radius: "sm" }, currentStatus.replace(/_/g, " ").toUpperCase())), proposalTitle && /* @__PURE__ */ React322.createElement(Text204, { size: "sm", style: { color: "var(--mantine-color-dimmed)" } }, proposalTitle))
|
|
35603
35645
|
), isProposalCreated && /* @__PURE__ */ React322.createElement(Card29, { padding: "md", radius: "md", withBorder: true, style: { borderColor: "var(--mantine-color-green-6)" } }, /* @__PURE__ */ React322.createElement(Text204, { fw: 500, size: "sm", c: "green" }, "Proposal Created Successfully"), /* @__PURE__ */ React322.createElement(Text204, { size: "sm", c: "dimmed" }, "Your proposal has been created and is now open for voting.")), currentStatus === "passed" && /* @__PURE__ */ React322.createElement(
|
|
35604
35646
|
Button70,
|
|
35605
35647
|
{
|
|
@@ -35622,7 +35664,7 @@ var ProposalCreateFlowDetail = ({ inputs, editor, block, runtime, updateRuntime,
|
|
|
35622
35664
|
loading: isCreating
|
|
35623
35665
|
},
|
|
35624
35666
|
"Create Proposal"
|
|
35625
|
-
)), isFetching && /* @__PURE__ */ React322.createElement(
|
|
35667
|
+
)), isFetching && /* @__PURE__ */ React322.createElement(Group119, { gap: "xs" }, /* @__PURE__ */ React322.createElement(Loader66, { size: "xs" }), /* @__PURE__ */ React322.createElement(Text204, { size: "xs", c: "dimmed" }, "Fetching proposal status...")), error && /* @__PURE__ */ React322.createElement(Alert75, { color: "red", styles: actionAlertStyles }, error), fetchError && /* @__PURE__ */ React322.createElement(Alert75, { color: "red", styles: actionAlertStyles }, typeof fetchError === "string" ? fetchError : "Failed to fetch proposal data"), runtime.error?.message && /* @__PURE__ */ React322.createElement(Alert75, { color: "red", styles: actionAlertStyles }, runtime.error.message));
|
|
35626
35668
|
};
|
|
35627
35669
|
|
|
35628
35670
|
// src/mantine/blocks/action/actionTypes/proposalCreate/index.ts
|
|
@@ -35777,7 +35819,7 @@ var ProposalVoteConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
35777
35819
|
|
|
35778
35820
|
// src/mantine/blocks/action/actionTypes/proposalVote/ProposalVoteFlowDetail.tsx
|
|
35779
35821
|
import React324, { useCallback as useCallback117, useEffect as useEffect119, useMemo as useMemo122, useState as useState173 } from "react";
|
|
35780
|
-
import { Alert as Alert76, Box as Box63, Button as Button71, Card as Card30, Group as
|
|
35822
|
+
import { Alert as Alert76, Box as Box63, Button as Button71, Card as Card30, Group as Group120, Progress as Progress5, Stack as Stack218, Text as Text206, Tooltip as Tooltip31 } from "@mantine/core";
|
|
35781
35823
|
var getVoteIcon2 = (voteType) => {
|
|
35782
35824
|
switch (voteType) {
|
|
35783
35825
|
case "yes":
|
|
@@ -35894,7 +35936,7 @@ var ProposalVoteFlowDetail = ({ inputs, editor, block, runtime, isDisabled, exec
|
|
|
35894
35936
|
color: "var(--mantine-color-text)"
|
|
35895
35937
|
}
|
|
35896
35938
|
},
|
|
35897
|
-
/* @__PURE__ */ React324.createElement(
|
|
35939
|
+
/* @__PURE__ */ React324.createElement(Group120, { gap: "xs", align: "center" }, /* @__PURE__ */ React324.createElement(
|
|
35898
35940
|
Box63,
|
|
35899
35941
|
{
|
|
35900
35942
|
style: {
|
|
@@ -35918,7 +35960,7 @@ var ProposalVoteFlowDetail = ({ inputs, editor, block, runtime, isDisabled, exec
|
|
|
35918
35960
|
opacity: !hasSubmittedProposal ? 0.6 : 1
|
|
35919
35961
|
}
|
|
35920
35962
|
},
|
|
35921
|
-
/* @__PURE__ */ React324.createElement(Stack218, { gap: "xs" }, /* @__PURE__ */ React324.createElement(
|
|
35963
|
+
/* @__PURE__ */ React324.createElement(Stack218, { gap: "xs" }, /* @__PURE__ */ React324.createElement(Group120, { justify: "space-between" }, /* @__PURE__ */ React324.createElement(Group120, { gap: "xs" }, /* @__PURE__ */ React324.createElement(
|
|
35922
35964
|
Box63,
|
|
35923
35965
|
{
|
|
35924
35966
|
w: 8,
|
|
@@ -35928,7 +35970,7 @@ var ProposalVoteFlowDetail = ({ inputs, editor, block, runtime, isDisabled, exec
|
|
|
35928
35970
|
borderRadius: "50%"
|
|
35929
35971
|
}
|
|
35930
35972
|
}
|
|
35931
|
-
), /* @__PURE__ */ React324.createElement(Text206, { size: "sm", style: { color: "var(--mantine-color-dimmed)" } }, "Proposal ID")), /* @__PURE__ */ React324.createElement(Text206, { size: "sm", fw: 500, style: { color: "var(--mantine-color-text)" } }, hasSubmittedProposal ? `#${proposalId}` : "TBD")), /* @__PURE__ */ React324.createElement(
|
|
35973
|
+
), /* @__PURE__ */ React324.createElement(Text206, { size: "sm", style: { color: "var(--mantine-color-dimmed)" } }, "Proposal ID")), /* @__PURE__ */ React324.createElement(Text206, { size: "sm", fw: 500, style: { color: "var(--mantine-color-text)" } }, hasSubmittedProposal ? `#${proposalId}` : "TBD")), /* @__PURE__ */ React324.createElement(Group120, { justify: "space-between" }, /* @__PURE__ */ React324.createElement(Group120, { gap: "xs" }, /* @__PURE__ */ React324.createElement(Box63, { w: 8, h: 8, style: { backgroundColor: "var(--mantine-color-dimmed)", borderRadius: "50%" } }), /* @__PURE__ */ React324.createElement(Text206, { size: "sm", style: { color: "var(--mantine-color-dimmed)" } }, "My Vote")), /* @__PURE__ */ React324.createElement(Text206, { size: "sm", fw: 500, style: { color: "var(--mantine-color-text)" } }, hasSubmittedProposal ? userVote?.vote ? userVote.vote.vote : "Pending" : "N/A"))),
|
|
35932
35974
|
/* @__PURE__ */ React324.createElement(Stack218, { gap: "xs", mt: "md" }, /* @__PURE__ */ React324.createElement(Text206, { size: "sm", style: { color: "var(--mantine-color-dimmed)" } }, hasSubmittedProposal ? "Voting is open" : "Voting pending"), /* @__PURE__ */ React324.createElement(Progress5, { value: hasSubmittedProposal ? 75 : 0, size: "md" }))
|
|
35933
35975
|
), hasSubmittedProposal && proposalContractAddress && /* @__PURE__ */ React324.createElement(ProposalOverviewCard, { proposalContractAddress, proposalId }), hasSubmittedProposal && !hasVoted && /* @__PURE__ */ React324.createElement(Stack218, { gap: "lg" }, /* @__PURE__ */ React324.createElement(Stack218, { gap: "md" }, ["yes", "no", "abstain"].map((voteType) => /* @__PURE__ */ React324.createElement(Tooltip31, { key: voteType, label: isDisabled ? "Action is disabled" : void 0, disabled: !isDisabled, position: "top" }, /* @__PURE__ */ React324.createElement(
|
|
35934
35976
|
Button71,
|
|
@@ -36006,7 +36048,7 @@ var ProposalVoteFlowDetail = ({ inputs, editor, block, runtime, isDisabled, exec
|
|
|
36006
36048
|
color: "var(--mantine-color-text)"
|
|
36007
36049
|
}
|
|
36008
36050
|
},
|
|
36009
|
-
/* @__PURE__ */ React324.createElement(Stack218, { gap: "xs" }, /* @__PURE__ */ React324.createElement(
|
|
36051
|
+
/* @__PURE__ */ React324.createElement(Stack218, { gap: "xs" }, /* @__PURE__ */ React324.createElement(Group120, { gap: "xs", align: "center" }, /* @__PURE__ */ React324.createElement(
|
|
36010
36052
|
Box63,
|
|
36011
36053
|
{
|
|
36012
36054
|
style: {
|
|
@@ -36079,7 +36121,7 @@ var ProtocolSelectConfig = ({ inputs, onInputsChange }) => {
|
|
|
36079
36121
|
|
|
36080
36122
|
// src/mantine/blocks/action/actionTypes/protocolSelect/ProtocolSelectFlowDetail.tsx
|
|
36081
36123
|
import React326, { useCallback as useCallback118, useEffect as useEffect120, useMemo as useMemo124, useState as useState175 } from "react";
|
|
36082
|
-
import { Box as Box65, Group as
|
|
36124
|
+
import { Box as Box65, Group as Group121, Loader as Loader68, Stack as Stack220, Text as Text208 } from "@mantine/core";
|
|
36083
36125
|
function parseInputs3(json) {
|
|
36084
36126
|
try {
|
|
36085
36127
|
const parsed = typeof json === "string" ? JSON.parse(json) : json;
|
|
@@ -36176,7 +36218,7 @@ var ProtocolSelectFlowDetail = ({ inputs, block, runtime, isDisabled, executeAct
|
|
|
36176
36218
|
transition: "all 0.15s ease"
|
|
36177
36219
|
}
|
|
36178
36220
|
},
|
|
36179
|
-
/* @__PURE__ */ React326.createElement(
|
|
36221
|
+
/* @__PURE__ */ React326.createElement(Group121, { wrap: "nowrap", gap: "md", align: "center" }, protocol.loading ? /* @__PURE__ */ React326.createElement(Loader68, { size: "xs" }) : /* @__PURE__ */ React326.createElement(EntityAvatar_default, { size: 24 }), /* @__PURE__ */ React326.createElement(Stack220, { gap: 2, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React326.createElement(Text208, { fw: 500, size: "sm", lineClamp: 1 }, protocol.loading ? "Loading..." : protocol.type), /* @__PURE__ */ React326.createElement(Text208, { size: "xs", c: "dimmed", lineClamp: 2 }, protocol.loading ? "Fetching protocol info..." : protocol.description || protocol.did)))
|
|
36180
36222
|
);
|
|
36181
36223
|
}));
|
|
36182
36224
|
};
|
|
@@ -36250,7 +36292,7 @@ var DomainSignConfig = ({ inputs, onInputsChange }) => {
|
|
|
36250
36292
|
|
|
36251
36293
|
// src/mantine/blocks/action/actionTypes/domainSign/DomainSignFlowDetail.tsx
|
|
36252
36294
|
import React328, { useCallback as useCallback120, useEffect as useEffect122, useMemo as useMemo125, useState as useState177 } from "react";
|
|
36253
|
-
import { Alert as Alert77, Button as Button72, Group as
|
|
36295
|
+
import { Alert as Alert77, Button as Button72, Group as Group122, Loader as Loader69, Stack as Stack222, Text as Text210 } from "@mantine/core";
|
|
36254
36296
|
import { IconCheck as IconCheck27, IconAlertCircle as IconAlertCircle29, IconExternalLink as IconExternalLink2 } from "@tabler/icons-react";
|
|
36255
36297
|
var STEP_LABELS = {
|
|
36256
36298
|
creating: "Creating domain entity...",
|
|
@@ -36415,11 +36457,11 @@ var DomainSignFlowDetail = ({
|
|
|
36415
36457
|
handlers.redirectToEntityOverview(entityDid, resolvedEntityType);
|
|
36416
36458
|
}
|
|
36417
36459
|
}, [entityDid, resolvedEntityType, handlers]);
|
|
36418
|
-
return /* @__PURE__ */ React328.createElement(Stack222, { gap: "md" }, /* @__PURE__ */ React328.createElement(Stack222, { gap: 2 }, /* @__PURE__ */ React328.createElement(Text210, { fw: 600 }, block?.props?.title || "Sign Domain Card"), /* @__PURE__ */ React328.createElement(Text210, { size: "sm", c: "dimmed" }, block?.props?.description || "Sign the domain card credential and create a domain entity on-chain.")), !domainCardData ? /* @__PURE__ */ React328.createElement(Alert77, { color: "yellow", styles: actionAlertStyles }, "No domain card data available. The domain card viewer block must push data to this action before it can run.") : /* @__PURE__ */ React328.createElement(React328.Fragment, null, /* @__PURE__ */ React328.createElement(Stack222, { gap: "xs", p: "md", style: { backgroundColor: "var(--mantine-color-dark-6)", borderRadius: 8 } }, /* @__PURE__ */ React328.createElement(Text210, { fw: 600, size: "sm" }, "Domain Card Summary"), /* @__PURE__ */ React328.createElement(
|
|
36460
|
+
return /* @__PURE__ */ React328.createElement(Stack222, { gap: "md" }, /* @__PURE__ */ React328.createElement(Stack222, { gap: 2 }, /* @__PURE__ */ React328.createElement(Text210, { fw: 600 }, block?.props?.title || "Sign Domain Card"), /* @__PURE__ */ React328.createElement(Text210, { size: "sm", c: "dimmed" }, block?.props?.description || "Sign the domain card credential and create a domain entity on-chain.")), !domainCardData ? /* @__PURE__ */ React328.createElement(Alert77, { color: "yellow", styles: actionAlertStyles }, "No domain card data available. The domain card viewer block must push data to this action before it can run.") : /* @__PURE__ */ React328.createElement(React328.Fragment, null, /* @__PURE__ */ React328.createElement(Stack222, { gap: "xs", p: "md", style: { backgroundColor: "var(--mantine-color-dark-6)", borderRadius: 8 } }, /* @__PURE__ */ React328.createElement(Text210, { fw: 600, size: "sm" }, "Domain Card Summary"), /* @__PURE__ */ React328.createElement(Group122, { gap: "xs" }, /* @__PURE__ */ React328.createElement(Text210, { size: "xs", c: "dimmed", style: { width: 80 } }, "Name:"), /* @__PURE__ */ React328.createElement(Text210, { size: "xs" }, domainName || "Not set")), /* @__PURE__ */ React328.createElement(Group122, { gap: "xs" }, /* @__PURE__ */ React328.createElement(Text210, { size: "xs", c: "dimmed", style: { width: 80 } }, "Type:"), /* @__PURE__ */ React328.createElement(Text210, { size: "xs" }, resolvedEntityType)), domainDescription && /* @__PURE__ */ React328.createElement(Group122, { gap: "xs", align: "flex-start" }, /* @__PURE__ */ React328.createElement(Text210, { size: "xs", c: "dimmed", style: { width: 80 } }, "Description:"), /* @__PURE__ */ React328.createElement(Text210, { size: "xs", lineClamp: 2, style: { flex: 1 } }, domainDescription)), selectedTemplateCount > 0 && /* @__PURE__ */ React328.createElement(Group122, { gap: "xs", align: "flex-start" }, /* @__PURE__ */ React328.createElement(Text210, { size: "xs", c: "dimmed", style: { width: 80 } }, "Templates:"), /* @__PURE__ */ React328.createElement(Text210, { size: "xs" }, selectedTemplateCount, " selected across ", selectedTemplateProtocolCount, " protocol deed", selectedTemplateProtocolCount === 1 ? "" : "s"))), isRunning && /* @__PURE__ */ React328.createElement(Stack222, { gap: "xs" }, FLOW_STEPS.map((step) => {
|
|
36419
36461
|
const isActive = activeStep === step;
|
|
36420
36462
|
const isDone = FLOW_STEPS.indexOf(step) < FLOW_STEPS.indexOf(activeStep);
|
|
36421
|
-
return /* @__PURE__ */ React328.createElement(
|
|
36422
|
-
})), isCompleted && /* @__PURE__ */ React328.createElement(Alert77, { icon: /* @__PURE__ */ React328.createElement(IconCheck27, { size: 16 }), title: "Domain Created Successfully", color: "green" }, /* @__PURE__ */ React328.createElement(Stack222, { gap: "xs" }, /* @__PURE__ */ React328.createElement(Text210, { size: "sm" }, "The domain card has been signed and the entity has been created on-chain."), entityDid && /* @__PURE__ */ React328.createElement(Text210, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "POD DID: ", entityDid), governanceGroupCoreAddress && /* @__PURE__ */ React328.createElement(Text210, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "Group core address: ", governanceGroupCoreAddress), transactionHash && /* @__PURE__ */ React328.createElement(Text210, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "Transaction hash: ", transactionHash), linkedResourceTransactionHash && /* @__PURE__ */ React328.createElement(Text210, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "Linked resource transaction hash: ", linkedResourceTransactionHash), protocolTemplateImports.length > 0 && /* @__PURE__ */ React328.createElement(Text210, { size: "xs", c: "dimmed" }, "Imported templates: ", protocolTemplateImports.reduce((count, result) => count + (Array.isArray(result.imported) ? result.imported.length : 0), 0)))), isCompleted && entityDid && handlers?.redirectToEntityOverview && /* @__PURE__ */ React328.createElement(Button72, { variant: "outline", leftSection: /* @__PURE__ */ React328.createElement(IconExternalLink2, { size: 14 }), onClick: handleVisitEntity }, "Visit Entity"), !isCompleted && /* @__PURE__ */ React328.createElement(Button72, { fullWidth: true, onClick: handleSign, disabled: isDisabled || isRunning, loading: isRunning }, isRunning ? "Processing..." : "Sign & Create Domain"), isFailed && /* @__PURE__ */ React328.createElement(
|
|
36463
|
+
return /* @__PURE__ */ React328.createElement(Group122, { key: step, gap: "xs" }, isDone ? /* @__PURE__ */ React328.createElement(IconCheck27, { size: 14, color: "var(--mantine-color-green-5)" }) : isActive ? /* @__PURE__ */ React328.createElement(Loader69, { size: 14 }) : /* @__PURE__ */ React328.createElement(Text210, { size: "xs", c: "dimmed", style: { width: 14 } }, "\u2013"), /* @__PURE__ */ React328.createElement(Text210, { size: "xs", c: isActive ? void 0 : "dimmed" }, STEP_LABELS[step]));
|
|
36464
|
+
})), isCompleted && /* @__PURE__ */ React328.createElement(Alert77, { icon: /* @__PURE__ */ React328.createElement(IconCheck27, { size: 16 }), title: "Domain Created Successfully", color: "green" }, /* @__PURE__ */ React328.createElement(Stack222, { gap: "xs" }, /* @__PURE__ */ React328.createElement(Text210, { size: "sm" }, "The domain card has been signed and the entity has been created on-chain."), entityDid && /* @__PURE__ */ React328.createElement(Text210, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "POD DID: ", entityDid), governanceGroupCoreAddress && /* @__PURE__ */ React328.createElement(Text210, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "Group core address: ", governanceGroupCoreAddress), transactionHash && /* @__PURE__ */ React328.createElement(Text210, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "Transaction hash: ", transactionHash), linkedResourceTransactionHash && /* @__PURE__ */ React328.createElement(Text210, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "Linked resource transaction hash: ", linkedResourceTransactionHash), protocolTemplateImports.length > 0 && /* @__PURE__ */ React328.createElement(Text210, { size: "xs", c: "dimmed" }, "Imported templates: ", protocolTemplateImports.reduce((count, result) => count + (Array.isArray(result.imported) ? result.imported.length : 0), 0)))), isCompleted && entityDid && handlers?.redirectToEntityOverview && /* @__PURE__ */ React328.createElement(Button72, { variant: "outline", leftSection: /* @__PURE__ */ React328.createElement(IconExternalLink2, { size: 14 }), onClick: handleVisitEntity }, "Visit Entity"), !isCompleted && /* @__PURE__ */ React328.createElement(Button72, { fullWidth: true, onClick: handleSign, disabled: isDisabled || isRunning, loading: isRunning }, isRunning ? "Processing..." : "Sign & Create Domain"), isFailed && /* @__PURE__ */ React328.createElement(Group122, null, /* @__PURE__ */ React328.createElement(Button72, { variant: "outline", onClick: handleRetry }, "Try Again"))), errorMessage && /* @__PURE__ */ React328.createElement(Alert77, { icon: /* @__PURE__ */ React328.createElement(IconAlertCircle29, { size: 16 }), color: "red", styles: actionAlertStyles }, errorMessage));
|
|
36423
36465
|
};
|
|
36424
36466
|
|
|
36425
36467
|
// src/mantine/blocks/action/actionTypes/domainSign/index.ts
|
|
@@ -36515,7 +36557,7 @@ var DomainCardPreviewConfig = ({ inputs, onInputsChange }) => {
|
|
|
36515
36557
|
|
|
36516
36558
|
// src/mantine/blocks/action/actionTypes/domainCardPreview/DomainCardPreviewFlowDetail.tsx
|
|
36517
36559
|
import React330, { useCallback as useCallback122, useMemo as useMemo126, useState as useState179 } from "react";
|
|
36518
|
-
import { Alert as Alert78, Badge as Badge55, Box as Box66, Button as Button73, Code as Code12, Group as
|
|
36560
|
+
import { Alert as Alert78, Badge as Badge55, Box as Box66, Button as Button73, Code as Code12, Group as Group123, Loader as Loader70, ScrollArea as ScrollArea9, Stack as Stack224, Text as Text212 } from "@mantine/core";
|
|
36519
36561
|
import { IconAlertCircle as IconAlertCircle30, IconCheck as IconCheck28, IconSparkles as IconSparkles8 } from "@tabler/icons-react";
|
|
36520
36562
|
var JsonViewer2 = ({ data }) => /* @__PURE__ */ React330.createElement(ScrollArea9.Autosize, { mah: 360, offsetScrollbars: true }, /* @__PURE__ */ React330.createElement(Stack224, { gap: "md" }, data.name && /* @__PURE__ */ React330.createElement(Box66, null, /* @__PURE__ */ React330.createElement(Text212, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Name"), /* @__PURE__ */ React330.createElement(Text212, { size: "lg", fw: 600 }, data.name)), data.summary && /* @__PURE__ */ React330.createElement(Box66, null, /* @__PURE__ */ React330.createElement(Text212, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Summary"), /* @__PURE__ */ React330.createElement(Text212, { size: "sm" }, data.summary)), data.description && /* @__PURE__ */ React330.createElement(Box66, null, /* @__PURE__ */ React330.createElement(Text212, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Description"), /* @__PURE__ */ React330.createElement(Text212, { size: "sm" }, data.description)), data.entity_type && data.entity_type.length > 0 && /* @__PURE__ */ React330.createElement(Box66, null, /* @__PURE__ */ React330.createElement(Text212, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Type"), /* @__PURE__ */ React330.createElement(Text212, { size: "sm" }, data.entity_type.join(", "))), data.keywords && data.keywords.length > 0 && /* @__PURE__ */ React330.createElement(Box66, null, /* @__PURE__ */ React330.createElement(Text212, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Keywords"), /* @__PURE__ */ React330.createElement(Text212, { size: "sm" }, data.keywords.join(", "))), data.faq && data.faq.length > 0 && /* @__PURE__ */ React330.createElement(Box66, null, /* @__PURE__ */ React330.createElement(Text212, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600, mb: "xs" }, "FAQ"), /* @__PURE__ */ React330.createElement(Stack224, { gap: "sm" }, data.faq.map((item, index) => /* @__PURE__ */ React330.createElement(Box66, { key: index, p: "sm", style: { borderRadius: 8, backgroundColor: "var(--mantine-color-dark-6)" } }, /* @__PURE__ */ React330.createElement(Text212, { size: "sm", fw: 500, mb: 4 }, item.question), /* @__PURE__ */ React330.createElement(Text212, { size: "xs", c: "dimmed" }, item.answer))))), /* @__PURE__ */ React330.createElement(Box66, null, /* @__PURE__ */ React330.createElement(Text212, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600, mb: "xs" }, "Raw Data"), /* @__PURE__ */ React330.createElement(Code12, { block: true, style: { fontSize: 11, maxHeight: 200, overflow: "auto" } }, JSON.stringify(data, null, 2)))));
|
|
36521
36563
|
var STATUS_BADGE = {
|
|
@@ -36599,7 +36641,7 @@ var DomainCardPreviewFlowDetail = ({ inputs, editor, block, runtime, isDisabled,
|
|
|
36599
36641
|
setCompanionError(outcome.error || "Failed to approve domain card.");
|
|
36600
36642
|
}
|
|
36601
36643
|
}, [isDisabled, domainCardData, executeAction, domainPreviewData, runtime.output]);
|
|
36602
|
-
return /* @__PURE__ */ React330.createElement(Stack224, { gap: "md" }, /* @__PURE__ */ React330.createElement(Stack224, { gap: 2 }, /* @__PURE__ */ React330.createElement(
|
|
36644
|
+
return /* @__PURE__ */ React330.createElement(Stack224, { gap: "md" }, /* @__PURE__ */ React330.createElement(Stack224, { gap: 2 }, /* @__PURE__ */ React330.createElement(Group123, { gap: "xs", align: "center" }, /* @__PURE__ */ React330.createElement(Text212, { fw: 600 }, block?.props?.title || "Preview Domain Card"), /* @__PURE__ */ React330.createElement(Badge55, { size: "xs", variant: "filled", color: badge.color }, badge.text)), /* @__PURE__ */ React330.createElement(Text212, { size: "sm", c: "dimmed" }, block?.props?.description || "Review the oracle-enriched domain card before signing.")), status === "loading" && /* @__PURE__ */ React330.createElement(Stack224, { align: "center", py: "lg", gap: "md" }, /* @__PURE__ */ React330.createElement(Loader70, { size: "lg", color: "blue" }), /* @__PURE__ */ React330.createElement(Stack224, { align: "center", gap: "xs" }, /* @__PURE__ */ React330.createElement(IconSparkles8, { size: 22, color: "var(--mantine-color-blue-5)" }), /* @__PURE__ */ React330.createElement(Text212, { size: "sm", c: "dimmed", ta: "center" }, loadingMessage))), status === "error" && /* @__PURE__ */ React330.createElement(Alert78, { icon: /* @__PURE__ */ React330.createElement(IconAlertCircle30, { size: 16 }), title: "Preview error", color: "red", variant: "light", styles: actionAlertStyles }, /* @__PURE__ */ React330.createElement(Stack224, { gap: "xs" }, /* @__PURE__ */ React330.createElement(Text212, { size: "sm" }, errorMessage), /* @__PURE__ */ React330.createElement(Text212, { size: "xs", c: "dimmed" }, "Ask the oracle agent to regenerate, or rebuild the card upstream."))), (status === "ready" || status === "approved") && hasPreview && domainPreviewData && /* @__PURE__ */ React330.createElement(Box66, { p: "md", style: { backgroundColor: "var(--mantine-color-dark-6)", borderRadius: 8 } }, domainCardRenderer ? domainCardRenderer(domainPreviewData) : /* @__PURE__ */ React330.createElement(JsonViewer2, { data: domainPreviewData })), (status === "ready" || status === "approved") && !hasPreview && domainCardData && /* @__PURE__ */ React330.createElement(Alert78, { color: "yellow", variant: "light", styles: actionAlertStyles }, /* @__PURE__ */ React330.createElement(Text212, { size: "sm" }, "No human-facing preview was published by the oracle. You can still approve the underlying card, but consider asking the oracle agent to publish", " ", /* @__PURE__ */ React330.createElement("code", null, "domainPreviewData"), ".")), status === "pending" && /* @__PURE__ */ React330.createElement(Stack224, { gap: "sm" }, /* @__PURE__ */ React330.createElement(Alert78, { color: "gray", variant: "light", styles: actionAlertStyles }, /* @__PURE__ */ React330.createElement(Text212, { size: "sm" }, "No preview yet. Ask companion to generate a domain card and gather the setup details.")), /* @__PURE__ */ React330.createElement(
|
|
36603
36645
|
Button73,
|
|
36604
36646
|
{
|
|
36605
36647
|
leftSection: isAskingCompanion ? /* @__PURE__ */ React330.createElement(Loader70, { size: 14 }) : /* @__PURE__ */ React330.createElement(IconSparkles8, { size: 16 }),
|
|
@@ -37374,7 +37416,7 @@ import { Divider as Divider26, Stack as Stack235, Text as Text220 } from "@manti
|
|
|
37374
37416
|
|
|
37375
37417
|
// src/mantine/blocks/action/actionTypes/_shared/ConnectionSelector.tsx
|
|
37376
37418
|
import React340, { useCallback as useCallback132, useEffect as useEffect130, useMemo as useMemo132, useRef as useRef46, useState as useState189 } from "react";
|
|
37377
|
-
import { Alert as Alert83, Button as Button76, Group as
|
|
37419
|
+
import { Alert as Alert83, Button as Button76, Group as Group124, Loader as Loader74, Stack as Stack234, Text as Text219 } from "@mantine/core";
|
|
37378
37420
|
import { IconPlug, IconRefresh as IconRefresh10 } from "@tabler/icons-react";
|
|
37379
37421
|
var POLL_INTERVAL_MS2 = 2e3;
|
|
37380
37422
|
var CONNECT_TIMEOUT_MS = 12e4;
|
|
@@ -37513,7 +37555,7 @@ var ConnectionSelector = ({ toolkit, toolkitLabel, value, onChange, disabled })
|
|
|
37513
37555
|
[connections]
|
|
37514
37556
|
);
|
|
37515
37557
|
const mismatch = value && entityDid && value.entityDid && value.entityDid !== entityDid;
|
|
37516
|
-
return /* @__PURE__ */ React340.createElement(Stack234, { gap: "xs" }, /* @__PURE__ */ React340.createElement(
|
|
37558
|
+
return /* @__PURE__ */ React340.createElement(Stack234, { gap: "xs" }, /* @__PURE__ */ React340.createElement(Group124, { justify: "space-between", align: "flex-end" }, /* @__PURE__ */ React340.createElement(Text219, { size: "sm", fw: 600 }, toolkitLabel, " connection"), /* @__PURE__ */ React340.createElement(Button76, { size: "xs", variant: "subtle", leftSection: /* @__PURE__ */ React340.createElement(IconRefresh10, { size: 14 }), onClick: loadConnections, disabled: loading || disabled }, "Refresh")), mismatch && /* @__PURE__ */ React340.createElement(Alert83, { color: "yellow", styles: actionAlertStyles }, "This block was configured for a different workspace. Reconnect ", toolkitLabel, " to use it here."), /* @__PURE__ */ React340.createElement(
|
|
37517
37559
|
BaseSelect,
|
|
37518
37560
|
{
|
|
37519
37561
|
placeholder: loading ? `Loading ${toolkitLabel} connections...` : options.length ? `Select a ${toolkitLabel} connection` : hasLoaded ? `No ${toolkitLabel} connections yet` : `Refresh to load ${toolkitLabel} connections`,
|
|
@@ -38067,7 +38109,7 @@ import { IconCalendarStats } from "@tabler/icons-react";
|
|
|
38067
38109
|
|
|
38068
38110
|
// src/mantine/blocks/action/actionTypes/calendar/eventList/CalendarEventListConfig.tsx
|
|
38069
38111
|
import React345, { useCallback as useCallback137, useEffect as useEffect135, useState as useState194 } from "react";
|
|
38070
|
-
import { Divider as Divider28, Group as
|
|
38112
|
+
import { Divider as Divider28, Group as Group125, Stack as Stack239, Switch as Switch13, Text as Text224 } from "@mantine/core";
|
|
38071
38113
|
|
|
38072
38114
|
// src/core/lib/actionRegistry/actions/calendar/eventList.types.ts
|
|
38073
38115
|
var EMPTY3 = {
|
|
@@ -38160,7 +38202,7 @@ var CalendarEventListConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
38160
38202
|
editorDocument,
|
|
38161
38203
|
currentBlockId: blockId
|
|
38162
38204
|
}
|
|
38163
|
-
), /* @__PURE__ */ React345.createElement(
|
|
38205
|
+
), /* @__PURE__ */ React345.createElement(Group125, { grow: true, align: "flex-end" }, /* @__PURE__ */ React345.createElement(
|
|
38164
38206
|
DataInput,
|
|
38165
38207
|
{
|
|
38166
38208
|
label: "Max results",
|
|
@@ -38181,7 +38223,7 @@ var CalendarEventListConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
38181
38223
|
value: local.orderBy || "startTime",
|
|
38182
38224
|
onChange: (value) => update({ orderBy: value || "startTime" })
|
|
38183
38225
|
}
|
|
38184
|
-
)), /* @__PURE__ */ React345.createElement(
|
|
38226
|
+
)), /* @__PURE__ */ React345.createElement(Switch13, { label: "Expand recurring events into instances", checked: local.singleEvents, onChange: (e) => update({ singleEvents: e.currentTarget.checked }) })));
|
|
38185
38227
|
};
|
|
38186
38228
|
|
|
38187
38229
|
// src/mantine/blocks/action/actionTypes/calendar/eventList/CalendarEventListFlowDetail.tsx
|
|
@@ -38239,7 +38281,7 @@ import { IconUserPlus as IconUserPlus3 } from "@tabler/icons-react";
|
|
|
38239
38281
|
|
|
38240
38282
|
// src/mantine/blocks/action/actionTypes/xero/contactCreate/XeroContactCreateConfig.tsx
|
|
38241
38283
|
import React347, { useCallback as useCallback139, useEffect as useEffect136, useState as useState196 } from "react";
|
|
38242
|
-
import { Divider as Divider29, Group as
|
|
38284
|
+
import { Divider as Divider29, Group as Group126, Stack as Stack241, Switch as Switch14, Text as Text225 } from "@mantine/core";
|
|
38243
38285
|
|
|
38244
38286
|
// src/core/lib/actionRegistry/actions/xero/contactCreate.types.ts
|
|
38245
38287
|
var EMPTY4 = {
|
|
@@ -38325,7 +38367,7 @@ var XeroContactCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
38325
38367
|
currentBlockId: blockId,
|
|
38326
38368
|
required: true
|
|
38327
38369
|
}
|
|
38328
|
-
), /* @__PURE__ */ React347.createElement(
|
|
38370
|
+
), /* @__PURE__ */ React347.createElement(Group126, { grow: true }, /* @__PURE__ */ React347.createElement(DataInput, { label: "First name", value: local.FirstName, onChange: (value) => update({ FirstName: value }), editorDocument, currentBlockId: blockId }), /* @__PURE__ */ React347.createElement(DataInput, { label: "Last name", value: local.LastName, onChange: (value) => update({ LastName: value }), editorDocument, currentBlockId: blockId })), /* @__PURE__ */ React347.createElement(DataInput, { label: "Email", value: local.EmailAddress, onChange: (value) => update({ EmailAddress: value }), editorDocument, currentBlockId: blockId }), /* @__PURE__ */ React347.createElement(Group126, { grow: true }, /* @__PURE__ */ React347.createElement(DataInput, { label: "Phone", value: local.phone_number, onChange: (value) => update({ phone_number: value }), editorDocument, currentBlockId: blockId }), /* @__PURE__ */ React347.createElement(DataInput, { label: "Mobile", value: local.mobile_number, onChange: (value) => update({ mobile_number: value }), editorDocument, currentBlockId: blockId })), /* @__PURE__ */ React347.createElement(DataInput, { label: "Website", value: local.Website, onChange: (value) => update({ Website: value }), editorDocument, currentBlockId: blockId })), /* @__PURE__ */ React347.createElement(Divider29, { variant: "dashed" }), /* @__PURE__ */ React347.createElement(Stack241, { gap: "md" }, /* @__PURE__ */ React347.createElement(Text225, { size: "sm", fw: 600 }, "Billing"), /* @__PURE__ */ React347.createElement(Group126, { grow: true }, /* @__PURE__ */ React347.createElement(DataInput, { label: "Tax number", value: local.TaxNumber, onChange: (value) => update({ TaxNumber: value }), editorDocument, currentBlockId: blockId }), /* @__PURE__ */ React347.createElement(
|
|
38329
38371
|
DataInput,
|
|
38330
38372
|
{
|
|
38331
38373
|
label: "Account number",
|
|
@@ -38353,7 +38395,7 @@ var XeroContactCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
38353
38395
|
editorDocument,
|
|
38354
38396
|
currentBlockId: blockId
|
|
38355
38397
|
}
|
|
38356
|
-
), /* @__PURE__ */ React347.createElement(
|
|
38398
|
+
), /* @__PURE__ */ React347.createElement(Group126, null, /* @__PURE__ */ React347.createElement(Switch14, { label: "Customer", checked: local.IsCustomer, onChange: (e) => update({ IsCustomer: e.currentTarget.checked }) }), /* @__PURE__ */ React347.createElement(Switch14, { label: "Supplier", checked: local.IsSupplier, onChange: (e) => update({ IsSupplier: e.currentTarget.checked }) }))));
|
|
38357
38399
|
};
|
|
38358
38400
|
|
|
38359
38401
|
// src/mantine/blocks/action/actionTypes/xero/contactCreate/XeroContactCreateFlowDetail.tsx
|
|
@@ -38458,11 +38500,127 @@ import { IconReceipt } from "@tabler/icons-react";
|
|
|
38458
38500
|
|
|
38459
38501
|
// src/mantine/blocks/action/actionTypes/xero/invoiceCreate/XeroInvoiceCreateConfig.tsx
|
|
38460
38502
|
import React350, { useCallback as useCallback142, useEffect as useEffect138, useState as useState198 } from "react";
|
|
38461
|
-
import { Divider as Divider31, Group as
|
|
38503
|
+
import { Divider as Divider31, Group as Group128, Stack as Stack244, Text as Text228 } from "@mantine/core";
|
|
38504
|
+
|
|
38505
|
+
// src/core/lib/actionRegistry/actions/xero/invoiceCreate.types.ts
|
|
38506
|
+
var LINE_ITEM_FIELD_KEYS = ["Description", "Quantity", "UnitAmount", "AccountCode", "TaxType", "ItemCode", "DiscountRate"];
|
|
38507
|
+
function emptyLineItemCells() {
|
|
38508
|
+
return {
|
|
38509
|
+
Description: "",
|
|
38510
|
+
Quantity: "1",
|
|
38511
|
+
UnitAmount: "",
|
|
38512
|
+
AccountCode: "",
|
|
38513
|
+
TaxType: "",
|
|
38514
|
+
ItemCode: "",
|
|
38515
|
+
DiscountRate: ""
|
|
38516
|
+
};
|
|
38517
|
+
}
|
|
38518
|
+
function emptyLineItems() {
|
|
38519
|
+
return { mode: "manual", rows: [emptyLineItemCells()] };
|
|
38520
|
+
}
|
|
38521
|
+
function coerceCells(raw) {
|
|
38522
|
+
const base = emptyLineItemCells();
|
|
38523
|
+
if (!raw || typeof raw !== "object") return base;
|
|
38524
|
+
for (const key of LINE_ITEM_FIELD_KEYS) {
|
|
38525
|
+
const v = raw[key];
|
|
38526
|
+
if (typeof v === "string") base[key] = v;
|
|
38527
|
+
else if (typeof v === "number") base[key] = String(v);
|
|
38528
|
+
else if (typeof v === "boolean") base[key] = v ? "true" : "false";
|
|
38529
|
+
}
|
|
38530
|
+
return base;
|
|
38531
|
+
}
|
|
38532
|
+
function normaliseLineItems(raw) {
|
|
38533
|
+
if (raw && typeof raw === "object") {
|
|
38534
|
+
const candidate = raw;
|
|
38535
|
+
if (candidate.mode === "iterative") {
|
|
38536
|
+
return {
|
|
38537
|
+
mode: "iterative",
|
|
38538
|
+
source: typeof candidate.source === "string" ? candidate.source : "",
|
|
38539
|
+
map: coerceCells(candidate.map)
|
|
38540
|
+
};
|
|
38541
|
+
}
|
|
38542
|
+
if (candidate.mode === "manual") {
|
|
38543
|
+
const rows = Array.isArray(candidate.rows) ? candidate.rows.map(coerceCells) : [];
|
|
38544
|
+
return { mode: "manual", rows: rows.length > 0 ? rows : [emptyLineItemCells()] };
|
|
38545
|
+
}
|
|
38546
|
+
}
|
|
38547
|
+
if (typeof raw === "string") {
|
|
38548
|
+
const trimmed = raw.trim();
|
|
38549
|
+
if (!trimmed) return emptyLineItems();
|
|
38550
|
+
try {
|
|
38551
|
+
const parsed = JSON.parse(trimmed);
|
|
38552
|
+
if (Array.isArray(parsed) && parsed.length > 0) {
|
|
38553
|
+
return { mode: "manual", rows: parsed.map(coerceCells) };
|
|
38554
|
+
}
|
|
38555
|
+
} catch {
|
|
38556
|
+
}
|
|
38557
|
+
}
|
|
38558
|
+
return emptyLineItems();
|
|
38559
|
+
}
|
|
38560
|
+
function parseXeroInvoiceCreateInputs(raw) {
|
|
38561
|
+
try {
|
|
38562
|
+
const parsed = typeof raw === "string" ? JSON.parse(raw || "{}") : raw || {};
|
|
38563
|
+
const conn = parsed.connection;
|
|
38564
|
+
const connection = conn && typeof conn === "object" && typeof conn.connectedAccountId === "string" && typeof conn.entityDid === "string" ? { connectedAccountId: conn.connectedAccountId, entityDid: conn.entityDid } : null;
|
|
38565
|
+
return {
|
|
38566
|
+
connection,
|
|
38567
|
+
tenant_id: typeof parsed.tenant_id === "string" ? parsed.tenant_id : "",
|
|
38568
|
+
Type: typeof parsed.Type === "string" && parsed.Type ? parsed.Type : "ACCREC",
|
|
38569
|
+
Status: typeof parsed.Status === "string" ? parsed.Status : "DRAFT",
|
|
38570
|
+
Date: typeof parsed.Date === "string" ? parsed.Date : "",
|
|
38571
|
+
DueDate: typeof parsed.DueDate === "string" ? parsed.DueDate : "",
|
|
38572
|
+
ContactID: typeof parsed.ContactID === "string" ? parsed.ContactID : "",
|
|
38573
|
+
ContactName: typeof parsed.ContactName === "string" ? parsed.ContactName : "",
|
|
38574
|
+
Reference: typeof parsed.Reference === "string" ? parsed.Reference : "",
|
|
38575
|
+
InvoiceNumber: typeof parsed.InvoiceNumber === "string" ? parsed.InvoiceNumber : "",
|
|
38576
|
+
CurrencyCode: typeof parsed.CurrencyCode === "string" ? parsed.CurrencyCode : "",
|
|
38577
|
+
LineItems: normaliseLineItems(parsed.LineItems)
|
|
38578
|
+
};
|
|
38579
|
+
} catch {
|
|
38580
|
+
return {
|
|
38581
|
+
connection: null,
|
|
38582
|
+
tenant_id: "",
|
|
38583
|
+
Type: "ACCREC",
|
|
38584
|
+
Status: "DRAFT",
|
|
38585
|
+
Date: "",
|
|
38586
|
+
DueDate: "",
|
|
38587
|
+
ContactID: "",
|
|
38588
|
+
ContactName: "",
|
|
38589
|
+
Reference: "",
|
|
38590
|
+
InvoiceNumber: "",
|
|
38591
|
+
CurrencyCode: "",
|
|
38592
|
+
LineItems: emptyLineItems()
|
|
38593
|
+
};
|
|
38594
|
+
}
|
|
38595
|
+
}
|
|
38596
|
+
function serializeXeroInvoiceCreateInputs(inputs) {
|
|
38597
|
+
return JSON.stringify(inputs);
|
|
38598
|
+
}
|
|
38599
|
+
var NUMERIC_LINE_ITEM_FIELDS = ["Quantity", "UnitAmount", "DiscountRate"];
|
|
38600
|
+
function finaliseLineItem(cells) {
|
|
38601
|
+
const out = {};
|
|
38602
|
+
for (const key of LINE_ITEM_FIELD_KEYS) {
|
|
38603
|
+
const raw = (cells[key] ?? "").trim();
|
|
38604
|
+
if (!raw) continue;
|
|
38605
|
+
if (NUMERIC_LINE_ITEM_FIELDS.includes(key)) {
|
|
38606
|
+
const n = Number(raw);
|
|
38607
|
+
if (!Number.isFinite(n)) {
|
|
38608
|
+
throw new Error(`Line item field ${key} must be a number; got "${raw}"`);
|
|
38609
|
+
}
|
|
38610
|
+
out[key] = n;
|
|
38611
|
+
} else {
|
|
38612
|
+
out[key] = raw;
|
|
38613
|
+
}
|
|
38614
|
+
}
|
|
38615
|
+
if (!out.Description) {
|
|
38616
|
+
out.Description = "payment";
|
|
38617
|
+
}
|
|
38618
|
+
return out;
|
|
38619
|
+
}
|
|
38462
38620
|
|
|
38463
38621
|
// src/mantine/blocks/action/actionTypes/xero/invoiceCreate/XeroLineItemsEditor.tsx
|
|
38464
38622
|
import React349, { useCallback as useCallback141, useMemo as useMemo137 } from "react";
|
|
38465
|
-
import { ActionIcon as ActionIcon48, Alert as Alert88, Box as Box67, Button as Button78, Collapse as Collapse10, Divider as Divider30, Group as
|
|
38623
|
+
import { ActionIcon as ActionIcon48, Alert as Alert88, Box as Box67, Button as Button78, Collapse as Collapse10, Divider as Divider30, Group as Group127, SegmentedControl as SegmentedControl18, Stack as Stack243, Text as Text227, Tooltip as Tooltip32 } from "@mantine/core";
|
|
38466
38624
|
import { useDisclosure as useDisclosure6 } from "@mantine/hooks";
|
|
38467
38625
|
import { IconChevronDown as IconChevronDown10, IconChevronRight as IconChevronRight12, IconPlus as IconPlus10, IconTrash as IconTrash11 } from "@tabler/icons-react";
|
|
38468
38626
|
function getNestedField(fields, path) {
|
|
@@ -38498,7 +38656,7 @@ function XeroLineItemsEditor({ value, onChange, editorDocument, currentBlockId }
|
|
|
38498
38656
|
},
|
|
38499
38657
|
[value, onChange]
|
|
38500
38658
|
);
|
|
38501
|
-
return /* @__PURE__ */ React349.createElement(Stack243, { gap: "sm" }, /* @__PURE__ */ React349.createElement(
|
|
38659
|
+
return /* @__PURE__ */ React349.createElement(Stack243, { gap: "sm" }, /* @__PURE__ */ React349.createElement(Group127, { justify: "space-between", align: "center" }, /* @__PURE__ */ React349.createElement(Text227, { size: "sm", fw: 600 }, "Line items"), /* @__PURE__ */ React349.createElement(
|
|
38502
38660
|
SegmentedControl18,
|
|
38503
38661
|
{
|
|
38504
38662
|
size: "xs",
|
|
@@ -38569,7 +38727,7 @@ function LineItemRowCard({
|
|
|
38569
38727
|
background: "var(--mantine-color-neutralColor-2)"
|
|
38570
38728
|
}
|
|
38571
38729
|
},
|
|
38572
|
-
/* @__PURE__ */ React349.createElement(
|
|
38730
|
+
/* @__PURE__ */ React349.createElement(Group127, { justify: "space-between", align: "center", mb: "xs" }, /* @__PURE__ */ React349.createElement(Text227, { size: "xs", c: "dimmed", fw: 600 }, "Line item ", index + 1), canRemove && onRemove && /* @__PURE__ */ React349.createElement(Tooltip32, { label: "Remove", withArrow: true }, /* @__PURE__ */ React349.createElement(ActionIcon48, { size: "sm", variant: "subtle", color: "red", onClick: onRemove }, /* @__PURE__ */ React349.createElement(IconTrash11, { size: 14 })))),
|
|
38573
38731
|
/* @__PURE__ */ React349.createElement(Stack243, { gap: "xs" }, /* @__PURE__ */ React349.createElement(
|
|
38574
38732
|
DataInput,
|
|
38575
38733
|
{
|
|
@@ -38582,7 +38740,7 @@ function LineItemRowCard({
|
|
|
38582
38740
|
itemScope,
|
|
38583
38741
|
required: true
|
|
38584
38742
|
}
|
|
38585
|
-
), /* @__PURE__ */ React349.createElement(
|
|
38743
|
+
), /* @__PURE__ */ React349.createElement(Group127, { grow: true }, /* @__PURE__ */ React349.createElement(
|
|
38586
38744
|
DataInput,
|
|
38587
38745
|
{
|
|
38588
38746
|
label: "Quantity",
|
|
@@ -38732,7 +38890,7 @@ var XeroInvoiceCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
38732
38890
|
editorDocument,
|
|
38733
38891
|
currentBlockId: blockId
|
|
38734
38892
|
}
|
|
38735
|
-
), /* @__PURE__ */ React350.createElement(Divider31, { variant: "dashed" }), /* @__PURE__ */ React350.createElement(Stack244, { gap: "md" }, /* @__PURE__ */ React350.createElement(Text228, { size: "sm", fw: 600 }, "Invoice"), /* @__PURE__ */ React350.createElement(
|
|
38893
|
+
), /* @__PURE__ */ React350.createElement(Divider31, { variant: "dashed" }), /* @__PURE__ */ React350.createElement(Stack244, { gap: "md" }, /* @__PURE__ */ React350.createElement(Text228, { size: "sm", fw: 600 }, "Invoice"), /* @__PURE__ */ React350.createElement(Group128, { grow: true }, /* @__PURE__ */ React350.createElement(
|
|
38736
38894
|
BaseSelect,
|
|
38737
38895
|
{
|
|
38738
38896
|
label: "Type",
|
|
@@ -38755,7 +38913,7 @@ var XeroInvoiceCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
38755
38913
|
value: local.Status || "DRAFT",
|
|
38756
38914
|
onChange: (value) => update({ Status: value || "DRAFT" })
|
|
38757
38915
|
}
|
|
38758
|
-
)), /* @__PURE__ */ React350.createElement(
|
|
38916
|
+
)), /* @__PURE__ */ React350.createElement(Group128, { grow: true }, /* @__PURE__ */ React350.createElement(
|
|
38759
38917
|
DataInput,
|
|
38760
38918
|
{
|
|
38761
38919
|
label: "Contact ID",
|
|
@@ -38774,7 +38932,7 @@ var XeroInvoiceCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
38774
38932
|
editorDocument,
|
|
38775
38933
|
currentBlockId: blockId
|
|
38776
38934
|
}
|
|
38777
|
-
)), /* @__PURE__ */ React350.createElement(
|
|
38935
|
+
)), /* @__PURE__ */ React350.createElement(Group128, { grow: true }, /* @__PURE__ */ React350.createElement(
|
|
38778
38936
|
DataInput,
|
|
38779
38937
|
{
|
|
38780
38938
|
label: "Issue date",
|
|
@@ -38794,7 +38952,7 @@ var XeroInvoiceCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
38794
38952
|
editorDocument,
|
|
38795
38953
|
currentBlockId: blockId
|
|
38796
38954
|
}
|
|
38797
|
-
)), /* @__PURE__ */ React350.createElement(
|
|
38955
|
+
)), /* @__PURE__ */ React350.createElement(Group128, { grow: true }, /* @__PURE__ */ React350.createElement(
|
|
38798
38956
|
DataInput,
|
|
38799
38957
|
{
|
|
38800
38958
|
label: "Invoice number",
|
|
@@ -38818,7 +38976,7 @@ var XeroInvoiceCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
38818
38976
|
|
|
38819
38977
|
// src/mantine/blocks/action/actionTypes/xero/invoiceCreate/XeroInvoiceCreateFlowDetail.tsx
|
|
38820
38978
|
import React351, { useCallback as useCallback144, useEffect as useEffect141, useMemo as useMemo139, useState as useState201 } from "react";
|
|
38821
|
-
import { Alert as Alert89, Badge as Badge57, Box as Box68, Button as Button79, Group as
|
|
38979
|
+
import { Alert as Alert89, Badge as Badge57, Box as Box68, Button as Button79, Group as Group129, Stack as Stack245, Text as Text229 } from "@mantine/core";
|
|
38822
38980
|
import { IconX as IconX19 } from "@tabler/icons-react";
|
|
38823
38981
|
|
|
38824
38982
|
// src/mantine/hooks/useXeroWorkItems.ts
|
|
@@ -38835,6 +38993,115 @@ function useXeroWorkItems(editor, filter) {
|
|
|
38835
38993
|
return useMemo138(() => findXeroWorkItemsForEditor(editor, filter), [editor, filter.kind, filter.assignedBlockId, filter.statuses?.join("|"), rev]);
|
|
38836
38994
|
}
|
|
38837
38995
|
|
|
38996
|
+
// src/core/lib/actionRegistry/actions/xero/paymentCreate.types.ts
|
|
38997
|
+
function parseXeroPaymentCreateInputs(raw) {
|
|
38998
|
+
try {
|
|
38999
|
+
const parsed = typeof raw === "string" ? JSON.parse(raw || "{}") : raw || {};
|
|
39000
|
+
const conn = parsed.connection;
|
|
39001
|
+
const connection = conn && typeof conn === "object" && typeof conn.connectedAccountId === "string" && typeof conn.entityDid === "string" ? { connectedAccountId: conn.connectedAccountId, entityDid: conn.entityDid } : null;
|
|
39002
|
+
return {
|
|
39003
|
+
connection,
|
|
39004
|
+
tenant_id: typeof parsed.tenant_id === "string" ? parsed.tenant_id : "",
|
|
39005
|
+
InvoiceID: typeof parsed.InvoiceID === "string" ? parsed.InvoiceID : "",
|
|
39006
|
+
AccountID: typeof parsed.AccountID === "string" ? parsed.AccountID : "",
|
|
39007
|
+
Date: typeof parsed.Date === "string" ? parsed.Date : "",
|
|
39008
|
+
Amount: typeof parsed.Amount === "string" ? parsed.Amount : typeof parsed.Amount === "number" ? String(parsed.Amount) : "",
|
|
39009
|
+
Reference: typeof parsed.Reference === "string" ? parsed.Reference : "",
|
|
39010
|
+
CurrencyRate: typeof parsed.CurrencyRate === "string" ? parsed.CurrencyRate : ""
|
|
39011
|
+
};
|
|
39012
|
+
} catch {
|
|
39013
|
+
return {
|
|
39014
|
+
connection: null,
|
|
39015
|
+
tenant_id: "",
|
|
39016
|
+
InvoiceID: "",
|
|
39017
|
+
AccountID: "",
|
|
39018
|
+
Date: "",
|
|
39019
|
+
Amount: "",
|
|
39020
|
+
Reference: "",
|
|
39021
|
+
CurrencyRate: ""
|
|
39022
|
+
};
|
|
39023
|
+
}
|
|
39024
|
+
}
|
|
39025
|
+
function serializeXeroPaymentCreateInputs(inputs) {
|
|
39026
|
+
return JSON.stringify(inputs);
|
|
39027
|
+
}
|
|
39028
|
+
|
|
39029
|
+
// src/core/lib/xeroWorkItemPayloads.ts
|
|
39030
|
+
function buildClaimScope(claim, claimData, evaluateBlockId, evaluateContext) {
|
|
39031
|
+
const surveyAnswers = claimData && typeof claimData === "object" ? claimData.credentialSubject ?? claimData.surveyAnswers ?? claimData : {};
|
|
39032
|
+
const evaluationOutput = evaluateContext?.evaluationOutput ?? {};
|
|
39033
|
+
const scope = {
|
|
39034
|
+
claim: {
|
|
39035
|
+
claimId: claim?.claimId || evaluationOutput.claimId || "",
|
|
39036
|
+
agentDid: claim?.agentDid || "",
|
|
39037
|
+
agentAddress: claim?.agentAddress || "",
|
|
39038
|
+
submissionDate: claim?.submissionDate || "",
|
|
39039
|
+
surveyAnswers,
|
|
39040
|
+
...surveyAnswers
|
|
39041
|
+
},
|
|
39042
|
+
evaluation: {
|
|
39043
|
+
transactionHash: evaluationOutput.transactionHash || "",
|
|
39044
|
+
amount: evaluationOutput.amount || "",
|
|
39045
|
+
date: (/* @__PURE__ */ new Date()).toISOString().slice(0, 10)
|
|
39046
|
+
}
|
|
39047
|
+
};
|
|
39048
|
+
const trimmedId = String(evaluateBlockId || "").trim();
|
|
39049
|
+
if (trimmedId) {
|
|
39050
|
+
scope[trimmedId] = {
|
|
39051
|
+
output: {
|
|
39052
|
+
claimId: claim?.claimId || evaluationOutput.claimId || "",
|
|
39053
|
+
collectionId: evaluateContext?.collectionId || "",
|
|
39054
|
+
deedDid: evaluateContext?.deedDid || "",
|
|
39055
|
+
surveyAnswers,
|
|
39056
|
+
...evaluationOutput
|
|
39057
|
+
}
|
|
39058
|
+
};
|
|
39059
|
+
}
|
|
39060
|
+
return scope;
|
|
39061
|
+
}
|
|
39062
|
+
async function resolvePaymentWorkPayload(block, editorDocument, baseScope, settlement) {
|
|
39063
|
+
const parsed = parseXeroPaymentCreateInputs(block?.props?.inputs);
|
|
39064
|
+
const scope = {
|
|
39065
|
+
...baseScope,
|
|
39066
|
+
invoice: { invoiceId: settlement.invoiceId, InvoiceID: settlement.invoiceId },
|
|
39067
|
+
evaluation: {
|
|
39068
|
+
transactionHash: settlement.transactionHash,
|
|
39069
|
+
amount: settlement.amount,
|
|
39070
|
+
date: settlement.date || (/* @__PURE__ */ new Date()).toISOString().slice(0, 10)
|
|
39071
|
+
}
|
|
39072
|
+
};
|
|
39073
|
+
const opts = { scope };
|
|
39074
|
+
const resolveStr = (v) => resolveReferences(v || "", editorDocument, opts);
|
|
39075
|
+
const currencyRateRaw = resolveStr(parsed.CurrencyRate);
|
|
39076
|
+
const currencyRate = currencyRateRaw ? Number(currencyRateRaw) : void 0;
|
|
39077
|
+
const amountRaw = resolveStr(parsed.Amount);
|
|
39078
|
+
const amount = Number.isFinite(Number(amountRaw)) && Number(amountRaw) > 0 ? Number(amountRaw) : settlement.amount;
|
|
39079
|
+
const payload = {
|
|
39080
|
+
connection: parsed.connection,
|
|
39081
|
+
tenant_id: resolveStr(parsed.tenant_id),
|
|
39082
|
+
InvoiceID: resolveStr(parsed.InvoiceID) || settlement.invoiceId,
|
|
39083
|
+
AccountID: resolveStr(parsed.AccountID),
|
|
39084
|
+
Date: resolveStr(parsed.Date) || settlement.date || (/* @__PURE__ */ new Date()).toISOString().slice(0, 10),
|
|
39085
|
+
Amount: amount,
|
|
39086
|
+
Reference: resolveStr(parsed.Reference) || settlement.transactionHash,
|
|
39087
|
+
CurrencyRate: typeof currencyRate === "number" && Number.isFinite(currencyRate) ? currencyRate : void 0
|
|
39088
|
+
};
|
|
39089
|
+
let preview = [];
|
|
39090
|
+
const resolver = getDiffResolver("qi/xero.payment.create");
|
|
39091
|
+
if (resolver) {
|
|
39092
|
+
try {
|
|
39093
|
+
preview = await resolver.resolver({ ...payload, Amount: String(payload.Amount) }, {});
|
|
39094
|
+
} catch {
|
|
39095
|
+
preview = [];
|
|
39096
|
+
}
|
|
39097
|
+
}
|
|
39098
|
+
return { payload, preview };
|
|
39099
|
+
}
|
|
39100
|
+
function getInvoiceTotal(output) {
|
|
39101
|
+
const total = typeof output.total === "number" ? output.total : Number(output.total);
|
|
39102
|
+
return Number.isFinite(total) && total > 0 ? total : 0;
|
|
39103
|
+
}
|
|
39104
|
+
|
|
38838
39105
|
// src/mantine/blocks/action/actionTypes/xero/_shared/useFlowXeroConnection.ts
|
|
38839
39106
|
import { useCallback as useCallback143, useEffect as useEffect140, useState as useState200 } from "react";
|
|
38840
39107
|
var CONNECTION_KEY = "connection";
|
|
@@ -39116,7 +39383,6 @@ var XeroInvoiceCreateFlowDetail = ({
|
|
|
39116
39383
|
flowId,
|
|
39117
39384
|
evaluationBlockId: completed.source.evaluationBlockId,
|
|
39118
39385
|
claimId: completed.source.claimId,
|
|
39119
|
-
paymentBlockId: paymentBlock.id,
|
|
39120
39386
|
invoiceWorkItemId: completed.id
|
|
39121
39387
|
});
|
|
39122
39388
|
upsertXeroWorkItemForEditor(editor, {
|
|
@@ -39165,7 +39431,7 @@ var XeroInvoiceCreateFlowDetail = ({
|
|
|
39165
39431
|
if (!provideSigningHandler) return;
|
|
39166
39432
|
provideSigningHandler(execute);
|
|
39167
39433
|
}, [provideSigningHandler, execute]);
|
|
39168
|
-
return /* @__PURE__ */ React351.createElement(Stack245, { gap: "md" }, !hasConnection && !selectedWorkItemCompleted && /* @__PURE__ */ React351.createElement(ConnectionSelector, { toolkit: "xero", toolkitLabel: "Xero", value: flowConnection, onChange: setFlowConnection }), entityMismatch && /* @__PURE__ */ React351.createElement(Alert89, { color: "yellow", styles: actionAlertStyles }, "This block was configured for a different workspace. Reconnect Xero to use it here."), workItems.length > 0 && /* @__PURE__ */ React351.createElement(Stack245, { gap: "sm" }, /* @__PURE__ */ React351.createElement(
|
|
39434
|
+
return /* @__PURE__ */ React351.createElement(Stack245, { gap: "md" }, !hasConnection && !selectedWorkItemCompleted && /* @__PURE__ */ React351.createElement(ConnectionSelector, { toolkit: "xero", toolkitLabel: "Xero", value: flowConnection, onChange: setFlowConnection }), entityMismatch && /* @__PURE__ */ React351.createElement(Alert89, { color: "yellow", styles: actionAlertStyles }, "This block was configured for a different workspace. Reconnect Xero to use it here."), workItems.length > 0 && /* @__PURE__ */ React351.createElement(Stack245, { gap: "sm" }, /* @__PURE__ */ React351.createElement(Group129, { justify: "space-between", align: "center" }, /* @__PURE__ */ React351.createElement(Text229, { size: "sm", fw: 600 }, "Invoices"), /* @__PURE__ */ React351.createElement(Badge57, { variant: "light", color: "gray" }, workItems.length)), workItems.map((item) => /* @__PURE__ */ React351.createElement(
|
|
39169
39435
|
Box68,
|
|
39170
39436
|
{
|
|
39171
39437
|
key: item.id,
|
|
@@ -39176,7 +39442,7 @@ var XeroInvoiceCreateFlowDetail = ({
|
|
|
39176
39442
|
background: selectedWorkItem?.id === item.id ? "rgba(42, 234, 179, 0.08)" : "var(--mantine-color-neutralColor-5)"
|
|
39177
39443
|
}
|
|
39178
39444
|
},
|
|
39179
|
-
/* @__PURE__ */ React351.createElement(
|
|
39445
|
+
/* @__PURE__ */ React351.createElement(Group129, { justify: "space-between", align: "flex-start", gap: "md", wrap: "nowrap" }, /* @__PURE__ */ React351.createElement(Stack245, { gap: 4, style: { minWidth: 0, flex: 1 } }, /* @__PURE__ */ React351.createElement(Group129, { gap: "xs", wrap: "wrap" }, /* @__PURE__ */ React351.createElement(Text229, { size: "sm", fw: 600 }, String(item.reviewPayload?.InvoiceNumber || item.reviewPayload?.Reference || item.reviewPayload?.ContactName || "Invoice work")), /* @__PURE__ */ React351.createElement(Badge57, { size: "xs", color: item.status === "completed" ? "green" : item.status === "failed" ? "red" : "blue", variant: "light" }, item.status), /* @__PURE__ */ React351.createElement(Badge57, { size: "xs", color: "gray", variant: "outline" }, String(item.reviewPayload?.Type || "ACCREC"))), /* @__PURE__ */ React351.createElement(Text229, { size: "xs", c: "dimmed", truncate: true }, "Claim ", shortId(item.source.claimId), " \xB7 Contact ", String(item.reviewPayload?.ContactName || item.reviewPayload?.ContactID || "missing")), /* @__PURE__ */ React351.createElement(Group129, { gap: "md", wrap: "wrap" }, /* @__PURE__ */ React351.createElement(Text229, { size: "xs" }, "Total ", formatAmount(getLineTotal(item.reviewPayload?.LineItems), item.reviewPayload?.CurrencyCode)), item.reviewPayload?.DueDate && /* @__PURE__ */ React351.createElement(Text229, { size: "xs" }, "Due ", String(item.reviewPayload.DueDate)), /* @__PURE__ */ React351.createElement(Text229, { size: "xs" }, Array.isArray(item.reviewPayload?.LineItems) ? item.reviewPayload.LineItems.length : 0, " line item(s)"))), /* @__PURE__ */ React351.createElement(
|
|
39180
39446
|
Button79,
|
|
39181
39447
|
{
|
|
39182
39448
|
size: "xs",
|
|
@@ -39186,7 +39452,7 @@ var XeroInvoiceCreateFlowDetail = ({
|
|
|
39186
39452
|
},
|
|
39187
39453
|
selectedWorkItem?.id === item.id ? "Close" : item.status === "completed" ? "Open" : "Review"
|
|
39188
39454
|
))
|
|
39189
|
-
))), canShowDetail && /* @__PURE__ */ React351.createElement(Stack245, { gap: "sm" }, selectedWorkItem && /* @__PURE__ */ React351.createElement(
|
|
39455
|
+
))), canShowDetail && /* @__PURE__ */ React351.createElement(Stack245, { gap: "sm" }, selectedWorkItem && /* @__PURE__ */ React351.createElement(Group129, { justify: "space-between", align: "center" }, /* @__PURE__ */ React351.createElement(Text229, { size: "sm", fw: 600 }, selectedWorkItemCompleted ? "Completed invoice" : "Reviewing queued invoice"), /* @__PURE__ */ React351.createElement(Button79, { size: "xs", variant: "subtle", leftSection: /* @__PURE__ */ React351.createElement(IconX19, { size: 14 }), onClick: () => setSelectedWorkItemId("") }, "Close review")), selectedWorkItem && /* @__PURE__ */ React351.createElement(
|
|
39190
39456
|
BaseSelect,
|
|
39191
39457
|
{
|
|
39192
39458
|
label: "Status",
|
|
@@ -39239,7 +39505,7 @@ var XeroInvoiceCreateFlowDetail = ({
|
|
|
39239
39505
|
currentBlockId: block.id,
|
|
39240
39506
|
disabled: selectedWorkItemCompleted
|
|
39241
39507
|
}
|
|
39242
|
-
), selectedWorkItem && /* @__PURE__ */ React351.createElement(Stack245, { gap: "xs" }, /* @__PURE__ */ React351.createElement(
|
|
39508
|
+
), selectedWorkItem && /* @__PURE__ */ React351.createElement(Stack245, { gap: "xs" }, /* @__PURE__ */ React351.createElement(Group129, { justify: "space-between", align: "center" }, /* @__PURE__ */ React351.createElement(Text229, { size: "sm", fw: 600 }, "Line items"), /* @__PURE__ */ React351.createElement(Badge57, { color: lineItemsValidation.ok ? "green" : "yellow", variant: "light" }, lineItemsValidation.count)), reviewLineItems.map((item, index) => /* @__PURE__ */ React351.createElement(
|
|
39243
39509
|
Box68,
|
|
39244
39510
|
{
|
|
39245
39511
|
key: index,
|
|
@@ -39260,7 +39526,7 @@ var XeroInvoiceCreateFlowDetail = ({
|
|
|
39260
39526
|
currentBlockId: block.id,
|
|
39261
39527
|
disabled: selectedWorkItemCompleted
|
|
39262
39528
|
}
|
|
39263
|
-
), /* @__PURE__ */ React351.createElement(
|
|
39529
|
+
), /* @__PURE__ */ React351.createElement(Group129, { grow: true }, /* @__PURE__ */ React351.createElement(
|
|
39264
39530
|
DataInput,
|
|
39265
39531
|
{
|
|
39266
39532
|
label: "Quantity",
|
|
@@ -39290,7 +39556,7 @@ var XeroInvoiceCreateFlowDetail = ({
|
|
|
39290
39556
|
currentBlockId: block.id,
|
|
39291
39557
|
disabled: selectedWorkItemCompleted
|
|
39292
39558
|
}
|
|
39293
|
-
)), /* @__PURE__ */ React351.createElement(
|
|
39559
|
+
)), /* @__PURE__ */ React351.createElement(Group129, { grow: true }, /* @__PURE__ */ React351.createElement(
|
|
39294
39560
|
DataInput,
|
|
39295
39561
|
{
|
|
39296
39562
|
label: "Tax type",
|
|
@@ -39339,7 +39605,7 @@ import { IconListDetails as IconListDetails2 } from "@tabler/icons-react";
|
|
|
39339
39605
|
|
|
39340
39606
|
// src/mantine/blocks/action/actionTypes/xero/invoiceList/XeroInvoiceListConfig.tsx
|
|
39341
39607
|
import React352, { useCallback as useCallback145, useEffect as useEffect142, useState as useState202 } from "react";
|
|
39342
|
-
import { Divider as Divider32, Group as
|
|
39608
|
+
import { Divider as Divider32, Group as Group130, Stack as Stack246, Switch as Switch15, Text as Text230 } from "@mantine/core";
|
|
39343
39609
|
|
|
39344
39610
|
// src/core/lib/actionRegistry/actions/xero/invoiceList.types.ts
|
|
39345
39611
|
var EMPTY5 = {
|
|
@@ -39444,7 +39710,7 @@ var XeroInvoiceListConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
39444
39710
|
editorDocument,
|
|
39445
39711
|
currentBlockId: blockId
|
|
39446
39712
|
}
|
|
39447
|
-
), /* @__PURE__ */ React352.createElement(
|
|
39713
|
+
), /* @__PURE__ */ React352.createElement(Group130, { grow: true }, /* @__PURE__ */ React352.createElement(
|
|
39448
39714
|
DataInput,
|
|
39449
39715
|
{
|
|
39450
39716
|
label: "Order",
|
|
@@ -39454,7 +39720,7 @@ var XeroInvoiceListConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
39454
39720
|
editorDocument,
|
|
39455
39721
|
currentBlockId: blockId
|
|
39456
39722
|
}
|
|
39457
|
-
), /* @__PURE__ */ React352.createElement(DataInput, { label: "Page", placeholder: "1", value: local.page, onChange: (value) => update({ page: value }), editorDocument, currentBlockId: blockId })), /* @__PURE__ */ React352.createElement(
|
|
39723
|
+
), /* @__PURE__ */ React352.createElement(DataInput, { label: "Page", placeholder: "1", value: local.page, onChange: (value) => update({ page: value }), editorDocument, currentBlockId: blockId })), /* @__PURE__ */ React352.createElement(Group130, null, /* @__PURE__ */ React352.createElement(Switch15, { label: "Only invoices created by this app", checked: local.createdByMyApp, onChange: (e) => update({ createdByMyApp: e.currentTarget.checked }) }), /* @__PURE__ */ React352.createElement(Switch15, { label: "Include archived", checked: local.includeArchived, onChange: (e) => update({ includeArchived: e.currentTarget.checked }) }))));
|
|
39458
39724
|
};
|
|
39459
39725
|
|
|
39460
39726
|
// src/mantine/blocks/action/actionTypes/xero/invoiceList/XeroInvoiceListFlowDetail.tsx
|
|
@@ -39512,11 +39778,11 @@ import { IconReceipt as IconReceipt2 } from "@tabler/icons-react";
|
|
|
39512
39778
|
|
|
39513
39779
|
// src/mantine/blocks/action/actionTypes/xero/paymentCreate/XeroPaymentCreateConfig.tsx
|
|
39514
39780
|
import React355, { useCallback as useCallback148, useEffect as useEffect144, useState as useState205 } from "react";
|
|
39515
|
-
import { Divider as Divider33, Group as
|
|
39781
|
+
import { Divider as Divider33, Group as Group132, Stack as Stack249, Text as Text232 } from "@mantine/core";
|
|
39516
39782
|
|
|
39517
39783
|
// src/mantine/blocks/action/actionTypes/xero/_shared/XeroBankAccountPicker.tsx
|
|
39518
39784
|
import React354, { useCallback as useCallback147, useEffect as useEffect143, useRef as useRef47, useState as useState204 } from "react";
|
|
39519
|
-
import { ActionIcon as ActionIcon49, Group as
|
|
39785
|
+
import { ActionIcon as ActionIcon49, Group as Group131, Loader as Loader77, Stack as Stack248, Text as Text231 } from "@mantine/core";
|
|
39520
39786
|
import { IconRefresh as IconRefresh13 } from "@tabler/icons-react";
|
|
39521
39787
|
var XERO_LIST_ACCOUNTS_SLUG = "XERO_LIST_ACCOUNTS";
|
|
39522
39788
|
var XeroBankAccountPicker = ({
|
|
@@ -39584,7 +39850,7 @@ var XeroBankAccountPicker = ({
|
|
|
39584
39850
|
label: a.Code ? `${a.Code} \xB7 ${a.Name}` : a.Name || a.AccountID
|
|
39585
39851
|
}));
|
|
39586
39852
|
if (showPicker) {
|
|
39587
|
-
return /* @__PURE__ */ React354.createElement(Stack248, { gap: 4 }, /* @__PURE__ */ React354.createElement(
|
|
39853
|
+
return /* @__PURE__ */ React354.createElement(Stack248, { gap: 4 }, /* @__PURE__ */ React354.createElement(Group131, { gap: 4, align: "center", justify: "space-between" }, /* @__PURE__ */ React354.createElement(Text231, { size: "sm", fw: 500 }, label, required ? " *" : ""), /* @__PURE__ */ React354.createElement(ActionIcon49, { variant: "subtle", size: "sm", onClick: fetchBankAccounts, loading, "aria-label": "Refresh bank accounts" }, /* @__PURE__ */ React354.createElement(IconRefresh13, { size: 14 }))), /* @__PURE__ */ React354.createElement(
|
|
39588
39854
|
BaseSelect,
|
|
39589
39855
|
{
|
|
39590
39856
|
placeholder: loading ? "Loading\u2026" : "Select a Xero bank account",
|
|
@@ -39609,7 +39875,7 @@ var XeroBankAccountPicker = ({
|
|
|
39609
39875
|
required,
|
|
39610
39876
|
disabled
|
|
39611
39877
|
}
|
|
39612
|
-
), connectedAccountId && /* @__PURE__ */ React354.createElement(
|
|
39878
|
+
), connectedAccountId && /* @__PURE__ */ React354.createElement(Group131, { gap: "xs" }, loading && /* @__PURE__ */ React354.createElement(Loader77, { size: "xs" }), !loading && /* @__PURE__ */ React354.createElement(Text231, { size: "xs", c: "dimmed", style: { cursor: "pointer", textDecoration: "underline" }, onClick: fetchBankAccounts }, "Load bank accounts from Xero"), error && /* @__PURE__ */ React354.createElement(Text231, { size: "xs", c: "red" }, error)));
|
|
39613
39879
|
};
|
|
39614
39880
|
|
|
39615
39881
|
// src/mantine/blocks/action/actionTypes/xero/paymentCreate/XeroPaymentCreateConfig.tsx
|
|
@@ -39660,7 +39926,7 @@ var XeroPaymentCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
39660
39926
|
label: "Bank account",
|
|
39661
39927
|
required: true
|
|
39662
39928
|
}
|
|
39663
|
-
), /* @__PURE__ */ React355.createElement(
|
|
39929
|
+
), /* @__PURE__ */ React355.createElement(Group132, { grow: true }, /* @__PURE__ */ React355.createElement(
|
|
39664
39930
|
DataInput,
|
|
39665
39931
|
{
|
|
39666
39932
|
label: "Amount",
|
|
@@ -39707,7 +39973,7 @@ var XeroPaymentCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
39707
39973
|
|
|
39708
39974
|
// src/mantine/blocks/action/actionTypes/xero/paymentCreate/XeroPaymentCreateFlowDetail.tsx
|
|
39709
39975
|
import React356, { useCallback as useCallback149, useEffect as useEffect145, useMemo as useMemo141, useState as useState206 } from "react";
|
|
39710
|
-
import { Alert as Alert91, Badge as Badge59, Box as Box69, Button as Button81, Group as
|
|
39976
|
+
import { Alert as Alert91, Badge as Badge59, Box as Box69, Button as Button81, Group as Group133, Stack as Stack250, Text as Text233 } from "@mantine/core";
|
|
39711
39977
|
import { IconX as IconX20 } from "@tabler/icons-react";
|
|
39712
39978
|
function shortId2(value, length = 10) {
|
|
39713
39979
|
const text = String(value || "");
|
|
@@ -39881,7 +40147,7 @@ var XeroPaymentCreateFlowDetail = ({
|
|
|
39881
40147
|
if (!provideSigningHandler) return;
|
|
39882
40148
|
provideSigningHandler(execute);
|
|
39883
40149
|
}, [provideSigningHandler, execute]);
|
|
39884
|
-
return /* @__PURE__ */ React356.createElement(Stack250, { gap: "md" }, !hasConnection && !selectedWorkItemCompleted && /* @__PURE__ */ React356.createElement(ConnectionSelector, { toolkit: "xero", toolkitLabel: "Xero", value: flowConnection, onChange: setFlowConnection }), entityMismatch && /* @__PURE__ */ React356.createElement(Alert91, { color: "yellow", styles: actionAlertStyles }, "This block was configured for a different workspace. Reconnect Xero to use it here."), workItems.length > 0 && /* @__PURE__ */ React356.createElement(Stack250, { gap: "sm" }, /* @__PURE__ */ React356.createElement(
|
|
40150
|
+
return /* @__PURE__ */ React356.createElement(Stack250, { gap: "md" }, !hasConnection && !selectedWorkItemCompleted && /* @__PURE__ */ React356.createElement(ConnectionSelector, { toolkit: "xero", toolkitLabel: "Xero", value: flowConnection, onChange: setFlowConnection }), entityMismatch && /* @__PURE__ */ React356.createElement(Alert91, { color: "yellow", styles: actionAlertStyles }, "This block was configured for a different workspace. Reconnect Xero to use it here."), workItems.length > 0 && /* @__PURE__ */ React356.createElement(Stack250, { gap: "sm" }, /* @__PURE__ */ React356.createElement(Group133, { justify: "space-between", align: "center" }, /* @__PURE__ */ React356.createElement(Text233, { size: "sm", fw: 600 }, "Payments"), /* @__PURE__ */ React356.createElement(Badge59, { variant: "light", color: "gray" }, workItems.length)), workItems.map((item) => /* @__PURE__ */ React356.createElement(
|
|
39885
40151
|
Box69,
|
|
39886
40152
|
{
|
|
39887
40153
|
key: item.id,
|
|
@@ -39892,7 +40158,7 @@ var XeroPaymentCreateFlowDetail = ({
|
|
|
39892
40158
|
background: selectedWorkItem?.id === item.id ? "rgba(42, 234, 179, 0.08)" : "var(--mantine-color-neutralColor-5)"
|
|
39893
40159
|
}
|
|
39894
40160
|
},
|
|
39895
|
-
/* @__PURE__ */ React356.createElement(
|
|
40161
|
+
/* @__PURE__ */ React356.createElement(Group133, { justify: "space-between", align: "flex-start", gap: "md", wrap: "nowrap" }, /* @__PURE__ */ React356.createElement(Stack250, { gap: 4, style: { minWidth: 0, flex: 1 } }, /* @__PURE__ */ React356.createElement(Group133, { gap: "xs", wrap: "wrap" }, /* @__PURE__ */ React356.createElement(Text233, { size: "sm", fw: 600, truncate: true, style: { minWidth: 0, maxWidth: "100%" } }, String(item.reviewPayload?.Reference || item.reviewPayload?.InvoiceID || "Payment work")), /* @__PURE__ */ React356.createElement(Badge59, { size: "xs", color: item.status === "completed" ? "green" : item.status === "failed" ? "red" : "blue", variant: "light" }, item.status)), /* @__PURE__ */ React356.createElement(Text233, { size: "xs", c: "dimmed", truncate: true }, "Claim ", shortId2(item.source.claimId), " \xB7 Invoice ", shortId2(item.reviewPayload?.InvoiceID)), /* @__PURE__ */ React356.createElement(Group133, { gap: "md", wrap: "wrap" }, /* @__PURE__ */ React356.createElement(Text233, { size: "xs" }, "Amount ", formatAmount2(item.reviewPayload?.Amount)), item.reviewPayload?.Date && /* @__PURE__ */ React356.createElement(Text233, { size: "xs" }, "Date ", String(item.reviewPayload.Date)), item.reviewPayload?.AccountID && /* @__PURE__ */ React356.createElement(Text233, { size: "xs" }, "Account ", shortId2(item.reviewPayload.AccountID)))), /* @__PURE__ */ React356.createElement(
|
|
39896
40162
|
Button81,
|
|
39897
40163
|
{
|
|
39898
40164
|
size: "xs",
|
|
@@ -39902,7 +40168,7 @@ var XeroPaymentCreateFlowDetail = ({
|
|
|
39902
40168
|
},
|
|
39903
40169
|
selectedWorkItem?.id === item.id ? "Close" : item.status === "completed" ? "Open" : "Review"
|
|
39904
40170
|
))
|
|
39905
|
-
))), canShowDetail && /* @__PURE__ */ React356.createElement(Stack250, { gap: "sm" }, selectedWorkItem && /* @__PURE__ */ React356.createElement(
|
|
40171
|
+
))), canShowDetail && /* @__PURE__ */ React356.createElement(Stack250, { gap: "sm" }, selectedWorkItem && /* @__PURE__ */ React356.createElement(Group133, { justify: "space-between", align: "center" }, /* @__PURE__ */ React356.createElement(Text233, { size: "sm", fw: 600 }, selectedWorkItemCompleted ? "Completed payment" : "Reviewing queued payment"), /* @__PURE__ */ React356.createElement(Button81, { size: "xs", variant: "subtle", leftSection: /* @__PURE__ */ React356.createElement(IconX20, { size: 14 }), onClick: () => setSelectedWorkItemId("") }, "Close review")), /* @__PURE__ */ React356.createElement(
|
|
39906
40172
|
DataInput,
|
|
39907
40173
|
{
|
|
39908
40174
|
label: "Invoice ID",
|
|
@@ -39978,7 +40244,7 @@ import { Divider as Divider34, Stack as Stack253 } from "@mantine/core";
|
|
|
39978
40244
|
|
|
39979
40245
|
// src/mantine/blocks/action/actionTypes/_shared/BoundConnectionSelector.tsx
|
|
39980
40246
|
import React357, { useCallback as useCallback150, useEffect as useEffect146, useRef as useRef48, useState as useState207 } from "react";
|
|
39981
|
-
import { Alert as Alert92, Badge as Badge60, Button as Button82, Group as
|
|
40247
|
+
import { Alert as Alert92, Badge as Badge60, Button as Button82, Group as Group134, Loader as Loader78, Stack as Stack251, Text as Text234 } from "@mantine/core";
|
|
39982
40248
|
import { IconCheck as IconCheck30, IconPlug as IconPlug2, IconRefresh as IconRefresh14, IconTrash as IconTrash12 } from "@tabler/icons-react";
|
|
39983
40249
|
var POLL_INTERVAL_MS3 = 2e3;
|
|
39984
40250
|
var CONNECT_TIMEOUT_MS2 = 12e4;
|
|
@@ -40138,9 +40404,9 @@ var BoundConnectionSelector = ({ toolkit, toolkitLabel, templateId, connection,
|
|
|
40138
40404
|
const isConnected = manifest?.connection.status === "ACTIVE" && !!activeAccountId;
|
|
40139
40405
|
const label = connection?.label ?? manifest?.connection.label ?? null;
|
|
40140
40406
|
if (mode === "flow") {
|
|
40141
|
-
return /* @__PURE__ */ React357.createElement(
|
|
40407
|
+
return /* @__PURE__ */ React357.createElement(Group134, { gap: "xs" }, /* @__PURE__ */ React357.createElement(Text234, { size: "sm", fw: 600 }, toolkitLabel, ":"), isBound ? /* @__PURE__ */ React357.createElement(Badge60, { color: "teal", variant: "light", leftSection: /* @__PURE__ */ React357.createElement(IconCheck30, { size: 12 }) }, label || "Connected account") : /* @__PURE__ */ React357.createElement(Badge60, { color: "gray", variant: "light" }, "Not connected"));
|
|
40142
40408
|
}
|
|
40143
|
-
return /* @__PURE__ */ React357.createElement(Stack251, { gap: "xs" }, /* @__PURE__ */ React357.createElement(
|
|
40409
|
+
return /* @__PURE__ */ React357.createElement(Stack251, { gap: "xs" }, /* @__PURE__ */ React357.createElement(Group134, { justify: "space-between", align: "flex-end" }, /* @__PURE__ */ React357.createElement(Text234, { size: "sm", fw: 600 }, toolkitLabel, " account"), /* @__PURE__ */ React357.createElement(Button82, { size: "xs", variant: "subtle", leftSection: /* @__PURE__ */ React357.createElement(IconRefresh14, { size: 14 }), onClick: loadManifest, disabled: loading || disabled }, "Refresh")), isBound ? /* @__PURE__ */ React357.createElement(Alert92, { color: "teal", styles: actionAlertStyles }, /* @__PURE__ */ React357.createElement(Group134, { justify: "space-between", align: "center" }, /* @__PURE__ */ React357.createElement(Text234, { size: "sm" }, "Bound to ", /* @__PURE__ */ React357.createElement("strong", null, label || "connected account"), ". Anyone running this flow sends as this account.")), /* @__PURE__ */ React357.createElement(Group134, { gap: "xs", mt: "xs" }, /* @__PURE__ */ React357.createElement(Button82, { size: "xs", variant: "light", leftSection: /* @__PURE__ */ React357.createElement(IconPlug2, { size: 14 }), onClick: handleConnect, disabled: connecting || disabled }, connecting ? "Reconnecting\u2026" : "Reconnect"), /* @__PURE__ */ React357.createElement(Button82, { size: "xs", variant: "subtle", color: "red", leftSection: /* @__PURE__ */ React357.createElement(IconTrash12, { size: 14 }), onClick: handleRemove, disabled }, "Remove binding"))) : isConnected ? /* @__PURE__ */ React357.createElement(Stack251, { gap: "xs" }, /* @__PURE__ */ React357.createElement(Alert92, { color: "blue", styles: actionAlertStyles }, "Connected as ", /* @__PURE__ */ React357.createElement("strong", null, label || activeAccountId), ". Bind it so runners can send on your behalf."), /* @__PURE__ */ React357.createElement(BasePrimaryButton, { leftSection: binding ? /* @__PURE__ */ React357.createElement(Loader78, { size: 14, color: "dark" }) : /* @__PURE__ */ React357.createElement(IconCheck30, { size: 14 }), onClick: handleBind, disabled: binding || disabled }, binding ? "Binding\u2026" : `Bind to template`)) : /* @__PURE__ */ React357.createElement(
|
|
40144
40410
|
BasePrimaryButton,
|
|
40145
40411
|
{
|
|
40146
40412
|
leftSection: connecting ? /* @__PURE__ */ React357.createElement(Loader78, { size: 14, color: "dark" }) : /* @__PURE__ */ React357.createElement(IconPlug2, { size: 14 }),
|
|
@@ -40456,7 +40722,7 @@ var LoadBatchesConfig = ({ inputs, onInputsChange }) => {
|
|
|
40456
40722
|
|
|
40457
40723
|
// src/mantine/blocks/action/actionTypes/carbon/loadBatches/LoadBatchesFlowDetail.tsx
|
|
40458
40724
|
import React362, { useCallback as useCallback154, useEffect as useEffect150, useMemo as useMemo144, useRef as useRef50 } from "react";
|
|
40459
|
-
import { Alert as Alert94, Button as Button85, Group as
|
|
40725
|
+
import { Alert as Alert94, Button as Button85, Group as Group135, Loader as Loader80, Stack as Stack256, Text as Text237 } from "@mantine/core";
|
|
40460
40726
|
import { IconAlertCircle as IconAlertCircle32, IconLeaf as IconLeaf3 } from "@tabler/icons-react";
|
|
40461
40727
|
var LoadBatchesFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled, executeAction }) => {
|
|
40462
40728
|
const handlers = useBlocknoteHandlers();
|
|
@@ -40523,7 +40789,7 @@ var LoadBatchesFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, is
|
|
|
40523
40789
|
updateRuntime({ state: "idle", error: void 0, output: {} });
|
|
40524
40790
|
hasAutoExecutedRef.current = false;
|
|
40525
40791
|
}, [updateRuntime]);
|
|
40526
|
-
return /* @__PURE__ */ React362.createElement(Stack256, { gap: "md" }, /* @__PURE__ */ React362.createElement(Stack256, { gap: 2 }, /* @__PURE__ */ React362.createElement(
|
|
40792
|
+
return /* @__PURE__ */ React362.createElement(Stack256, { gap: "md" }, /* @__PURE__ */ React362.createElement(Stack256, { gap: 2 }, /* @__PURE__ */ React362.createElement(Group135, { gap: "xs" }, /* @__PURE__ */ React362.createElement(IconLeaf3, { size: 16 }), /* @__PURE__ */ React362.createElement(Text237, { fw: 600 }, block?.props?.title || "Load Carbon Batches")), /* @__PURE__ */ React362.createElement(Text237, { size: "sm", c: "dimmed" }, block?.props?.description || "Reconcile harvestable and retireable CARBON credits for this wallet.")), !isRunning && !isCompleted && !isStale && !isFailed && !inputsReady && /* @__PURE__ */ React362.createElement(Group135, { gap: "xs" }, /* @__PURE__ */ React362.createElement(Loader80, { size: 14 }), /* @__PURE__ */ React362.createElement(Text237, { size: "sm", c: "dimmed" }, "Waiting for a connected wallet address...")), isRunning && /* @__PURE__ */ React362.createElement(Group135, { gap: "xs" }, /* @__PURE__ */ React362.createElement(Loader80, { size: 14 }), /* @__PURE__ */ React362.createElement(Text237, { size: "sm" }, "Loading carbon batches...")), isCompleted && /* @__PURE__ */ React362.createElement(Stack256, { gap: "xs" }, /* @__PURE__ */ React362.createElement(Group135, { gap: "lg" }, /* @__PURE__ */ React362.createElement(Stack256, { gap: 0 }, /* @__PURE__ */ React362.createElement(Text237, { size: "xs", c: "dimmed" }, "Harvestable"), /* @__PURE__ */ React362.createElement(Text237, { fw: 600 }, totalClaimable, " ", /* @__PURE__ */ React362.createElement(Text237, { span: true, size: "xs", c: "dimmed" }, `(${harvestableBatches.length} batches)`))), /* @__PURE__ */ React362.createElement(Stack256, { gap: 0 }, /* @__PURE__ */ React362.createElement(Text237, { size: "xs", c: "dimmed" }, "Available"), /* @__PURE__ */ React362.createElement(Text237, { fw: 600 }, totalAvailable, " ", /* @__PURE__ */ React362.createElement(Text237, { span: true, size: "xs", c: "dimmed" }, `(${retireableBatches.length} batches)`))), /* @__PURE__ */ React362.createElement(Stack256, { gap: 0 }, /* @__PURE__ */ React362.createElement(Text237, { size: "xs", c: "dimmed" }, "Retired"), /* @__PURE__ */ React362.createElement(Text237, { fw: 600 }, totalRetired))), /* @__PURE__ */ React362.createElement(Group135, null, /* @__PURE__ */ React362.createElement(Button85, { variant: "subtle", size: "xs", onClick: handleRetry, disabled: isDisabled }, "Refresh"))), isStale && /* @__PURE__ */ React362.createElement(Alert94, { icon: /* @__PURE__ */ React362.createElement(IconAlertCircle32, { size: 16 }), color: "yellow", title: "Inconsistent State" }, /* @__PURE__ */ React362.createElement(Stack256, { gap: "xs" }, /* @__PURE__ */ React362.createElement(Text237, { size: "sm" }, "Block was marked completed but no batch data was recorded. This is stale state \u2014 reset and re-run."), /* @__PURE__ */ React362.createElement(Group135, null, /* @__PURE__ */ React362.createElement(Button85, { variant: "outline", size: "xs", onClick: handleRetry }, "Reset"), /* @__PURE__ */ React362.createElement(Button85, { variant: "filled", size: "xs", onClick: handleExecute, disabled: !inputsReady }, "Force Run Now")))), isFailed && errorMessage && /* @__PURE__ */ React362.createElement(Alert94, { icon: /* @__PURE__ */ React362.createElement(IconAlertCircle32, { size: 16 }), color: "red", styles: actionAlertStyles }, errorMessage), isFailed && /* @__PURE__ */ React362.createElement(Group135, null, /* @__PURE__ */ React362.createElement(Button85, { variant: "outline", onClick: handleRetry }, "Try Again")));
|
|
40527
40793
|
};
|
|
40528
40794
|
|
|
40529
40795
|
// src/mantine/blocks/action/actionTypes/carbon/loadBatches/index.ts
|
|
@@ -40632,7 +40898,7 @@ var HarvestConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
40632
40898
|
|
|
40633
40899
|
// src/mantine/blocks/action/actionTypes/carbon/harvest/HarvestFlowDetail.tsx
|
|
40634
40900
|
import React365, { useCallback as useCallback156, useEffect as useEffect152, useMemo as useMemo146, useState as useState214 } from "react";
|
|
40635
|
-
import { Alert as Alert95, Checkbox as Checkbox15, Stack as Stack259, Switch as
|
|
40901
|
+
import { Alert as Alert95, Checkbox as Checkbox15, Stack as Stack259, Switch as Switch16, Text as Text240 } from "@mantine/core";
|
|
40636
40902
|
import { IconAlertCircle as IconAlertCircle33, IconCheck as IconCheck31 } from "@tabler/icons-react";
|
|
40637
40903
|
function parseBatches(resolved) {
|
|
40638
40904
|
const trimmed = (resolved || "").trim();
|
|
@@ -40720,7 +40986,7 @@ var HarvestFlowDetail = ({
|
|
|
40720
40986
|
}
|
|
40721
40987
|
});
|
|
40722
40988
|
}, [provideSigningHandler, executeAction, ownerAddress, effectiveBatches]);
|
|
40723
|
-
return /* @__PURE__ */ React365.createElement(Stack259, { gap: "md" }, /* @__PURE__ */ React365.createElement(Stack259, { gap: 2 }, /* @__PURE__ */ React365.createElement(Text240, { fw: 600 }, block?.props?.title || "Harvest Carbon"), /* @__PURE__ */ React365.createElement(Text240, { size: "sm", c: "dimmed" }, block?.props?.description || "Claim credits from your entity accounts into your wallet.")), isCompleted ? /* @__PURE__ */ React365.createElement(Alert95, { icon: /* @__PURE__ */ React365.createElement(IconCheck31, { size: 16 }), color: "green", title: "Harvested" }, /* @__PURE__ */ React365.createElement(Stack259, { gap: "xs" }, /* @__PURE__ */ React365.createElement(Text240, { size: "sm" }, "Harvested ", harvestedAmount, " CARBON into your wallet."), /* @__PURE__ */ React365.createElement(Text240, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "Tx: ", txHash))) : batches.length === 0 ? /* @__PURE__ */ React365.createElement(Alert95, { color: "yellow", styles: actionAlertStyles }, "No harvestable batches. Configure the harvestable batches reference and ensure the upstream Load Carbon Batches block has run.") : /* @__PURE__ */ React365.createElement(React365.Fragment, null, /* @__PURE__ */ React365.createElement(
|
|
40989
|
+
return /* @__PURE__ */ React365.createElement(Stack259, { gap: "md" }, /* @__PURE__ */ React365.createElement(Stack259, { gap: 2 }, /* @__PURE__ */ React365.createElement(Text240, { fw: 600 }, block?.props?.title || "Harvest Carbon"), /* @__PURE__ */ React365.createElement(Text240, { size: "sm", c: "dimmed" }, block?.props?.description || "Claim credits from your entity accounts into your wallet.")), isCompleted ? /* @__PURE__ */ React365.createElement(Alert95, { icon: /* @__PURE__ */ React365.createElement(IconCheck31, { size: 16 }), color: "green", title: "Harvested" }, /* @__PURE__ */ React365.createElement(Stack259, { gap: "xs" }, /* @__PURE__ */ React365.createElement(Text240, { size: "sm" }, "Harvested ", harvestedAmount, " CARBON into your wallet."), /* @__PURE__ */ React365.createElement(Text240, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "Tx: ", txHash))) : batches.length === 0 ? /* @__PURE__ */ React365.createElement(Alert95, { color: "yellow", styles: actionAlertStyles }, "No harvestable batches. Configure the harvestable batches reference and ensure the upstream Load Carbon Batches block has run.") : /* @__PURE__ */ React365.createElement(React365.Fragment, null, /* @__PURE__ */ React365.createElement(Switch16, { label: "Harvest all", checked: harvestAll, onChange: (event) => setHarvestAll(event.currentTarget.checked), disabled: isDisabled }), !harvestAll && /* @__PURE__ */ React365.createElement(Stack259, { gap: "xs" }, batches.map((b) => /* @__PURE__ */ React365.createElement(
|
|
40724
40990
|
Checkbox15,
|
|
40725
40991
|
{
|
|
40726
40992
|
key: b.id,
|
|
@@ -40792,7 +41058,7 @@ var RetireConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
40792
41058
|
|
|
40793
41059
|
// src/mantine/blocks/action/actionTypes/carbon/retire/RetireFlowDetail.tsx
|
|
40794
41060
|
import React367, { useCallback as useCallback158, useEffect as useEffect154, useMemo as useMemo147, useState as useState216 } from "react";
|
|
40795
|
-
import { Alert as Alert96, Group as
|
|
41061
|
+
import { Alert as Alert96, Group as Group136, NumberInput as NumberInput14, Stack as Stack261, Switch as Switch17, Text as Text242 } from "@mantine/core";
|
|
40796
41062
|
import { IconAlertTriangle as IconAlertTriangle12, IconCheck as IconCheck32, IconAlertCircle as IconAlertCircle34 } from "@tabler/icons-react";
|
|
40797
41063
|
function parseBatches2(resolved) {
|
|
40798
41064
|
const trimmed = (resolved || "").trim();
|
|
@@ -40892,7 +41158,7 @@ var RetireFlowDetail = ({
|
|
|
40892
41158
|
}
|
|
40893
41159
|
});
|
|
40894
41160
|
}, [provideSigningHandler, executeAction, owner, effectiveSelections, reason, jurisdiction]);
|
|
40895
|
-
return /* @__PURE__ */ React367.createElement(Stack261, { gap: "md" }, /* @__PURE__ */ React367.createElement(Stack261, { gap: 2 }, /* @__PURE__ */ React367.createElement(Text242, { fw: 600 }, block?.props?.title || "Retire Carbon"), /* @__PURE__ */ React367.createElement(Text242, { size: "sm", c: "dimmed" }, block?.props?.description || "Permanently retire credits to offset impact.")), isCompleted ? /* @__PURE__ */ React367.createElement(Alert96, { icon: /* @__PURE__ */ React367.createElement(IconCheck32, { size: 16 }), color: "green", title: "Retired" }, /* @__PURE__ */ React367.createElement(Stack261, { gap: "xs" }, /* @__PURE__ */ React367.createElement(Text242, { size: "sm" }, "Permanently retired ", retiredAmount, " CARBON."), /* @__PURE__ */ React367.createElement(Text242, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "Tx: ", txHash))) : batches.length === 0 ? /* @__PURE__ */ React367.createElement(Alert96, { color: "yellow", styles: actionAlertStyles }, "No retireable batches. Configure the retireable batches reference and ensure the upstream Load Carbon Batches block has run.") : /* @__PURE__ */ React367.createElement(React367.Fragment, null, /* @__PURE__ */ React367.createElement(Alert96, { icon: /* @__PURE__ */ React367.createElement(IconAlertTriangle12, { size: 16 }), color: "orange", styles: actionAlertStyles }, "Retiring is permanent and irreversible. Retired credits are burned and cannot be recovered."), /* @__PURE__ */ React367.createElement(
|
|
41161
|
+
return /* @__PURE__ */ React367.createElement(Stack261, { gap: "md" }, /* @__PURE__ */ React367.createElement(Stack261, { gap: 2 }, /* @__PURE__ */ React367.createElement(Text242, { fw: 600 }, block?.props?.title || "Retire Carbon"), /* @__PURE__ */ React367.createElement(Text242, { size: "sm", c: "dimmed" }, block?.props?.description || "Permanently retire credits to offset impact.")), isCompleted ? /* @__PURE__ */ React367.createElement(Alert96, { icon: /* @__PURE__ */ React367.createElement(IconCheck32, { size: 16 }), color: "green", title: "Retired" }, /* @__PURE__ */ React367.createElement(Stack261, { gap: "xs" }, /* @__PURE__ */ React367.createElement(Text242, { size: "sm" }, "Permanently retired ", retiredAmount, " CARBON."), /* @__PURE__ */ React367.createElement(Text242, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "Tx: ", txHash))) : batches.length === 0 ? /* @__PURE__ */ React367.createElement(Alert96, { color: "yellow", styles: actionAlertStyles }, "No retireable batches. Configure the retireable batches reference and ensure the upstream Load Carbon Batches block has run.") : /* @__PURE__ */ React367.createElement(React367.Fragment, null, /* @__PURE__ */ React367.createElement(Alert96, { icon: /* @__PURE__ */ React367.createElement(IconAlertTriangle12, { size: 16 }), color: "orange", styles: actionAlertStyles }, "Retiring is permanent and irreversible. Retired credits are burned and cannot be recovered."), /* @__PURE__ */ React367.createElement(Switch17, { label: "Retire full amount of every batch", checked: retireAll, onChange: (event) => setRetireAll(event.currentTarget.checked), disabled: isDisabled }), !retireAll && /* @__PURE__ */ React367.createElement(Stack261, { gap: "xs" }, batches.map((b) => /* @__PURE__ */ React367.createElement(Group136, { key: b.id, justify: "space-between", wrap: "nowrap" }, /* @__PURE__ */ React367.createElement(Text242, { size: "sm", style: { flex: 1, wordBreak: "break-all" } }, b.alsoKnownAs || b.id, " ", /* @__PURE__ */ React367.createElement(Text242, { span: true, size: "xs", c: "dimmed" }, "(max ", b.amount, ")")), /* @__PURE__ */ React367.createElement(
|
|
40896
41162
|
NumberInput14,
|
|
40897
41163
|
{
|
|
40898
41164
|
value: amounts[b.id] ?? 0,
|
|
@@ -40902,7 +41168,7 @@ var RetireFlowDetail = ({
|
|
|
40902
41168
|
disabled: isDisabled,
|
|
40903
41169
|
w: 120
|
|
40904
41170
|
}
|
|
40905
|
-
)))), /* @__PURE__ */ React367.createElement(
|
|
41171
|
+
)))), /* @__PURE__ */ React367.createElement(Group136, { grow: true }, /* @__PURE__ */ React367.createElement(BaseTextInput, { label: "Country", placeholder: "Required", value: country, onChange: (e) => setCountry(e.currentTarget.value) }), /* @__PURE__ */ React367.createElement(BaseTextInput, { label: "State / Region", value: stateRegion, onChange: (e) => setStateRegion(e.currentTarget.value) }), /* @__PURE__ */ React367.createElement(BaseTextInput, { label: "Postal code", value: postal, onChange: (e) => setPostal(e.currentTarget.value) })), /* @__PURE__ */ React367.createElement(BaseTextInput, { label: "Reason", placeholder: "offset", value: reason, onChange: (e) => setReason(e.currentTarget.value) }), /* @__PURE__ */ React367.createElement(Text242, { size: "xs", c: "dimmed" }, "Retiring ", totalRetiring, " CARBON across ", effectiveSelections.length, " batch", effectiveSelections.length === 1 ? "" : "es", !country.trim() ? " \xB7 enter a country to continue" : ""), !owner && /* @__PURE__ */ React367.createElement(Text242, { size: "xs", c: "red" }, "No connected wallet \u2014 connect a wallet to retire.")), (error || runtimeError) && !isCompleted && /* @__PURE__ */ React367.createElement(Alert96, { icon: /* @__PURE__ */ React367.createElement(IconAlertCircle34, { size: 16 }), color: "red", styles: actionAlertStyles }, error || runtimeError));
|
|
40906
41172
|
};
|
|
40907
41173
|
|
|
40908
41174
|
// src/mantine/blocks/action/actionTypes/carbon/retire/index.ts
|
|
@@ -40991,7 +41257,7 @@ var EntityTransferConfig = ({ inputs, onInputsChange }) => {
|
|
|
40991
41257
|
|
|
40992
41258
|
// src/mantine/blocks/action/actionTypes/entityTransfer/EntityTransferFlowDetail.tsx
|
|
40993
41259
|
import React369, { useCallback as useCallback160, useEffect as useEffect156, useMemo as useMemo148, useState as useState218 } from "react";
|
|
40994
|
-
import { Alert as Alert97, Button as Button86, Group as
|
|
41260
|
+
import { Alert as Alert97, Button as Button86, Group as Group137, Loader as Loader81, Stack as Stack263, Text as Text244 } from "@mantine/core";
|
|
40995
41261
|
import { IconAlertTriangle as IconAlertTriangle13, IconCheck as IconCheck33, IconAlertCircle as IconAlertCircle35 } from "@tabler/icons-react";
|
|
40996
41262
|
var EntityTransferFlowDetail = ({
|
|
40997
41263
|
inputs,
|
|
@@ -41077,7 +41343,7 @@ var EntityTransferFlowDetail = ({
|
|
|
41077
41343
|
console.log("[entity.transfer] reset: clearing runtime to idle");
|
|
41078
41344
|
updateRuntime({ state: "idle", error: void 0, output: {} });
|
|
41079
41345
|
}, [updateRuntime]);
|
|
41080
|
-
return /* @__PURE__ */ React369.createElement(Stack263, { gap: "md" }, /* @__PURE__ */ React369.createElement(Stack263, { gap: 2 }, /* @__PURE__ */ React369.createElement(Text244, { fw: 600 }, block?.props?.title || "Transfer Entity"), /* @__PURE__ */ React369.createElement(Text244, { size: "sm", c: "dimmed" }, block?.props?.description || "Transfer ownership of an entity to a new owner.")), isCompleted ? /* @__PURE__ */ React369.createElement(Alert97, { icon: /* @__PURE__ */ React369.createElement(IconCheck33, { size: 16 }), color: "green", title: "Entity Transferred" }, /* @__PURE__ */ React369.createElement(Stack263, { gap: "xs" }, /* @__PURE__ */ React369.createElement(Text244, { size: "sm" }, "Ownership transferred to ", completedRecipient || effectiveRecipient, "."), recipientResolved && recipientResolved !== completedRecipient && /* @__PURE__ */ React369.createElement(Text244, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "Resolved recipient: ", recipientResolved), createdRecipientIid && /* @__PURE__ */ React369.createElement(Text244, { size: "xs", c: "dimmed" }, "Created the recipient's IID document before transferring."), /* @__PURE__ */ React369.createElement(Text244, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "Tx: ", txHash))) : isStale ? /* @__PURE__ */ React369.createElement(Alert97, { icon: /* @__PURE__ */ React369.createElement(IconAlertCircle35, { size: 16 }), color: "yellow", title: "Inconsistent State" }, /* @__PURE__ */ React369.createElement(Stack263, { gap: "xs" }, /* @__PURE__ */ React369.createElement(Text244, { size: "sm" }, "Block was marked completed but no transaction hash was recorded. This is stale state from a previous run \u2014 reset and re-run."), /* @__PURE__ */ React369.createElement(
|
|
41346
|
+
return /* @__PURE__ */ React369.createElement(Stack263, { gap: "md" }, /* @__PURE__ */ React369.createElement(Stack263, { gap: 2 }, /* @__PURE__ */ React369.createElement(Text244, { fw: 600 }, block?.props?.title || "Transfer Entity"), /* @__PURE__ */ React369.createElement(Text244, { size: "sm", c: "dimmed" }, block?.props?.description || "Transfer ownership of an entity to a new owner.")), isCompleted ? /* @__PURE__ */ React369.createElement(Alert97, { icon: /* @__PURE__ */ React369.createElement(IconCheck33, { size: 16 }), color: "green", title: "Entity Transferred" }, /* @__PURE__ */ React369.createElement(Stack263, { gap: "xs" }, /* @__PURE__ */ React369.createElement(Text244, { size: "sm" }, "Ownership transferred to ", completedRecipient || effectiveRecipient, "."), recipientResolved && recipientResolved !== completedRecipient && /* @__PURE__ */ React369.createElement(Text244, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "Resolved recipient: ", recipientResolved), createdRecipientIid && /* @__PURE__ */ React369.createElement(Text244, { size: "xs", c: "dimmed" }, "Created the recipient's IID document before transferring."), /* @__PURE__ */ React369.createElement(Text244, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "Tx: ", txHash))) : isStale ? /* @__PURE__ */ React369.createElement(Alert97, { icon: /* @__PURE__ */ React369.createElement(IconAlertCircle35, { size: 16 }), color: "yellow", title: "Inconsistent State" }, /* @__PURE__ */ React369.createElement(Stack263, { gap: "xs" }, /* @__PURE__ */ React369.createElement(Text244, { size: "sm" }, "Block was marked completed but no transaction hash was recorded. This is stale state from a previous run \u2014 reset and re-run."), /* @__PURE__ */ React369.createElement(Group137, null, /* @__PURE__ */ React369.createElement(Button86, { variant: "outline", size: "xs", onClick: handleReset }, "Reset"), /* @__PURE__ */ React369.createElement(Button86, { variant: "filled", size: "xs", onClick: execute, disabled: !inputsReady }, "Force Run Now")))) : /* @__PURE__ */ React369.createElement(React369.Fragment, null, /* @__PURE__ */ React369.createElement(Alert97, { icon: /* @__PURE__ */ React369.createElement(IconAlertTriangle13, { size: 16 }), color: "orange", styles: actionAlertStyles }, "Transferring an entity is permanent \u2014 you will lose control of it once the new owner accepts ownership."), !resolvedEntityDid && /* @__PURE__ */ React369.createElement(Group137, { gap: "xs" }, /* @__PURE__ */ React369.createElement(Loader81, { size: 14 }), /* @__PURE__ */ React369.createElement(Text244, { size: "sm", c: "dimmed" }, "Waiting for upstream entity DID\u2026")), /* @__PURE__ */ React369.createElement(
|
|
41081
41347
|
BaseTextInput,
|
|
41082
41348
|
{
|
|
41083
41349
|
label: "Recipient DID",
|
|
@@ -41086,7 +41352,7 @@ var EntityTransferFlowDetail = ({
|
|
|
41086
41352
|
onChange: (event) => setRecipientInput(event.currentTarget.value),
|
|
41087
41353
|
disabled: isDisabled
|
|
41088
41354
|
}
|
|
41089
|
-
), resolvedEntityDid && /* @__PURE__ */ React369.createElement(Text244, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "Entity: ", resolvedEntityDid), isRunning && /* @__PURE__ */ React369.createElement(
|
|
41355
|
+
), resolvedEntityDid && /* @__PURE__ */ React369.createElement(Text244, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "Entity: ", resolvedEntityDid), isRunning && /* @__PURE__ */ React369.createElement(Group137, { gap: "xs" }, /* @__PURE__ */ React369.createElement(Loader81, { size: 14 }), /* @__PURE__ */ React369.createElement(Text244, { size: "sm" }, "Transferring entity on-chain\u2026")), !inputsReady && resolvedEntityDid && /* @__PURE__ */ React369.createElement(Text244, { size: "xs", c: "dimmed" }, "Enter a recipient DID to continue.")), (error || runtimeError) && !isCompleted && /* @__PURE__ */ React369.createElement(Alert97, { icon: /* @__PURE__ */ React369.createElement(IconAlertCircle35, { size: 16 }), color: "red", styles: actionAlertStyles }, error || runtimeError), isFailed && !isStale && /* @__PURE__ */ React369.createElement(Group137, null, /* @__PURE__ */ React369.createElement(Button86, { variant: "outline", size: "xs", onClick: handleReset }, "Try Again")));
|
|
41090
41356
|
};
|
|
41091
41357
|
|
|
41092
41358
|
// src/mantine/blocks/action/actionTypes/entityTransfer/index.ts
|
|
@@ -41184,7 +41450,7 @@ var KycVerifyConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
41184
41450
|
|
|
41185
41451
|
// src/mantine/blocks/action/actionTypes/kycVerify/KycVerifyFlowDetail.tsx
|
|
41186
41452
|
import React371, { useCallback as useCallback162, useEffect as useEffect158, useMemo as useMemo149, useRef as useRef51, useState as useState220 } from "react";
|
|
41187
|
-
import { Alert as Alert98, Button as Button87, Group as
|
|
41453
|
+
import { Alert as Alert98, Button as Button87, Group as Group138, Loader as Loader82, Radio as Radio6, Stack as Stack265, Stepper, Text as Text246 } from "@mantine/core";
|
|
41188
41454
|
import { IconAlertCircle as IconAlertCircle36, IconCheck as IconCheck34, IconExternalLink as IconExternalLink3, IconId, IconRefresh as IconRefresh15 } from "@tabler/icons-react";
|
|
41189
41455
|
import { SurveyModel as SurveyModel13 } from "@ixo/surveys";
|
|
41190
41456
|
var POLL_INTERVAL_MS4 = 15e3;
|
|
@@ -41430,9 +41696,9 @@ var KycVerifyFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDi
|
|
|
41430
41696
|
}
|
|
41431
41697
|
return /* @__PURE__ */ React371.createElement(Stack265, { gap: "md" }, /* @__PURE__ */ React371.createElement(Stack265, { gap: 2 }, /* @__PURE__ */ React371.createElement(Text246, { fw: 600 }, title), /* @__PURE__ */ React371.createElement(Text246, { size: "sm", c: "dimmed" }, description)), isStale && /* @__PURE__ */ React371.createElement(Alert98, { icon: /* @__PURE__ */ React371.createElement(IconAlertCircle36, { size: 16 }), color: "yellow", title: t("actionTypes.kycVerify.flow.staleTitle", { defaultValue: "Inconsistent State" }) }, /* @__PURE__ */ React371.createElement(Stack265, { gap: "xs" }, /* @__PURE__ */ React371.createElement(Text246, { size: "sm" }, t("actionTypes.kycVerify.flow.staleBody", {
|
|
41432
41698
|
defaultValue: "This step was marked completed but no credential CID was recorded. This is stale state from a previous run \u2014 reset and complete the save again."
|
|
41433
|
-
})), /* @__PURE__ */ React371.createElement(
|
|
41699
|
+
})), /* @__PURE__ */ React371.createElement(Group138, null, /* @__PURE__ */ React371.createElement(Button87, { variant: "outline", size: "xs", onClick: handleReset }, t("actionTypes.kycVerify.flow.reset", { defaultValue: "Reset" }))))), !configured && /* @__PURE__ */ React371.createElement(Alert98, { color: "yellow", styles: actionAlertStyles }, t("actionTypes.kycVerify.flow.notConfigured", { defaultValue: "Configure the KYC Protocol DID in template mode before running this action." })), configured && !inputsReady && /* @__PURE__ */ React371.createElement(Group138, { gap: "xs" }, /* @__PURE__ */ React371.createElement(Loader82, { size: 14 }), /* @__PURE__ */ React371.createElement(Text246, { size: "sm", c: "dimmed" }, t("actionTypes.kycVerify.flow.waitingInputs", { defaultValue: "Waiting for the KYC protocol DID from an upstream block\u2026" }))), configured && inputsReady && !kycAvailable && /* @__PURE__ */ React371.createElement(Alert98, { icon: /* @__PURE__ */ React371.createElement(IconAlertCircle36, { size: 16 }), color: "red", styles: actionAlertStyles }, t("actionTypes.kycVerify.flow.handlersUnavailable", {
|
|
41434
41700
|
defaultValue: "KYC verification is not available: the host app does not provide the KYC handlers (kycLoadForm \u2026 kycSaveCredential)."
|
|
41435
|
-
})), kycAvailable && inputsReady && loadingForm && /* @__PURE__ */ React371.createElement(
|
|
41701
|
+
})), kycAvailable && inputsReady && loadingForm && /* @__PURE__ */ React371.createElement(Group138, { gap: "xs" }, /* @__PURE__ */ React371.createElement(Loader82, { size: 14 }), /* @__PURE__ */ React371.createElement(Text246, { size: "sm", c: "dimmed" }, t("actionTypes.kycVerify.flow.loadingForm", { defaultValue: "Loading your verification status\u2026" }))), kycAvailable && inputsReady && !loadingForm && loadError && /* @__PURE__ */ React371.createElement(Alert98, { icon: /* @__PURE__ */ React371.createElement(IconAlertCircle36, { size: 16 }), color: "red", styles: actionAlertStyles }, /* @__PURE__ */ React371.createElement(Stack265, { gap: "xs" }, /* @__PURE__ */ React371.createElement(Text246, { size: "xs" }, loadError), /* @__PURE__ */ React371.createElement(Group138, null, /* @__PURE__ */ React371.createElement(Button87, { variant: "outline", size: "xs", leftSection: /* @__PURE__ */ React371.createElement(IconRefresh15, { size: 14 }), onClick: () => setLoadRetryKey((k) => k + 1) }, t("actionTypes.kycVerify.flow.retry", { defaultValue: "Retry" }))))), kycAvailable && inputsReady && !loadingForm && !loadError && form && !isStale && /* @__PURE__ */ React371.createElement(React371.Fragment, null, form.hasExistingCredential ? (
|
|
41436
41702
|
// Already verified — the user picks which Vault credential to use
|
|
41437
41703
|
// (auto-picked when there is only one), then the formal completion
|
|
41438
41704
|
// records its proof (saveCredential is idempotent).
|
|
@@ -41447,7 +41713,7 @@ var KycVerifyFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDi
|
|
|
41447
41713
|
}
|
|
41448
41714
|
))))) : /* @__PURE__ */ React371.createElement(Text246, { size: "sm" }, t("actionTypes.kycVerify.flow.alreadyVerifiedBody", {
|
|
41449
41715
|
defaultValue: "You already hold a credential for this verification. Use it to complete this step."
|
|
41450
|
-
})), /* @__PURE__ */ React371.createElement(
|
|
41716
|
+
})), /* @__PURE__ */ React371.createElement(Group138, null, /* @__PURE__ */ React371.createElement(
|
|
41451
41717
|
Button87,
|
|
41452
41718
|
{
|
|
41453
41719
|
size: "xs",
|
|
@@ -41460,12 +41726,12 @@ var KycVerifyFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDi
|
|
|
41460
41726
|
) : !serverStatus || serverStatus === "unknown" ? (
|
|
41461
41727
|
// Phase 1 — details form. The ixo-kyc-survey class normalises any
|
|
41462
41728
|
// inline colours in template-authored HTML to the site theme.
|
|
41463
|
-
/* @__PURE__ */ React371.createElement(React371.Fragment, null, surveyModel && /* @__PURE__ */ React371.createElement("div", { className: "ixo-kyc-survey" }, /* @__PURE__ */ React371.createElement(StableSurvey, { model: surveyModel })), busy === "initiate" && /* @__PURE__ */ React371.createElement(
|
|
41729
|
+
/* @__PURE__ */ React371.createElement(React371.Fragment, null, surveyModel && /* @__PURE__ */ React371.createElement("div", { className: "ixo-kyc-survey" }, /* @__PURE__ */ React371.createElement(StableSurvey, { model: surveyModel })), busy === "initiate" && /* @__PURE__ */ React371.createElement(Group138, { gap: "xs" }, /* @__PURE__ */ React371.createElement(Loader82, { size: 14 }), /* @__PURE__ */ React371.createElement(Text246, { size: "sm", c: "dimmed" }, t("actionTypes.kycVerify.flow.initiating", { defaultValue: "Submitting your details and opening the verification page\u2026" }))))
|
|
41464
41730
|
) : serverStatus === "verify" ? (
|
|
41465
41731
|
// Phase 2 — hosted verification pending.
|
|
41466
41732
|
/* @__PURE__ */ React371.createElement(Stack265, { gap: "xs" }, renderStepper(serverStatus), /* @__PURE__ */ React371.createElement(Text246, { size: "sm", c: "dimmed" }, t("actionTypes.kycVerify.flow.verifyHint", {
|
|
41467
41733
|
defaultValue: "Complete your identity verification in the secure browser tab. This step updates automatically once you finish."
|
|
41468
|
-
})), /* @__PURE__ */ React371.createElement(
|
|
41734
|
+
})), /* @__PURE__ */ React371.createElement(Group138, null, /* @__PURE__ */ React371.createElement(
|
|
41469
41735
|
Button87,
|
|
41470
41736
|
{
|
|
41471
41737
|
size: "xs",
|
|
@@ -41477,16 +41743,16 @@ var KycVerifyFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDi
|
|
|
41477
41743
|
)))
|
|
41478
41744
|
) : serverStatus === "review" || serverStatus === "clear" || serverStatus === "issuing" ? (
|
|
41479
41745
|
// Phase 3 — server-side progression; 15s polling is active.
|
|
41480
|
-
/* @__PURE__ */ React371.createElement(Stack265, { gap: "xs" }, renderStepper(serverStatus), /* @__PURE__ */ React371.createElement(
|
|
41746
|
+
/* @__PURE__ */ React371.createElement(Stack265, { gap: "xs" }, renderStepper(serverStatus), /* @__PURE__ */ React371.createElement(Group138, { gap: "xs" }, /* @__PURE__ */ React371.createElement(Loader82, { size: 14 }), /* @__PURE__ */ React371.createElement(Text246, { size: "xs", c: "dimmed" }, t("actionTypes.kycVerify.flow.polling", { defaultValue: "Checking the verification status every 15 seconds\u2026" }))))
|
|
41481
41747
|
) : serverStatus === "issued" ? (
|
|
41482
41748
|
// Phase 4 — credential issued; formal save step.
|
|
41483
|
-
/* @__PURE__ */ React371.createElement(Stack265, { gap: "xs" }, renderStepper(serverStatus), /* @__PURE__ */ React371.createElement(Text246, { size: "sm" }, t("actionTypes.kycVerify.flow.issuedHint", { defaultValue: "Your credential has been issued. Save it to your Vault to complete this step." })), /* @__PURE__ */ React371.createElement(
|
|
41749
|
+
/* @__PURE__ */ React371.createElement(Stack265, { gap: "xs" }, renderStepper(serverStatus), /* @__PURE__ */ React371.createElement(Text246, { size: "sm" }, t("actionTypes.kycVerify.flow.issuedHint", { defaultValue: "Your credential has been issued. Save it to your Vault to complete this step." })), /* @__PURE__ */ React371.createElement(Group138, null, /* @__PURE__ */ React371.createElement(Button87, { leftSection: busy === "save" || isRunning ? /* @__PURE__ */ React371.createElement(Loader82, { size: 14 }) : /* @__PURE__ */ React371.createElement(IconId, { size: 14 }), onClick: handleSave, disabled: !!busy || isRunning || isDisabled }, t("actionTypes.kycVerify.flow.saveCredential", { defaultValue: "Save credential to your Vault" }))))
|
|
41484
41750
|
) : serverStatus === "complete" ? (
|
|
41485
41751
|
// Server says complete but the block has no proof yet (e.g. saved
|
|
41486
41752
|
// from another device or a re-instantiated flow) — record it here.
|
|
41487
41753
|
/* @__PURE__ */ React371.createElement(Alert98, { icon: /* @__PURE__ */ React371.createElement(IconCheck34, { size: 16 }), color: "blue", title: t("actionTypes.kycVerify.flow.serverCompleteTitle", { defaultValue: "Verification Already Complete" }) }, /* @__PURE__ */ React371.createElement(Stack265, { gap: "xs" }, /* @__PURE__ */ React371.createElement(Text246, { size: "sm" }, t("actionTypes.kycVerify.flow.serverCompleteBody", {
|
|
41488
41754
|
defaultValue: "The KYC server reports this verification as complete. Record it on this step to continue the flow."
|
|
41489
|
-
})), /* @__PURE__ */ React371.createElement(
|
|
41755
|
+
})), /* @__PURE__ */ React371.createElement(Group138, null, /* @__PURE__ */ React371.createElement(
|
|
41490
41756
|
Button87,
|
|
41491
41757
|
{
|
|
41492
41758
|
size: "xs",
|
|
@@ -41498,7 +41764,7 @@ var KycVerifyFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDi
|
|
|
41498
41764
|
))))
|
|
41499
41765
|
) : serverStatus === "rejected" ? /* @__PURE__ */ React371.createElement(Alert98, { icon: /* @__PURE__ */ React371.createElement(IconAlertCircle36, { size: 16 }), color: "red", title: t("actionTypes.kycVerify.flow.rejectedTitle", { defaultValue: "Verification Rejected" }) }, /* @__PURE__ */ React371.createElement(Stack265, { gap: "xs" }, /* @__PURE__ */ React371.createElement(Text246, { size: "sm" }, t("actionTypes.kycVerify.flow.rejectedBody", {
|
|
41500
41766
|
defaultValue: "Your identity verification was rejected by the provider. This is usually final for the submitted documents \u2014 contact the flow owner or support to resolve it."
|
|
41501
|
-
})), /* @__PURE__ */ React371.createElement(
|
|
41767
|
+
})), /* @__PURE__ */ React371.createElement(Group138, null, /* @__PURE__ */ React371.createElement(
|
|
41502
41768
|
Button87,
|
|
41503
41769
|
{
|
|
41504
41770
|
variant: "outline",
|
|
@@ -41510,9 +41776,9 @@ var KycVerifyFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDi
|
|
|
41510
41776
|
t("actionTypes.kycVerify.flow.checkStatus", { defaultValue: "Check status" })
|
|
41511
41777
|
)))) : serverStatus === "attention" ? /* @__PURE__ */ React371.createElement(Stack265, { gap: "xs" }, renderStepper(serverStatus), /* @__PURE__ */ React371.createElement(Alert98, { icon: /* @__PURE__ */ React371.createElement(IconAlertCircle36, { size: 16 }), color: "yellow", title: t("actionTypes.kycVerify.flow.attentionTitle", { defaultValue: "Manual Review" }) }, /* @__PURE__ */ React371.createElement(Text246, { size: "sm" }, t("actionTypes.kycVerify.flow.attentionBody", {
|
|
41512
41778
|
defaultValue: "Your verification needs manual review by the provider. No action is required \u2014 this step updates automatically when the review finishes."
|
|
41513
|
-
}))), /* @__PURE__ */ React371.createElement(
|
|
41779
|
+
}))), /* @__PURE__ */ React371.createElement(Group138, { gap: "xs" }, /* @__PURE__ */ React371.createElement(Loader82, { size: 14 }), /* @__PURE__ */ React371.createElement(Text246, { size: "xs", c: "dimmed" }, t("actionTypes.kycVerify.flow.polling", { defaultValue: "Checking the verification status every 15 seconds\u2026" })))) : serverStatus === "error" ? /* @__PURE__ */ React371.createElement(Alert98, { icon: /* @__PURE__ */ React371.createElement(IconAlertCircle36, { size: 16 }), color: "red", title: t("actionTypes.kycVerify.flow.errorTitle", { defaultValue: "Verification Error" }) }, /* @__PURE__ */ React371.createElement(Stack265, { gap: "xs" }, /* @__PURE__ */ React371.createElement(Text246, { size: "sm" }, t("actionTypes.kycVerify.flow.errorBody", {
|
|
41514
41780
|
defaultValue: "The verification hit a server-side error. It can usually be recovered \u2014 continue the verification to retry."
|
|
41515
|
-
})), /* @__PURE__ */ React371.createElement(
|
|
41781
|
+
})), /* @__PURE__ */ React371.createElement(Group138, null, /* @__PURE__ */ React371.createElement(
|
|
41516
41782
|
Button87,
|
|
41517
41783
|
{
|
|
41518
41784
|
size: "xs",
|
|
@@ -41533,7 +41799,7 @@ var KycVerifyFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDi
|
|
|
41533
41799
|
t("actionTypes.kycVerify.flow.checkStatus", { defaultValue: "Check status" })
|
|
41534
41800
|
)))) : (
|
|
41535
41801
|
// Unrecognised status — surface it verbatim rather than dead-ending.
|
|
41536
|
-
/* @__PURE__ */ React371.createElement(Alert98, { icon: /* @__PURE__ */ React371.createElement(IconAlertCircle36, { size: 16 }), color: "yellow", styles: actionAlertStyles }, /* @__PURE__ */ React371.createElement(Stack265, { gap: "xs" }, /* @__PURE__ */ React371.createElement(Text246, { size: "xs" }, t("actionTypes.kycVerify.flow.unknownStatus", { defaultValue: "Unrecognised verification status" }), ": ", serverStatus), /* @__PURE__ */ React371.createElement(
|
|
41802
|
+
/* @__PURE__ */ React371.createElement(Alert98, { icon: /* @__PURE__ */ React371.createElement(IconAlertCircle36, { size: 16 }), color: "yellow", styles: actionAlertStyles }, /* @__PURE__ */ React371.createElement(Stack265, { gap: "xs" }, /* @__PURE__ */ React371.createElement(Text246, { size: "xs" }, t("actionTypes.kycVerify.flow.unknownStatus", { defaultValue: "Unrecognised verification status" }), ": ", serverStatus), /* @__PURE__ */ React371.createElement(Group138, null, /* @__PURE__ */ React371.createElement(
|
|
41537
41803
|
Button87,
|
|
41538
41804
|
{
|
|
41539
41805
|
variant: "outline",
|
|
@@ -41546,7 +41812,7 @@ var KycVerifyFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDi
|
|
|
41546
41812
|
))))
|
|
41547
41813
|
)), fallbackUrl && /* @__PURE__ */ React371.createElement(Alert98, { icon: /* @__PURE__ */ React371.createElement(IconExternalLink3, { size: 16 }), color: "yellow", styles: actionAlertStyles }, /* @__PURE__ */ React371.createElement(Stack265, { gap: "xs" }, /* @__PURE__ */ React371.createElement(Text246, { size: "xs" }, t("actionTypes.kycVerify.flow.popupBlocked", {
|
|
41548
41814
|
defaultValue: "Your browser blocked the verification tab. Open it with the link below, or allow pop-ups and press Continue verification again."
|
|
41549
|
-
})), /* @__PURE__ */ React371.createElement(
|
|
41815
|
+
})), /* @__PURE__ */ React371.createElement(Group138, null, /* @__PURE__ */ React371.createElement(
|
|
41550
41816
|
Button87,
|
|
41551
41817
|
{
|
|
41552
41818
|
component: "a",
|
|
@@ -41558,7 +41824,7 @@ var KycVerifyFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDi
|
|
|
41558
41824
|
onClick: () => setFallbackUrl(null)
|
|
41559
41825
|
},
|
|
41560
41826
|
t("actionTypes.kycVerify.flow.openVerification", { defaultValue: "Open verification page" })
|
|
41561
|
-
)))), actionError && /* @__PURE__ */ React371.createElement(Alert98, { icon: /* @__PURE__ */ React371.createElement(IconAlertCircle36, { size: 16 }), color: "red", styles: actionAlertStyles }, actionError), isFailed && runtimeError && /* @__PURE__ */ React371.createElement(Alert98, { icon: /* @__PURE__ */ React371.createElement(IconAlertCircle36, { size: 16 }), color: "red", styles: actionAlertStyles }, /* @__PURE__ */ React371.createElement(Stack265, { gap: "xs" }, /* @__PURE__ */ React371.createElement(Text246, { size: "xs" }, runtimeError), /* @__PURE__ */ React371.createElement(
|
|
41827
|
+
)))), actionError && /* @__PURE__ */ React371.createElement(Alert98, { icon: /* @__PURE__ */ React371.createElement(IconAlertCircle36, { size: 16 }), color: "red", styles: actionAlertStyles }, actionError), isFailed && runtimeError && /* @__PURE__ */ React371.createElement(Alert98, { icon: /* @__PURE__ */ React371.createElement(IconAlertCircle36, { size: 16 }), color: "red", styles: actionAlertStyles }, /* @__PURE__ */ React371.createElement(Stack265, { gap: "xs" }, /* @__PURE__ */ React371.createElement(Text246, { size: "xs" }, runtimeError), /* @__PURE__ */ React371.createElement(Group138, null, /* @__PURE__ */ React371.createElement(Button87, { variant: "outline", size: "xs", onClick: handleReset }, t("actionTypes.kycVerify.flow.dismiss", { defaultValue: "Dismiss" }))))));
|
|
41562
41828
|
};
|
|
41563
41829
|
|
|
41564
41830
|
// src/mantine/blocks/action/actionTypes/kycVerify/index.ts
|
|
@@ -41583,7 +41849,7 @@ var WalletGenerateConfig = () => {
|
|
|
41583
41849
|
|
|
41584
41850
|
// src/mantine/blocks/action/actionTypes/walletGenerate/WalletGenerateFlowDetail.tsx
|
|
41585
41851
|
import React373, { useCallback as useCallback163 } from "react";
|
|
41586
|
-
import { Alert as Alert99, Button as Button88, Group as
|
|
41852
|
+
import { Alert as Alert99, Button as Button88, Group as Group139, Loader as Loader83, Stack as Stack267, Text as Text248 } from "@mantine/core";
|
|
41587
41853
|
import { IconCheck as IconCheck35, IconAlertCircle as IconAlertCircle37 } from "@tabler/icons-react";
|
|
41588
41854
|
var WalletGenerateFlowDetail = ({ block, runtime, updateRuntime, isDisabled, executeAction }) => {
|
|
41589
41855
|
const generatedAddress = runtime.output?.address || "";
|
|
@@ -41618,7 +41884,7 @@ var WalletGenerateFlowDetail = ({ block, runtime, updateRuntime, isDisabled, exe
|
|
|
41618
41884
|
const handleRetry = useCallback163(() => {
|
|
41619
41885
|
updateRuntime({ state: "idle", error: void 0, output: {} });
|
|
41620
41886
|
}, [updateRuntime]);
|
|
41621
|
-
return /* @__PURE__ */ React373.createElement(Stack267, { gap: "md" }, /* @__PURE__ */ React373.createElement(Stack267, { gap: 2 }, /* @__PURE__ */ React373.createElement(Text248, { fw: 600 }, block?.props?.title || "Generate Wallet"), /* @__PURE__ */ React373.createElement(Text248, { size: "sm", c: "dimmed" }, block?.props?.description || "Generate a new wallet with address and DID.")), isRunning && /* @__PURE__ */ React373.createElement(
|
|
41887
|
+
return /* @__PURE__ */ React373.createElement(Stack267, { gap: "md" }, /* @__PURE__ */ React373.createElement(Stack267, { gap: 2 }, /* @__PURE__ */ React373.createElement(Text248, { fw: 600 }, block?.props?.title || "Generate Wallet"), /* @__PURE__ */ React373.createElement(Text248, { size: "sm", c: "dimmed" }, block?.props?.description || "Generate a new wallet with address and DID.")), isRunning && /* @__PURE__ */ React373.createElement(Group139, { gap: "xs" }, /* @__PURE__ */ React373.createElement(Loader83, { size: 14 }), /* @__PURE__ */ React373.createElement(Text248, { size: "sm" }, "Generating wallet...")), isCompleted && /* @__PURE__ */ React373.createElement(Alert99, { icon: /* @__PURE__ */ React373.createElement(IconCheck35, { size: 16 }), title: "Wallet Generated", color: "green" }, /* @__PURE__ */ React373.createElement(Stack267, { gap: "xs" }, generatedAddress && /* @__PURE__ */ React373.createElement(Text248, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "Address: ", generatedAddress), generatedDid && /* @__PURE__ */ React373.createElement(Text248, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "DID: ", generatedDid), /* @__PURE__ */ React373.createElement(Text248, { size: "xs", c: "dimmed" }, "Mnemonic has been stored securely."))), isStale && /* @__PURE__ */ React373.createElement(Alert99, { icon: /* @__PURE__ */ React373.createElement(IconAlertCircle37, { size: 16 }), color: "yellow", title: "Inconsistent State" }, /* @__PURE__ */ React373.createElement(Stack267, { gap: "xs" }, /* @__PURE__ */ React373.createElement(Text248, { size: "sm" }, "Marked completed but no address recorded. Stale state \u2014 reset and re-run."), /* @__PURE__ */ React373.createElement(Group139, null, /* @__PURE__ */ React373.createElement(Button88, { variant: "outline", size: "xs", onClick: handleRetry }, "Reset"), /* @__PURE__ */ React373.createElement(Button88, { variant: "filled", size: "xs", onClick: handleExecute }, "Force Run Now")))), isFailed && errorMessage && /* @__PURE__ */ React373.createElement(Alert99, { icon: /* @__PURE__ */ React373.createElement(IconAlertCircle37, { size: 16 }), color: "red", styles: actionAlertStyles }, errorMessage), isFailed && /* @__PURE__ */ React373.createElement(Group139, null, /* @__PURE__ */ React373.createElement(Button88, { variant: "outline", onClick: handleRetry }, "Try Again")), !isRunning && !isStale && /* @__PURE__ */ React373.createElement(Group139, null, /* @__PURE__ */ React373.createElement(Button88, { variant: "filled", size: "sm", onClick: handleExecute, disabled: isDisabled }, isCompleted ? "Re-generate" : "Run Now")));
|
|
41622
41888
|
};
|
|
41623
41889
|
|
|
41624
41890
|
// src/mantine/blocks/action/actionTypes/walletGenerate/index.ts
|
|
@@ -41676,7 +41942,7 @@ var WalletFundConfig = ({ inputs, onInputsChange }) => {
|
|
|
41676
41942
|
|
|
41677
41943
|
// src/mantine/blocks/action/actionTypes/walletFund/WalletFundFlowDetail.tsx
|
|
41678
41944
|
import React375, { useCallback as useCallback165, useEffect as useEffect160, useMemo as useMemo150 } from "react";
|
|
41679
|
-
import { Alert as Alert100, Group as
|
|
41945
|
+
import { Alert as Alert100, Group as Group140, Loader as Loader84, Stack as Stack269, Text as Text250 } from "@mantine/core";
|
|
41680
41946
|
import { IconCheck as IconCheck36, IconAlertCircle as IconAlertCircle38 } from "@tabler/icons-react";
|
|
41681
41947
|
var WalletFundFlowDetail = ({
|
|
41682
41948
|
inputs,
|
|
@@ -41743,7 +42009,7 @@ var WalletFundFlowDetail = ({
|
|
|
41743
42009
|
const handleRetry = useCallback165(() => {
|
|
41744
42010
|
updateRuntime({ state: "idle", error: void 0, output: {} });
|
|
41745
42011
|
}, [updateRuntime]);
|
|
41746
|
-
return /* @__PURE__ */ React375.createElement(Stack269, { gap: "md" }, /* @__PURE__ */ React375.createElement(Stack269, { gap: 2 }, /* @__PURE__ */ React375.createElement(Text250, { fw: 600 }, block?.props?.title || "Fund Wallet"), /* @__PURE__ */ React375.createElement(Text250, { size: "sm", c: "dimmed" }, block?.props?.description || "Send tokens to the target wallet address.")), /* @__PURE__ */ React375.createElement(Stack269, { gap: "xs", p: "md", style: { backgroundColor: "var(--mantine-color-dark-6)", borderRadius: 8 } }, /* @__PURE__ */ React375.createElement(
|
|
42012
|
+
return /* @__PURE__ */ React375.createElement(Stack269, { gap: "md" }, /* @__PURE__ */ React375.createElement(Stack269, { gap: 2 }, /* @__PURE__ */ React375.createElement(Text250, { fw: 600 }, block?.props?.title || "Fund Wallet"), /* @__PURE__ */ React375.createElement(Text250, { size: "sm", c: "dimmed" }, block?.props?.description || "Send tokens to the target wallet address.")), /* @__PURE__ */ React375.createElement(Stack269, { gap: "xs", p: "md", style: { backgroundColor: "var(--mantine-color-dark-6)", borderRadius: 8 } }, /* @__PURE__ */ React375.createElement(Group140, { gap: "xs" }, /* @__PURE__ */ React375.createElement(Text250, { size: "xs", c: "dimmed", style: { width: 80 } }, "Address:"), /* @__PURE__ */ React375.createElement(Text250, { size: "xs", style: { wordBreak: "break-all" } }, resolvedAddress || "Waiting for address...")), /* @__PURE__ */ React375.createElement(Group140, { gap: "xs" }, /* @__PURE__ */ React375.createElement(Text250, { size: "xs", c: "dimmed", style: { width: 80 } }, "Amount:"), /* @__PURE__ */ React375.createElement(Text250, { size: "xs" }, resolvedInputs.amount || parsed.amount || 25e4))), isRunning && /* @__PURE__ */ React375.createElement(Group140, { gap: "xs" }, /* @__PURE__ */ React375.createElement(Loader84, { size: 14 }), /* @__PURE__ */ React375.createElement(Text250, { size: "sm" }, "Funding wallet...")), isCompleted && /* @__PURE__ */ React375.createElement(Alert100, { icon: /* @__PURE__ */ React375.createElement(IconCheck36, { size: 16 }), title: "Wallet Funded", color: "green" }, /* @__PURE__ */ React375.createElement(Stack269, { gap: "xs" }, /* @__PURE__ */ React375.createElement(Text250, { size: "sm" }, "Tokens sent successfully."), /* @__PURE__ */ React375.createElement(Text250, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "Tx Hash: ", txHash))), isStale && /* @__PURE__ */ React375.createElement(Alert100, { icon: /* @__PURE__ */ React375.createElement(IconAlertCircle38, { size: 16 }), color: "yellow", title: "Inconsistent State" }, /* @__PURE__ */ React375.createElement(Text250, { size: "sm" }, "Marked completed but no transaction hash recorded. Click Reset to clear and re-run via the slider."), /* @__PURE__ */ React375.createElement(Group140, { mt: "xs" }, /* @__PURE__ */ React375.createElement("button", { type: "button", onClick: handleRetry }, "Reset"))), isFailed && errorMessage && /* @__PURE__ */ React375.createElement(Alert100, { icon: /* @__PURE__ */ React375.createElement(IconAlertCircle38, { size: 16 }), color: "red", styles: actionAlertStyles }, errorMessage));
|
|
41747
42013
|
};
|
|
41748
42014
|
|
|
41749
42015
|
// src/mantine/blocks/action/actionTypes/walletFund/index.ts
|
|
@@ -41768,7 +42034,7 @@ var WalletGenerateAndFundConfig = () => {
|
|
|
41768
42034
|
|
|
41769
42035
|
// src/mantine/blocks/action/actionTypes/walletGenerateAndFund/WalletGenerateAndFundFlowDetail.tsx
|
|
41770
42036
|
import React377, { useCallback as useCallback166 } from "react";
|
|
41771
|
-
import { Alert as Alert101, Button as Button89, Group as
|
|
42037
|
+
import { Alert as Alert101, Button as Button89, Group as Group141, Loader as Loader85, Stack as Stack271, Text as Text252 } from "@mantine/core";
|
|
41772
42038
|
import { IconCheck as IconCheck37, IconAlertCircle as IconAlertCircle39 } from "@tabler/icons-react";
|
|
41773
42039
|
var WalletGenerateAndFundFlowDetail = ({ block, runtime, updateRuntime, isDisabled, executeAction }) => {
|
|
41774
42040
|
const generatedAddress = runtime.output?.address || "";
|
|
@@ -41804,7 +42070,7 @@ var WalletGenerateAndFundFlowDetail = ({ block, runtime, updateRuntime, isDisabl
|
|
|
41804
42070
|
const handleRetry = useCallback166(() => {
|
|
41805
42071
|
updateRuntime({ state: "idle", error: void 0, output: {} });
|
|
41806
42072
|
}, [updateRuntime]);
|
|
41807
|
-
return /* @__PURE__ */ React377.createElement(Stack271, { gap: "md" }, /* @__PURE__ */ React377.createElement(Stack271, { gap: 2 }, /* @__PURE__ */ React377.createElement(Text252, { fw: 600 }, block?.props?.title || "Generate & Fund Wallet"), /* @__PURE__ */ React377.createElement(Text252, { size: "sm", c: "dimmed" }, block?.props?.description || "Generate a new wallet and fund it with IXO tokens.")), isRunning && /* @__PURE__ */ React377.createElement(
|
|
42073
|
+
return /* @__PURE__ */ React377.createElement(Stack271, { gap: "md" }, /* @__PURE__ */ React377.createElement(Stack271, { gap: 2 }, /* @__PURE__ */ React377.createElement(Text252, { fw: 600 }, block?.props?.title || "Generate & Fund Wallet"), /* @__PURE__ */ React377.createElement(Text252, { size: "sm", c: "dimmed" }, block?.props?.description || "Generate a new wallet and fund it with IXO tokens.")), isRunning && /* @__PURE__ */ React377.createElement(Group141, { gap: "xs" }, /* @__PURE__ */ React377.createElement(Loader85, { size: 14 }), /* @__PURE__ */ React377.createElement(Text252, { size: "sm" }, "Generating wallet and funding...")), isCompleted && /* @__PURE__ */ React377.createElement(Alert101, { icon: /* @__PURE__ */ React377.createElement(IconCheck37, { size: 16 }), title: "Wallet Generated & Funded", color: "green" }, /* @__PURE__ */ React377.createElement(Stack271, { gap: "xs" }, generatedAddress && /* @__PURE__ */ React377.createElement(Text252, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "Address: ", generatedAddress), generatedDid && /* @__PURE__ */ React377.createElement(Text252, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "DID: ", generatedDid), txHash && /* @__PURE__ */ React377.createElement(Text252, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "Tx Hash: ", txHash), /* @__PURE__ */ React377.createElement(Text252, { size: "xs", c: "dimmed" }, "Mnemonic has been stored securely."))), isStale && /* @__PURE__ */ React377.createElement(Alert101, { icon: /* @__PURE__ */ React377.createElement(IconAlertCircle39, { size: 16 }), color: "yellow", title: "Inconsistent State" }, /* @__PURE__ */ React377.createElement(Stack271, { gap: "xs" }, /* @__PURE__ */ React377.createElement(Text252, { size: "sm" }, "Marked completed but no proof recorded. Stale state \u2014 reset and re-run."), /* @__PURE__ */ React377.createElement(Group141, null, /* @__PURE__ */ React377.createElement(Button89, { variant: "outline", size: "xs", onClick: handleRetry }, "Reset"), /* @__PURE__ */ React377.createElement(Button89, { variant: "filled", size: "xs", onClick: handleExecute }, "Force Run Now")))), isFailed && errorMessage && /* @__PURE__ */ React377.createElement(Alert101, { icon: /* @__PURE__ */ React377.createElement(IconAlertCircle39, { size: 16 }), color: "red", styles: actionAlertStyles }, errorMessage), isFailed && /* @__PURE__ */ React377.createElement(Group141, null, /* @__PURE__ */ React377.createElement(Button89, { variant: "outline", onClick: handleRetry }, "Try Again")), !isRunning && !isStale && /* @__PURE__ */ React377.createElement(Group141, null, /* @__PURE__ */ React377.createElement(Button89, { variant: "filled", size: "sm", onClick: handleExecute, disabled: isDisabled }, isCompleted ? "Re-generate & Fund" : "Run Now")));
|
|
41808
42074
|
};
|
|
41809
42075
|
|
|
41810
42076
|
// src/mantine/blocks/action/actionTypes/walletGenerateAndFund/index.ts
|
|
@@ -41889,7 +42155,7 @@ var IidCreateConfig = ({ inputs, onInputsChange }) => {
|
|
|
41889
42155
|
|
|
41890
42156
|
// src/mantine/blocks/action/actionTypes/iidCreate/IidCreateFlowDetail.tsx
|
|
41891
42157
|
import React379 from "react";
|
|
41892
|
-
import { Alert as Alert102, Button as Button90, Group as
|
|
42158
|
+
import { Alert as Alert102, Button as Button90, Group as Group142, Loader as Loader86, Stack as Stack273, Text as Text254 } from "@mantine/core";
|
|
41893
42159
|
import { IconCheck as IconCheck38, IconAlertCircle as IconAlertCircle40 } from "@tabler/icons-react";
|
|
41894
42160
|
|
|
41895
42161
|
// src/mantine/blocks/action/hooks/useActionExecution.ts
|
|
@@ -41994,7 +42260,7 @@ var IidCreateFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDi
|
|
|
41994
42260
|
logTag: "iid.create",
|
|
41995
42261
|
failureMessage: "Failed to create DID document"
|
|
41996
42262
|
});
|
|
41997
|
-
return /* @__PURE__ */ React379.createElement(Stack273, { gap: "md" }, /* @__PURE__ */ React379.createElement(Stack273, { gap: 2 }, /* @__PURE__ */ React379.createElement(Text254, { fw: 600 }, block?.props?.title || "Create DID Document"), /* @__PURE__ */ React379.createElement(Text254, { size: "sm", c: "dimmed" }, block?.props?.description || "Create a DID document on-chain.")), !isRunning && !isCompleted && !isStale && !isFailed && !inputsReady && /* @__PURE__ */ React379.createElement(
|
|
42263
|
+
return /* @__PURE__ */ React379.createElement(Stack273, { gap: "md" }, /* @__PURE__ */ React379.createElement(Stack273, { gap: 2 }, /* @__PURE__ */ React379.createElement(Text254, { fw: 600 }, block?.props?.title || "Create DID Document"), /* @__PURE__ */ React379.createElement(Text254, { size: "sm", c: "dimmed" }, block?.props?.description || "Create a DID document on-chain.")), !isRunning && !isCompleted && !isStale && !isFailed && !inputsReady && /* @__PURE__ */ React379.createElement(Group142, { gap: "xs" }, /* @__PURE__ */ React379.createElement(Loader86, { size: 14 }), /* @__PURE__ */ React379.createElement(Text254, { size: "sm", c: "dimmed" }, "Waiting for upstream wallet (mnemonic / DID / address / pubKey)...")), isRunning && /* @__PURE__ */ React379.createElement(Group142, { gap: "xs" }, /* @__PURE__ */ React379.createElement(Loader86, { size: 14 }), /* @__PURE__ */ React379.createElement(Text254, { size: "sm" }, "Creating DID document on-chain...")), isCompleted && /* @__PURE__ */ React379.createElement(Alert102, { icon: /* @__PURE__ */ React379.createElement(IconCheck38, { size: 16 }), title: alreadyExisted ? "DID Document Already Exists" : "DID Document Created", color: alreadyExisted ? "blue" : "green" }, /* @__PURE__ */ React379.createElement(Stack273, { gap: "xs" }, /* @__PURE__ */ React379.createElement(Text254, { size: "sm" }, alreadyExisted ? "DID document already existed on-chain." : "DID document created and verified on-chain."), createdDid && /* @__PURE__ */ React379.createElement(Text254, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "DID: ", createdDid), txHash && txHash !== "already-exists" && /* @__PURE__ */ React379.createElement(Text254, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "Tx: ", txHash))), isStale && /* @__PURE__ */ React379.createElement(Alert102, { icon: /* @__PURE__ */ React379.createElement(IconAlertCircle40, { size: 16 }), color: "yellow", title: "Inconsistent State" }, /* @__PURE__ */ React379.createElement(Stack273, { gap: "xs" }, /* @__PURE__ */ React379.createElement(Text254, { size: "sm" }, "Block was marked completed but no transaction hash was recorded. This is stale state from a previous run \u2014 click below to reset and re-run."), /* @__PURE__ */ React379.createElement(Group142, null, /* @__PURE__ */ React379.createElement(Button90, { variant: "outline", size: "xs", onClick: handleRetry }, "Reset"), /* @__PURE__ */ React379.createElement(Button90, { variant: "filled", size: "xs", onClick: handleExecute, disabled: !inputsReady }, "Force Run Now")))), isFailed && errorMessage && /* @__PURE__ */ React379.createElement(Alert102, { icon: /* @__PURE__ */ React379.createElement(IconAlertCircle40, { size: 16 }), color: "red", styles: actionAlertStyles }, errorMessage), isFailed && /* @__PURE__ */ React379.createElement(Group142, null, /* @__PURE__ */ React379.createElement(Button90, { variant: "outline", onClick: handleRetry }, "Try Again")), !isRunning && !isStale && /* @__PURE__ */ React379.createElement(Group142, null, /* @__PURE__ */ React379.createElement(Button90, { variant: "filled", size: "sm", onClick: handleExecute, disabled: !inputsReady || isDisabled }, isCompleted ? "Re-run" : inputsReady ? "Run Now" : "Waiting for inputs...")));
|
|
41998
42264
|
};
|
|
41999
42265
|
|
|
42000
42266
|
// src/mantine/blocks/action/actionTypes/iidCreate/index.ts
|
|
@@ -42091,7 +42357,7 @@ var MatrixRegisterConfig = ({ inputs, onInputsChange }) => {
|
|
|
42091
42357
|
|
|
42092
42358
|
// src/mantine/blocks/action/actionTypes/matrixRegister/MatrixRegisterFlowDetail.tsx
|
|
42093
42359
|
import React381, { useCallback as useCallback170, useMemo as useMemo151 } from "react";
|
|
42094
|
-
import { Alert as Alert103, Button as Button91, Group as
|
|
42360
|
+
import { Alert as Alert103, Button as Button91, Group as Group143, Loader as Loader87, Stack as Stack275, Text as Text256 } from "@mantine/core";
|
|
42095
42361
|
import { IconCheck as IconCheck39, IconAlertCircle as IconAlertCircle41 } from "@tabler/icons-react";
|
|
42096
42362
|
var MatrixRegisterFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled, executeAction }) => {
|
|
42097
42363
|
const parsed = useMemo151(() => parseMatrixRegisterInputs(inputs), [inputs]);
|
|
@@ -42145,7 +42411,7 @@ var MatrixRegisterFlowDetail = ({ inputs, editor, block, runtime, updateRuntime,
|
|
|
42145
42411
|
const handleRetry = useCallback170(() => {
|
|
42146
42412
|
updateRuntime({ state: "idle", error: void 0, output: {} });
|
|
42147
42413
|
}, [updateRuntime]);
|
|
42148
|
-
return /* @__PURE__ */ React381.createElement(Stack275, { gap: "md" }, /* @__PURE__ */ React381.createElement(Stack275, { gap: 2 }, /* @__PURE__ */ React381.createElement(Text256, { fw: 600 }, block?.props?.title || "Register Matrix Account"), /* @__PURE__ */ React381.createElement(Text256, { size: "sm", c: "dimmed" }, block?.props?.description || "Register a Matrix account, set up encryption, and create a default room.")), !isRunning && !isCompleted && !isStale && !isFailed && !inputsReady && /* @__PURE__ */ React381.createElement(
|
|
42414
|
+
return /* @__PURE__ */ React381.createElement(Stack275, { gap: "md" }, /* @__PURE__ */ React381.createElement(Stack275, { gap: 2 }, /* @__PURE__ */ React381.createElement(Text256, { fw: 600 }, block?.props?.title || "Register Matrix Account"), /* @__PURE__ */ React381.createElement(Text256, { size: "sm", c: "dimmed" }, block?.props?.description || "Register a Matrix account, set up encryption, and create a default room.")), !isRunning && !isCompleted && !isStale && !isFailed && !inputsReady && /* @__PURE__ */ React381.createElement(Group143, { gap: "xs" }, /* @__PURE__ */ React381.createElement(Loader87, { size: 14 }), /* @__PURE__ */ React381.createElement(Text256, { size: "sm", c: "dimmed" }, "Waiting for upstream wallet + form inputs...")), isRunning && /* @__PURE__ */ React381.createElement(Group143, { gap: "xs" }, /* @__PURE__ */ React381.createElement(Loader87, { size: 14 }), /* @__PURE__ */ React381.createElement(Text256, { size: "sm" }, "Registering Matrix account...")), isCompleted && /* @__PURE__ */ React381.createElement(Alert103, { icon: /* @__PURE__ */ React381.createElement(IconCheck39, { size: 16 }), title: "Matrix Account Registered", color: "green" }, /* @__PURE__ */ React381.createElement(Stack275, { gap: "xs" }, /* @__PURE__ */ React381.createElement(Text256, { size: "sm" }, "Matrix account registered and configured successfully."), /* @__PURE__ */ React381.createElement(Text256, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "User ID: ", matrixUserId), matrixRoomId && /* @__PURE__ */ React381.createElement(Text256, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "Room ID: ", matrixRoomId))), isStale && /* @__PURE__ */ React381.createElement(Alert103, { icon: /* @__PURE__ */ React381.createElement(IconAlertCircle41, { size: 16 }), color: "yellow", title: "Inconsistent State" }, /* @__PURE__ */ React381.createElement(Stack275, { gap: "xs" }, /* @__PURE__ */ React381.createElement(Text256, { size: "sm" }, "Marked completed but no matrixUserId recorded. Stale state \u2014 reset and re-run."), /* @__PURE__ */ React381.createElement(Group143, null, /* @__PURE__ */ React381.createElement(Button91, { variant: "outline", size: "xs", onClick: handleRetry }, "Reset"), /* @__PURE__ */ React381.createElement(Button91, { variant: "filled", size: "xs", onClick: handleExecute, disabled: !inputsReady }, "Force Run Now")))), isFailed && errorMessage && /* @__PURE__ */ React381.createElement(Alert103, { icon: /* @__PURE__ */ React381.createElement(IconAlertCircle41, { size: 16 }), color: "red", styles: actionAlertStyles }, errorMessage), isFailed && /* @__PURE__ */ React381.createElement(Group143, null, /* @__PURE__ */ React381.createElement(Button91, { variant: "outline", onClick: handleRetry }, "Try Again")), !isRunning && !isStale && /* @__PURE__ */ React381.createElement(Group143, null, /* @__PURE__ */ React381.createElement(Button91, { variant: "filled", size: "sm", onClick: handleExecute, disabled: !inputsReady || isDisabled }, isCompleted ? "Re-run" : inputsReady ? "Run Now" : "Waiting for inputs...")));
|
|
42149
42415
|
};
|
|
42150
42416
|
|
|
42151
42417
|
// src/mantine/blocks/action/actionTypes/matrixRegister/index.ts
|
|
@@ -42249,7 +42515,7 @@ var IdentityCreateConfig = ({ inputs, onInputsChange }) => {
|
|
|
42249
42515
|
|
|
42250
42516
|
// src/mantine/blocks/action/actionTypes/identityCreate/IdentityCreateFlowDetail.tsx
|
|
42251
42517
|
import React383, { useMemo as useMemo152 } from "react";
|
|
42252
|
-
import { Alert as Alert104, Button as Button92, Group as
|
|
42518
|
+
import { Alert as Alert104, Button as Button92, Group as Group144, Loader as Loader88, Stack as Stack277, Text as Text258 } from "@mantine/core";
|
|
42253
42519
|
import { IconCheck as IconCheck40, IconAlertCircle as IconAlertCircle42 } from "@tabler/icons-react";
|
|
42254
42520
|
var IdentityCreateFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled, executeAction }) => {
|
|
42255
42521
|
const { resolvedInputs: base } = useResolvedInputs(editor, inputs, { fields: ["mnemonic", "did", "address", "pubKey", "pin", "oracleName", "avatarUrl", "formAnswers"], required: ["mnemonic", "did", "address", "pubKey"] }, block?.id);
|
|
@@ -42289,7 +42555,7 @@ var IdentityCreateFlowDetail = ({ inputs, editor, block, runtime, updateRuntime,
|
|
|
42289
42555
|
logTag: "identity.create",
|
|
42290
42556
|
failureMessage: "Failed to create identity"
|
|
42291
42557
|
});
|
|
42292
|
-
return /* @__PURE__ */ React383.createElement(Stack277, { gap: "md" }, /* @__PURE__ */ React383.createElement(Stack277, { gap: 2 }, /* @__PURE__ */ React383.createElement(Text258, { fw: 600 }, block?.props?.title || "Create Identity"), /* @__PURE__ */ React383.createElement(Text258, { size: "sm", c: "dimmed" }, block?.props?.description || "Create IID document on-chain and register Matrix account.")), !isRunning && !isCompleted && !isStale && !isFailed && !inputsReady && /* @__PURE__ */ React383.createElement(
|
|
42558
|
+
return /* @__PURE__ */ React383.createElement(Stack277, { gap: "md" }, /* @__PURE__ */ React383.createElement(Stack277, { gap: 2 }, /* @__PURE__ */ React383.createElement(Text258, { fw: 600 }, block?.props?.title || "Create Identity"), /* @__PURE__ */ React383.createElement(Text258, { size: "sm", c: "dimmed" }, block?.props?.description || "Create IID document on-chain and register Matrix account.")), !isRunning && !isCompleted && !isStale && !isFailed && !inputsReady && /* @__PURE__ */ React383.createElement(Group144, { gap: "xs" }, /* @__PURE__ */ React383.createElement(Loader88, { size: 14 }), /* @__PURE__ */ React383.createElement(Text258, { size: "sm", c: "dimmed" }, "Waiting for upstream inputs (mnemonic / DID / address / pubKey / pin / oracleName)...")), isRunning && /* @__PURE__ */ React383.createElement(Group144, { gap: "xs" }, /* @__PURE__ */ React383.createElement(Loader88, { size: 14 }), /* @__PURE__ */ React383.createElement(Text258, { size: "sm" }, "Creating identity (IID + Matrix)...")), isCompleted && /* @__PURE__ */ React383.createElement(Alert104, { icon: /* @__PURE__ */ React383.createElement(IconCheck40, { size: 16 }), title: alreadyExisted ? "Identity Created (IID Already Existed)" : "Identity Created", color: alreadyExisted ? "blue" : "green" }, /* @__PURE__ */ React383.createElement(Stack277, { gap: "xs" }, /* @__PURE__ */ React383.createElement(Text258, { size: "sm" }, alreadyExisted ? "IID document already existed on-chain. Matrix account registered successfully." : "IID document created on-chain and Matrix account registered successfully."), createdDid && /* @__PURE__ */ React383.createElement(Text258, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "DID: ", createdDid), txHash && txHash !== "already-exists" && /* @__PURE__ */ React383.createElement(Text258, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "Tx: ", txHash), matrixUserId && /* @__PURE__ */ React383.createElement(Text258, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "Matrix: ", matrixUserId), matrixRoomId && /* @__PURE__ */ React383.createElement(Text258, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "Room: ", matrixRoomId))), isStale && /* @__PURE__ */ React383.createElement(Alert104, { icon: /* @__PURE__ */ React383.createElement(IconAlertCircle42, { size: 16 }), color: "yellow", title: "Inconsistent State" }, /* @__PURE__ */ React383.createElement(Stack277, { gap: "xs" }, /* @__PURE__ */ React383.createElement(Text258, { size: "sm" }, "Block was marked completed but missing proof (need both IID tx/alreadyExisted and matrixUserId). This is stale state from a previous run \u2014 click below to reset and re-run."), /* @__PURE__ */ React383.createElement(Group144, null, /* @__PURE__ */ React383.createElement(Button92, { variant: "outline", size: "xs", onClick: handleRetry }, "Reset"), /* @__PURE__ */ React383.createElement(Button92, { variant: "filled", size: "xs", onClick: handleExecute, disabled: !inputsReady }, "Force Run Now")))), isFailed && errorMessage && /* @__PURE__ */ React383.createElement(Alert104, { icon: /* @__PURE__ */ React383.createElement(IconAlertCircle42, { size: 16 }), color: "red", styles: actionAlertStyles }, errorMessage), isFailed && /* @__PURE__ */ React383.createElement(Group144, null, /* @__PURE__ */ React383.createElement(Button92, { variant: "outline", onClick: handleRetry }, "Try Again")), !isRunning && !isStale && /* @__PURE__ */ React383.createElement(Group144, null, /* @__PURE__ */ React383.createElement(Button92, { variant: "filled", size: "sm", onClick: handleExecute, disabled: !inputsReady || isDisabled }, isCompleted ? "Re-run" : inputsReady ? "Run Now" : "Waiting for inputs...")));
|
|
42293
42559
|
};
|
|
42294
42560
|
|
|
42295
42561
|
// src/mantine/blocks/action/actionTypes/identityCreate/index.ts
|
|
@@ -42506,7 +42772,7 @@ var EntityCreateOracleConfig = ({ inputs, onInputsChange }) => {
|
|
|
42506
42772
|
|
|
42507
42773
|
// src/mantine/blocks/action/actionTypes/entityCreateOracle/EntityCreateOracleFlowDetail.tsx
|
|
42508
42774
|
import React385, { useCallback as useCallback173, useMemo as useMemo153 } from "react";
|
|
42509
|
-
import { ActionIcon as ActionIcon50, Alert as Alert105, Button as Button93, CopyButton as CopyButton2, Group as
|
|
42775
|
+
import { ActionIcon as ActionIcon50, Alert as Alert105, Button as Button93, CopyButton as CopyButton2, Group as Group145, Loader as Loader89, Stack as Stack279, Text as Text260, Tooltip as Tooltip33 } from "@mantine/core";
|
|
42510
42776
|
import { IconCheck as IconCheck41, IconAlertCircle as IconAlertCircle43, IconCopy as IconCopy2 } from "@tabler/icons-react";
|
|
42511
42777
|
var EntityCreateOracleFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled, executeAction }) => {
|
|
42512
42778
|
const parsed = useMemo153(() => parseEntityCreateOracleInputs(inputs), [inputs]);
|
|
@@ -42594,7 +42860,7 @@ var EntityCreateOracleFlowDetail = ({ inputs, editor, block, runtime, updateRunt
|
|
|
42594
42860
|
const handleRetry = useCallback173(() => {
|
|
42595
42861
|
updateRuntime({ state: "idle", error: void 0, output: {} });
|
|
42596
42862
|
}, [updateRuntime]);
|
|
42597
|
-
return /* @__PURE__ */ React385.createElement(Stack279, { gap: "md" }, /* @__PURE__ */ React385.createElement(Stack279, { gap: 2 }, /* @__PURE__ */ React385.createElement(Text260, { fw: 600 }, block?.props?.title || "Create Oracle Entity"), /* @__PURE__ */ React385.createElement(Text260, { size: "sm", c: "dimmed" }, block?.props?.description || "Create an oracle entity on-chain.")), !isRunning && !isCompleted && !isStale && !isFailed && !inputsReady && /* @__PURE__ */ React385.createElement(
|
|
42863
|
+
return /* @__PURE__ */ React385.createElement(Stack279, { gap: "md" }, /* @__PURE__ */ React385.createElement(Stack279, { gap: 2 }, /* @__PURE__ */ React385.createElement(Text260, { fw: 600 }, block?.props?.title || "Create Oracle Entity"), /* @__PURE__ */ React385.createElement(Text260, { size: "sm", c: "dimmed" }, block?.props?.description || "Create an oracle entity on-chain.")), !isRunning && !isCompleted && !isStale && !isFailed && !inputsReady && /* @__PURE__ */ React385.createElement(Group145, { gap: "xs" }, /* @__PURE__ */ React385.createElement(Loader89, { size: 14 }), /* @__PURE__ */ React385.createElement(Text260, { size: "sm", c: "dimmed" }, "Waiting for upstream wallet + matrix + form inputs...")), isRunning && /* @__PURE__ */ React385.createElement(Group145, { gap: "xs" }, /* @__PURE__ */ React385.createElement(Loader89, { size: 14 }), /* @__PURE__ */ React385.createElement(Text260, { size: "sm" }, "Creating oracle entity...")), isCompleted && /* @__PURE__ */ React385.createElement(Alert105, { icon: /* @__PURE__ */ React385.createElement(IconCheck41, { size: 16 }), title: "Oracle Entity Created", color: "green" }, /* @__PURE__ */ React385.createElement(Stack279, { gap: "xs" }, /* @__PURE__ */ React385.createElement(Text260, { size: "sm" }, "Oracle entity created successfully on-chain."), /* @__PURE__ */ React385.createElement(Group145, { gap: 6, wrap: "nowrap", align: "center" }, /* @__PURE__ */ React385.createElement(Text260, { size: "xs", c: "dimmed" }, "Entity DID:"), /* @__PURE__ */ React385.createElement(Text260, { size: "xs", ff: "monospace", style: { wordBreak: "break-all" } }, entityDid), /* @__PURE__ */ React385.createElement(CopyButton2, { value: entityDid, timeout: 1500 }, ({ copied, copy }) => /* @__PURE__ */ React385.createElement(Tooltip33, { label: copied ? "Copied" : "Copy" }, /* @__PURE__ */ React385.createElement(ActionIcon50, { size: "sm", variant: "subtle", color: copied ? "teal" : "gray", onClick: copy }, copied ? /* @__PURE__ */ React385.createElement(IconCheck41, { size: 14 }) : /* @__PURE__ */ React385.createElement(IconCopy2, { size: 14 }))))))), isStale && /* @__PURE__ */ React385.createElement(Alert105, { icon: /* @__PURE__ */ React385.createElement(IconAlertCircle43, { size: 16 }), color: "yellow", title: "Inconsistent State" }, /* @__PURE__ */ React385.createElement(Stack279, { gap: "xs" }, /* @__PURE__ */ React385.createElement(Text260, { size: "sm" }, "Marked completed but no entityDid recorded. Stale state \u2014 reset and re-run."), /* @__PURE__ */ React385.createElement(Group145, null, /* @__PURE__ */ React385.createElement(Button93, { variant: "outline", size: "xs", onClick: handleRetry }, "Reset"), /* @__PURE__ */ React385.createElement(Button93, { variant: "filled", size: "xs", onClick: handleExecute, disabled: !inputsReady }, "Force Run Now")))), isFailed && errorMessage && /* @__PURE__ */ React385.createElement(Alert105, { icon: /* @__PURE__ */ React385.createElement(IconAlertCircle43, { size: 16 }), color: "red", styles: actionAlertStyles }, errorMessage), isFailed && /* @__PURE__ */ React385.createElement(Group145, null, /* @__PURE__ */ React385.createElement(Button93, { variant: "outline", onClick: handleRetry }, "Try Again")), !isRunning && !isStale && /* @__PURE__ */ React385.createElement(Group145, null, /* @__PURE__ */ React385.createElement(Button93, { variant: "filled", size: "sm", onClick: handleExecute, disabled: !inputsReady || isDisabled }, isCompleted ? "Re-run" : inputsReady ? "Run Now" : "Waiting for inputs...")));
|
|
42598
42864
|
};
|
|
42599
42865
|
|
|
42600
42866
|
// src/mantine/blocks/action/actionTypes/entityCreateOracle/index.ts
|
|
@@ -42667,7 +42933,7 @@ var SandboxProvisionConfig = ({ inputs, onInputsChange }) => {
|
|
|
42667
42933
|
|
|
42668
42934
|
// src/mantine/blocks/action/actionTypes/sandboxProvision/SandboxProvisionFlowDetail.tsx
|
|
42669
42935
|
import React387, { useCallback as useCallback175, useMemo as useMemo154 } from "react";
|
|
42670
|
-
import { Alert as Alert106, Anchor as Anchor5, Button as Button94, Group as
|
|
42936
|
+
import { Alert as Alert106, Anchor as Anchor5, Button as Button94, Group as Group146, Loader as Loader90, Stack as Stack281, Text as Text262 } from "@mantine/core";
|
|
42671
42937
|
import { IconCheck as IconCheck42, IconAlertCircle as IconAlertCircle44 } from "@tabler/icons-react";
|
|
42672
42938
|
var SandboxProvisionFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled, executeAction }) => {
|
|
42673
42939
|
const parsed = useMemo154(() => parseSandboxProvisionInputs(inputs), [inputs]);
|
|
@@ -42714,7 +42980,7 @@ var SandboxProvisionFlowDetail = ({ inputs, editor, block, runtime, updateRuntim
|
|
|
42714
42980
|
const handleRetry = useCallback175(() => {
|
|
42715
42981
|
updateRuntime({ state: "idle", error: void 0, output: {} });
|
|
42716
42982
|
}, [updateRuntime]);
|
|
42717
|
-
return /* @__PURE__ */ React387.createElement(Stack281, { gap: "md" }, /* @__PURE__ */ React387.createElement(Stack281, { gap: 2 }, /* @__PURE__ */ React387.createElement(Text262, { fw: 600 }, block?.props?.title || "Provision Sandbox"), /* @__PURE__ */ React387.createElement(Text262, { size: "sm", c: "dimmed" }, block?.props?.description || "Provision a sandbox environment for the oracle.")), !isRunning && !isCompleted && !isStale && !isFailed && !inputsReady && /* @__PURE__ */ React387.createElement(
|
|
42983
|
+
return /* @__PURE__ */ React387.createElement(Stack281, { gap: "md" }, /* @__PURE__ */ React387.createElement(Stack281, { gap: 2 }, /* @__PURE__ */ React387.createElement(Text262, { fw: 600 }, block?.props?.title || "Provision Sandbox"), /* @__PURE__ */ React387.createElement(Text262, { size: "sm", c: "dimmed" }, block?.props?.description || "Provision a sandbox environment for the oracle.")), !isRunning && !isCompleted && !isStale && !isFailed && !inputsReady && /* @__PURE__ */ React387.createElement(Group146, { gap: "xs" }, /* @__PURE__ */ React387.createElement(Loader90, { size: 14 }), /* @__PURE__ */ React387.createElement(Text262, { size: "sm", c: "dimmed" }, "Waiting for upstream entity DID + matrix room...")), isRunning && /* @__PURE__ */ React387.createElement(Group146, { gap: "xs" }, /* @__PURE__ */ React387.createElement(Loader90, { size: 14 }), /* @__PURE__ */ React387.createElement(Text262, { size: "sm" }, "Provisioning sandbox environment...")), isCompleted && /* @__PURE__ */ React387.createElement(Alert106, { icon: /* @__PURE__ */ React387.createElement(IconCheck42, { size: 16 }), title: "Sandbox Ready", color: "green" }, /* @__PURE__ */ React387.createElement(Stack281, { gap: "xs" }, /* @__PURE__ */ React387.createElement(Text262, { size: "sm" }, "Sandbox environment provisioned successfully."), sandboxUrl && /* @__PURE__ */ React387.createElement(Anchor5, { href: sandboxUrl, target: "_blank", size: "xs" }, sandboxUrl))), isStale && /* @__PURE__ */ React387.createElement(Alert106, { icon: /* @__PURE__ */ React387.createElement(IconAlertCircle44, { size: 16 }), color: "yellow", title: "Inconsistent State" }, /* @__PURE__ */ React387.createElement(Stack281, { gap: "xs" }, /* @__PURE__ */ React387.createElement(Text262, { size: "sm" }, "Marked completed but no status or sandboxUrl recorded. Stale state \u2014 reset and re-run."), /* @__PURE__ */ React387.createElement(Group146, null, /* @__PURE__ */ React387.createElement(Button94, { variant: "outline", size: "xs", onClick: handleRetry }, "Reset"), /* @__PURE__ */ React387.createElement(Button94, { variant: "filled", size: "xs", onClick: handleExecute, disabled: !inputsReady }, "Force Run Now")))), isFailed && errorMessage && /* @__PURE__ */ React387.createElement(Alert106, { icon: /* @__PURE__ */ React387.createElement(IconAlertCircle44, { size: 16 }), color: "red", styles: actionAlertStyles }, errorMessage), isFailed && /* @__PURE__ */ React387.createElement(Group146, null, /* @__PURE__ */ React387.createElement(Button94, { variant: "outline", onClick: handleRetry }, "Try Again")), !isRunning && !isStale && /* @__PURE__ */ React387.createElement(Group146, null, /* @__PURE__ */ React387.createElement(Button94, { variant: "filled", size: "sm", onClick: handleExecute, disabled: !inputsReady || isDisabled }, isCompleted ? "Re-run" : inputsReady ? "Run Now" : "Waiting for inputs...")));
|
|
42718
42984
|
};
|
|
42719
42985
|
|
|
42720
42986
|
// src/mantine/blocks/action/actionTypes/sandboxProvision/index.ts
|
|
@@ -42777,7 +43043,7 @@ var OracleContractConfig = ({ inputs, onInputsChange }) => {
|
|
|
42777
43043
|
|
|
42778
43044
|
// src/mantine/blocks/action/actionTypes/oracleContract/OracleContractFlowDetail.tsx
|
|
42779
43045
|
import React389, { useCallback as useCallback177, useMemo as useMemo155 } from "react";
|
|
42780
|
-
import { Alert as Alert107, Button as Button95, Group as
|
|
43046
|
+
import { Alert as Alert107, Button as Button95, Group as Group147, Loader as Loader91, Stack as Stack283, Text as Text264 } from "@mantine/core";
|
|
42781
43047
|
import { IconCheck as IconCheck43, IconAlertCircle as IconAlertCircle45 } from "@tabler/icons-react";
|
|
42782
43048
|
var OracleContractFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled, executeAction }) => {
|
|
42783
43049
|
const parsed = useMemo155(() => parseOracleContractInputs(inputs), [inputs]);
|
|
@@ -42823,7 +43089,7 @@ var OracleContractFlowDetail = ({ inputs, editor, block, runtime, updateRuntime,
|
|
|
42823
43089
|
const handleRetry = useCallback177(() => {
|
|
42824
43090
|
updateRuntime({ state: "idle", error: void 0, output: {} });
|
|
42825
43091
|
}, [updateRuntime]);
|
|
42826
|
-
return /* @__PURE__ */ React389.createElement(Stack283, { gap: "md" }, /* @__PURE__ */ React389.createElement(Stack283, { gap: 2 }, /* @__PURE__ */ React389.createElement(Text264, { fw: 600 }, block?.props?.title || "Contract Oracle"), /* @__PURE__ */ React389.createElement(Text264, { size: "sm", c: "dimmed" }, block?.props?.description || "Create the user\u2194oracle Matrix DM room.")), !isRunning && !isCompleted && !isStale && !isFailed && !inputsReady && /* @__PURE__ */ React389.createElement(
|
|
43092
|
+
return /* @__PURE__ */ React389.createElement(Stack283, { gap: "md" }, /* @__PURE__ */ React389.createElement(Stack283, { gap: 2 }, /* @__PURE__ */ React389.createElement(Text264, { fw: 600 }, block?.props?.title || "Contract Oracle"), /* @__PURE__ */ React389.createElement(Text264, { size: "sm", c: "dimmed" }, block?.props?.description || "Create the user\u2194oracle Matrix DM room.")), !isRunning && !isCompleted && !isStale && !isFailed && !inputsReady && /* @__PURE__ */ React389.createElement(Group147, { gap: "xs" }, /* @__PURE__ */ React389.createElement(Loader91, { size: 14 }), /* @__PURE__ */ React389.createElement(Text264, { size: "sm", c: "dimmed" }, "Waiting for upstream oracle entity DID...")), isRunning && /* @__PURE__ */ React389.createElement(Group147, { gap: "xs" }, /* @__PURE__ */ React389.createElement(Loader91, { size: 14 }), /* @__PURE__ */ React389.createElement(Text264, { size: "sm" }, "Creating user\u2194oracle Matrix room...")), isCompleted && /* @__PURE__ */ React389.createElement(Alert107, { icon: /* @__PURE__ */ React389.createElement(IconCheck43, { size: 16 }), title: "Oracle Contracted", color: "green" }, /* @__PURE__ */ React389.createElement(Stack283, { gap: "xs" }, /* @__PURE__ */ React389.createElement(Text264, { size: "sm" }, "User\u2194oracle Matrix room is ready."), /* @__PURE__ */ React389.createElement(Text264, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "Room ID: ", userOracleRoomId), userOracleRoomAlias && /* @__PURE__ */ React389.createElement(Text264, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "Alias: ", userOracleRoomAlias))), isStale && /* @__PURE__ */ React389.createElement(Alert107, { icon: /* @__PURE__ */ React389.createElement(IconAlertCircle45, { size: 16 }), color: "yellow", title: "Inconsistent State" }, /* @__PURE__ */ React389.createElement(Stack283, { gap: "xs" }, /* @__PURE__ */ React389.createElement(Text264, { size: "sm" }, "Marked completed but no userOracleRoomId recorded. Stale state \u2014 reset and re-run."), /* @__PURE__ */ React389.createElement(Group147, null, /* @__PURE__ */ React389.createElement(Button95, { variant: "outline", size: "xs", onClick: handleRetry }, "Reset"), /* @__PURE__ */ React389.createElement(Button95, { variant: "filled", size: "xs", onClick: handleExecute, disabled: !inputsReady }, "Force Run Now")))), isFailed && errorMessage && /* @__PURE__ */ React389.createElement(Alert107, { icon: /* @__PURE__ */ React389.createElement(IconAlertCircle45, { size: 16 }), color: "red", styles: actionAlertStyles }, errorMessage), isFailed && /* @__PURE__ */ React389.createElement(Group147, null, /* @__PURE__ */ React389.createElement(Button95, { variant: "outline", onClick: handleRetry }, "Try Again")), !isRunning && !isStale && /* @__PURE__ */ React389.createElement(Group147, null, /* @__PURE__ */ React389.createElement(Button95, { variant: "filled", size: "sm", onClick: handleExecute, disabled: !inputsReady || isDisabled }, isCompleted ? "Re-run" : inputsReady ? "Run Now" : "Waiting for inputs...")));
|
|
42827
43093
|
};
|
|
42828
43094
|
|
|
42829
43095
|
// src/mantine/blocks/action/actionTypes/oracleContract/index.ts
|
|
@@ -43024,7 +43290,7 @@ var OracleStoreSecretsConfig = ({ inputs, onInputsChange }) => {
|
|
|
43024
43290
|
|
|
43025
43291
|
// src/mantine/blocks/action/actionTypes/oracleStoreSecrets/OracleStoreSecretsFlowDetail.tsx
|
|
43026
43292
|
import React391, { useCallback as useCallback179, useEffect as useEffect169, useMemo as useMemo156, useRef as useRef53, useState as useState230 } from "react";
|
|
43027
|
-
import { Alert as Alert108, Button as Button96, Collapse as Collapse12, Divider as Divider37, Group as
|
|
43293
|
+
import { Alert as Alert108, Button as Button96, Collapse as Collapse12, Divider as Divider37, Group as Group148, Loader as Loader92, Stack as Stack285, Text as Text266 } from "@mantine/core";
|
|
43028
43294
|
import { IconAlertCircle as IconAlertCircle46, IconCheck as IconCheck44, IconChevronDown as IconChevronDown12, IconChevronUp as IconChevronUp5, IconLock } from "@tabler/icons-react";
|
|
43029
43295
|
|
|
43030
43296
|
// src/mantine/blocks/action/hooks/useIdempotencyCheck.ts
|
|
@@ -43185,7 +43451,7 @@ var OracleStoreSecretsFlowDetail = ({ inputs, editor, block, runtime, updateRunt
|
|
|
43185
43451
|
}, [updateRuntime]);
|
|
43186
43452
|
const lockIcon = /* @__PURE__ */ React391.createElement(IconLock, { size: 14 });
|
|
43187
43453
|
const submitDisabled = !inputsReady || !hasOpenRouter || isRunning || isCompleted || isDisabled;
|
|
43188
|
-
return /* @__PURE__ */ React391.createElement(Stack285, { gap: "md" }, /* @__PURE__ */ React391.createElement(Stack285, { gap: 2 }, /* @__PURE__ */ React391.createElement(Text266, { fw: 600 }, block?.props?.title || "Store Secrets"), /* @__PURE__ */ React391.createElement(Text266, { size: "sm", c: "dimmed" }, block?.props?.description || "Encrypt and store secrets in the oracle Matrix room.")), isChecking && /* @__PURE__ */ React391.createElement(
|
|
43454
|
+
return /* @__PURE__ */ React391.createElement(Stack285, { gap: "md" }, /* @__PURE__ */ React391.createElement(Stack285, { gap: 2 }, /* @__PURE__ */ React391.createElement(Text266, { fw: 600 }, block?.props?.title || "Store Secrets"), /* @__PURE__ */ React391.createElement(Text266, { size: "sm", c: "dimmed" }, block?.props?.description || "Encrypt and store secrets in the oracle Matrix room.")), isChecking && /* @__PURE__ */ React391.createElement(Group148, { gap: "xs" }, /* @__PURE__ */ React391.createElement(Loader92, { size: 14 }), /* @__PURE__ */ React391.createElement(Text266, { size: "sm", c: "dimmed" }, "Checking matrix room for already-stored secrets...")), !isChecking && !inputsReady && !isCompleted && !isStale && /* @__PURE__ */ React391.createElement(Group148, { gap: "xs" }, /* @__PURE__ */ React391.createElement(Loader92, { size: 14 }), /* @__PURE__ */ React391.createElement(Text266, { size: "sm", c: "dimmed" }, "Waiting for upstream blocks: ", missingFields.join(", "))), isCompleted && /* @__PURE__ */ React391.createElement(Stack285, { gap: "xs" }, /* @__PURE__ */ React391.createElement(Alert108, { icon: /* @__PURE__ */ React391.createElement(IconCheck44, { size: 16 }), title: "Secrets Stored", color: "green" }, /* @__PURE__ */ React391.createElement(Text266, { size: "sm" }, "All ", storedSecrets.length, " secrets already stored in the matrix room.")), /* @__PURE__ */ React391.createElement(Stack285, { gap: 2 }, storedSecrets.map((name) => /* @__PURE__ */ React391.createElement(Group148, { key: name, gap: "xs" }, /* @__PURE__ */ React391.createElement(IconLock, { size: 12 }), /* @__PURE__ */ React391.createElement(Text266, { size: "xs", c: "dimmed", style: { fontFamily: "monospace" } }, name)))), /* @__PURE__ */ React391.createElement(Group148, null, /* @__PURE__ */ React391.createElement(Button96, { variant: "outline", size: "xs", onClick: handleRestoreAll }, "Re-store all"))), isStale && /* @__PURE__ */ React391.createElement(Alert108, { icon: /* @__PURE__ */ React391.createElement(IconAlertCircle46, { size: 16 }), color: "yellow", title: "Inconsistent State" }, /* @__PURE__ */ React391.createElement(Stack285, { gap: "xs" }, /* @__PURE__ */ React391.createElement(Text266, { size: "sm" }, "Marked completed but no storedSecrets recorded. Stale state \u2014 reset and re-run."), /* @__PURE__ */ React391.createElement(Group148, null, /* @__PURE__ */ React391.createElement(Button96, { variant: "outline", size: "xs", onClick: handleRetry }, "Reset"), /* @__PURE__ */ React391.createElement(Button96, { variant: "filled", size: "xs", onClick: handleExecute, disabled: !inputsReady || !hasOpenRouter }, "Force Run Now")))), !isCompleted && !isStale && !isChecking && inputsReady && /* @__PURE__ */ React391.createElement(Stack285, { gap: "sm" }, /* @__PURE__ */ React391.createElement(Group148, { gap: "xs", align: "flex-end", wrap: "nowrap" }, lockIcon, /* @__PURE__ */ React391.createElement(BaseTextInput, { label: "SECP_MNEMONIC", readOnly: true, type: "password", value: resolvedInputs.mnemonic, style: { flex: 1 } })), /* @__PURE__ */ React391.createElement(Group148, { gap: "xs", align: "flex-end", wrap: "nowrap" }, lockIcon, /* @__PURE__ */ React391.createElement(BaseTextInput, { label: "MATRIX_ORACLE_ADMIN_PASSWORD", readOnly: true, type: "password", value: resolvedInputs.matrixPassword, style: { flex: 1 } })), /* @__PURE__ */ React391.createElement(Group148, { gap: "xs", align: "center", wrap: "nowrap" }, lockIcon, /* @__PURE__ */ React391.createElement(Stack285, { gap: 0, style: { flex: 1 } }, /* @__PURE__ */ React391.createElement(Text266, { size: "xs", c: "dimmed", style: { fontFamily: "monospace" } }, "MATRIX_ORACLE_ADMIN_ACCESS_TOKEN"), /* @__PURE__ */ React391.createElement(Text266, { size: "xs", c: "dimmed" }, "Generated by handler at submit time (fresh login)"))), /* @__PURE__ */ React391.createElement(Group148, { gap: "xs", align: "flex-end", wrap: "nowrap" }, lockIcon, /* @__PURE__ */ React391.createElement(BaseTextInput, { label: "MATRIX_RECOVERY_PHRASE", readOnly: true, type: "password", value: resolvedInputs.matrixRecoveryPhrase, style: { flex: 1 } })), /* @__PURE__ */ React391.createElement(Group148, { gap: "xs", align: "flex-end", wrap: "nowrap" }, lockIcon, /* @__PURE__ */ React391.createElement(BaseTextInput, { label: "MATRIX_VALUE_PIN", readOnly: true, type: "password", value: resolvedInputs.pin, style: { flex: 1 } })), /* @__PURE__ */ React391.createElement(Group148, { gap: "xs", align: "flex-end", wrap: "nowrap" }, lockIcon, isEditingOpenRouter ? /* @__PURE__ */ React391.createElement(
|
|
43189
43455
|
BaseTextInput,
|
|
43190
43456
|
{
|
|
43191
43457
|
label: "OPEN_ROUTER_API_KEY",
|
|
@@ -43195,7 +43461,7 @@ var OracleStoreSecretsFlowDetail = ({ inputs, editor, block, runtime, updateRunt
|
|
|
43195
43461
|
onChange: (event) => setOpenRouterDraft(event.currentTarget.value),
|
|
43196
43462
|
style: { flex: 1 }
|
|
43197
43463
|
}
|
|
43198
|
-
) : /* @__PURE__ */ React391.createElement(BaseTextInput, { label: "OPEN_ROUTER_API_KEY", readOnly: true, type: "password", value: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022", style: { flex: 1 } })), /* @__PURE__ */ React391.createElement(
|
|
43464
|
+
) : /* @__PURE__ */ React391.createElement(BaseTextInput, { label: "OPEN_ROUTER_API_KEY", readOnly: true, type: "password", value: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022", style: { flex: 1 } })), /* @__PURE__ */ React391.createElement(Group148, { gap: "xs", justify: "flex-end" }, isEditingOpenRouter ? /* @__PURE__ */ React391.createElement(React391.Fragment, null, /* @__PURE__ */ React391.createElement(Button96, { size: "xs", onClick: handleSaveOpenRouter, loading: isEncryptingOpenRouter, disabled: !openRouterDraft || !resolvedInputs.publicKeyMultibase }, "Save"), hasOpenRouter && /* @__PURE__ */ React391.createElement(Button96, { size: "xs", variant: "subtle", onClick: handleCancelEditOpenRouter }, "Cancel")) : /* @__PURE__ */ React391.createElement(Button96, { size: "xs", variant: "outline", onClick: handleChangeOpenRouter }, "Change")), /* @__PURE__ */ React391.createElement(Divider37, { variant: "dashed" }), /* @__PURE__ */ React391.createElement(Text266, { size: "sm", fw: 600 }, "Identifiers (stored as plain config \u2014 not encrypted)"), /* @__PURE__ */ React391.createElement(BaseTextInput, { label: "MATRIX_ORACLE_ADMIN_USER_ID", readOnly: true, value: resolvedInputs.matrixUserId }), /* @__PURE__ */ React391.createElement(BaseTextInput, { label: "MATRIX_ACCOUNT_ROOM_ID", readOnly: true, value: resolvedInputs.matrixAccountRoomId }), /* @__PURE__ */ React391.createElement(BaseTextInput, { label: "ORACLE_ENTITY_DID", readOnly: true, value: resolvedInputs.entityDid }), /* @__PURE__ */ React391.createElement(Divider37, { variant: "dashed" }), /* @__PURE__ */ React391.createElement(Stack285, { gap: "xs" }, /* @__PURE__ */ React391.createElement(Group148, { justify: "space-between", style: { cursor: "pointer", userSelect: "none" }, onClick: () => setShowAdditional((v) => !v) }, /* @__PURE__ */ React391.createElement(Text266, { size: "sm", fw: 500 }, "Additional Configuration"), /* @__PURE__ */ React391.createElement(Group148, { gap: 6 }, /* @__PURE__ */ React391.createElement(Text266, { size: "xs", c: "dimmed" }, "Stored as plain config \u2014 not encrypted"), showAdditional ? /* @__PURE__ */ React391.createElement(IconChevronUp5, { size: 14 }) : /* @__PURE__ */ React391.createElement(IconChevronDown12, { size: 14 }))), /* @__PURE__ */ React391.createElement(Collapse12, { in: showAdditional }, /* @__PURE__ */ React391.createElement(Stack285, { gap: "xs", pt: "xs" }, isLoadingConstants && /* @__PURE__ */ React391.createElement(Group148, { gap: 6 }, /* @__PURE__ */ React391.createElement(Loader92, { size: 12 }), /* @__PURE__ */ React391.createElement(Text266, { size: "xs", c: "dimmed" }, "Loading network constants\u2026")), /* @__PURE__ */ React391.createElement(BaseTextInput, { label: "ORACLE_NAME", value: resolvedInputs.oracleName || "", readOnly: true }), /* @__PURE__ */ React391.createElement(BaseTextInput, { label: "ORACLE_ADDRESS", value: resolvedInputs.oracleAddress || "", readOnly: true }), /* @__PURE__ */ React391.createElement(BaseTextInput, { label: "ORACLE_DID", value: resolvedInputs.oracleDid || "", readOnly: true }), networkConstants && Object.entries(networkConstants).map(([key, value]) => /* @__PURE__ */ React391.createElement(BaseTextInput, { key, label: key, value, readOnly: true }))))), isRunning && /* @__PURE__ */ React391.createElement(Group148, { gap: "xs" }, /* @__PURE__ */ React391.createElement(Loader92, { size: 14 }), /* @__PURE__ */ React391.createElement(Text266, { size: "sm" }, "Encrypting and storing secrets in matrix room...")), /* @__PURE__ */ React391.createElement(Group148, { justify: "flex-end" }, /* @__PURE__ */ React391.createElement(Button96, { variant: "filled", size: "sm", onClick: handleExecute, disabled: submitDisabled }, "Store Secrets"))), isFailed && errorMessage && /* @__PURE__ */ React391.createElement(Alert108, { icon: /* @__PURE__ */ React391.createElement(IconAlertCircle46, { size: 16 }), color: "red", styles: actionAlertStyles }, errorMessage), isFailed && /* @__PURE__ */ React391.createElement(Group148, null, /* @__PURE__ */ React391.createElement(Button96, { variant: "outline", onClick: handleRetry }, "Try Again")));
|
|
43199
43465
|
};
|
|
43200
43466
|
|
|
43201
43467
|
// src/mantine/blocks/action/actionTypes/oracleStoreSecrets/index.ts
|
|
@@ -43402,7 +43668,7 @@ var OracleStoreConfigConfig = ({ inputs, onInputsChange }) => {
|
|
|
43402
43668
|
|
|
43403
43669
|
// src/mantine/blocks/action/actionTypes/oracleStoreConfig/OracleStoreConfigFlowDetail.tsx
|
|
43404
43670
|
import React393, { useCallback as useCallback181, useMemo as useMemo157 } from "react";
|
|
43405
|
-
import { Alert as Alert109, Button as Button97, Group as
|
|
43671
|
+
import { Alert as Alert109, Button as Button97, Group as Group149, Loader as Loader93, Stack as Stack287, Text as Text268 } from "@mantine/core";
|
|
43406
43672
|
import { IconCheck as IconCheck45, IconAlertCircle as IconAlertCircle47 } from "@tabler/icons-react";
|
|
43407
43673
|
var OracleStoreConfigFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled, executeAction }) => {
|
|
43408
43674
|
const parsed = useMemo157(() => parseOracleStoreConfigInputs(inputs), [inputs]);
|
|
@@ -43469,7 +43735,7 @@ var OracleStoreConfigFlowDetail = ({ inputs, editor, block, runtime, updateRunti
|
|
|
43469
43735
|
const handleRetry = useCallback181(() => {
|
|
43470
43736
|
updateRuntime({ state: "idle", error: void 0, output: {} });
|
|
43471
43737
|
}, [updateRuntime]);
|
|
43472
|
-
return /* @__PURE__ */ React393.createElement(Stack287, { gap: "md" }, /* @__PURE__ */ React393.createElement(Stack287, { gap: 2 }, /* @__PURE__ */ React393.createElement(Text268, { fw: 600 }, block?.props?.title || "Store Oracle Configuration"), /* @__PURE__ */ React393.createElement(Text268, { size: "sm", c: "dimmed" }, block?.props?.description || "Stores oracle configuration as a Matrix room state event.")), !isRunning && !isCompleted && !isStale && !isFailed && !inputsReady && /* @__PURE__ */ React393.createElement(
|
|
43738
|
+
return /* @__PURE__ */ React393.createElement(Stack287, { gap: "md" }, /* @__PURE__ */ React393.createElement(Stack287, { gap: 2 }, /* @__PURE__ */ React393.createElement(Text268, { fw: 600 }, block?.props?.title || "Store Oracle Configuration"), /* @__PURE__ */ React393.createElement(Text268, { size: "sm", c: "dimmed" }, block?.props?.description || "Stores oracle configuration as a Matrix room state event.")), !isRunning && !isCompleted && !isStale && !isFailed && !inputsReady && /* @__PURE__ */ React393.createElement(Group149, { gap: "xs" }, /* @__PURE__ */ React393.createElement(Loader93, { size: 14 }), /* @__PURE__ */ React393.createElement(Text268, { size: "sm", c: "dimmed" }, "Waiting for upstream matrix room + entity DID + oracle name...")), isRunning && /* @__PURE__ */ React393.createElement(Group149, { gap: "xs" }, /* @__PURE__ */ React393.createElement(Loader93, { size: 14 }), /* @__PURE__ */ React393.createElement(Text268, { size: "sm" }, "Storing oracle configuration...")), isCompleted && /* @__PURE__ */ React393.createElement(Alert109, { icon: /* @__PURE__ */ React393.createElement(IconCheck45, { size: 16 }), title: "Configuration Stored", color: "green" }, /* @__PURE__ */ React393.createElement(Stack287, { gap: "xs" }, /* @__PURE__ */ React393.createElement(Text268, { size: "sm" }, "Oracle configuration stored successfully in the Matrix room."), roomId && /* @__PURE__ */ React393.createElement(Text268, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "Room ID: ", roomId))), isStale && /* @__PURE__ */ React393.createElement(Alert109, { icon: /* @__PURE__ */ React393.createElement(IconAlertCircle47, { size: 16 }), color: "yellow", title: "Inconsistent State" }, /* @__PURE__ */ React393.createElement(Stack287, { gap: "xs" }, /* @__PURE__ */ React393.createElement(Text268, { size: "sm" }, "Marked completed but configStored not set. Stale state \u2014 reset and re-run."), /* @__PURE__ */ React393.createElement(Group149, null, /* @__PURE__ */ React393.createElement(Button97, { variant: "outline", size: "xs", onClick: handleRetry }, "Reset"), /* @__PURE__ */ React393.createElement(Button97, { variant: "filled", size: "xs", onClick: handleExecute, disabled: !inputsReady }, "Force Run Now")))), isFailed && errorMessage && /* @__PURE__ */ React393.createElement(Alert109, { icon: /* @__PURE__ */ React393.createElement(IconAlertCircle47, { size: 16 }), color: "red", styles: actionAlertStyles }, errorMessage), isFailed && /* @__PURE__ */ React393.createElement(Group149, null, /* @__PURE__ */ React393.createElement(Button97, { variant: "outline", onClick: handleRetry }, "Try Again")), !isRunning && !isStale && /* @__PURE__ */ React393.createElement(Group149, null, /* @__PURE__ */ React393.createElement(Button97, { variant: "filled", size: "sm", onClick: handleExecute, disabled: !inputsReady || isDisabled }, isCompleted ? "Re-run" : inputsReady ? "Run Now" : "Waiting for inputs...")));
|
|
43473
43739
|
};
|
|
43474
43740
|
|
|
43475
43741
|
// src/mantine/blocks/action/actionTypes/oracleStoreConfig/index.ts
|
|
@@ -43745,7 +44011,7 @@ var OracleStoreSecretsAndConfigConfig = ({ inputs, onInputsChange }) => {
|
|
|
43745
44011
|
|
|
43746
44012
|
// src/mantine/blocks/action/actionTypes/oracleStoreSecretsAndConfig/OracleStoreSecretsAndConfigFlowDetail.tsx
|
|
43747
44013
|
import React395, { useCallback as useCallback183, useEffect as useEffect172, useMemo as useMemo158, useRef as useRef54, useState as useState233 } from "react";
|
|
43748
|
-
import { Alert as Alert110, Button as Button98, Collapse as Collapse13, Divider as Divider40, Group as
|
|
44014
|
+
import { Alert as Alert110, Button as Button98, Collapse as Collapse13, Divider as Divider40, Group as Group150, Loader as Loader94, Stack as Stack289, Text as Text270 } from "@mantine/core";
|
|
43749
44015
|
import { IconAlertCircle as IconAlertCircle48, IconCheck as IconCheck46, IconChevronDown as IconChevronDown13, IconChevronUp as IconChevronUp6, IconLock as IconLock2 } from "@tabler/icons-react";
|
|
43750
44016
|
var EXPECTED_SECRETS2 = ["SECP_MNEMONIC", "MATRIX_ORACLE_ADMIN_PASSWORD", "MATRIX_ORACLE_ADMIN_ACCESS_TOKEN", "MATRIX_RECOVERY_PHRASE", "MATRIX_VALUE_PIN", "OPEN_ROUTER_API_KEY"];
|
|
43751
44017
|
var FIELDS2 = [
|
|
@@ -43904,7 +44170,7 @@ var OracleStoreSecretsAndConfigFlowDetail = ({ inputs, editor, block, runtime, u
|
|
|
43904
44170
|
}, [updateRuntime]);
|
|
43905
44171
|
const lockIcon = /* @__PURE__ */ React395.createElement(IconLock2, { size: 14 });
|
|
43906
44172
|
const submitDisabled = !inputsReady || !hasOpenRouter || isRunning || isCompleted || isDisabled;
|
|
43907
|
-
return /* @__PURE__ */ React395.createElement(Stack289, { gap: "md" }, /* @__PURE__ */ React395.createElement(Stack289, { gap: 2 }, /* @__PURE__ */ React395.createElement(Text270, { fw: 600 }, block?.props?.title || "Store Secrets & Config"), /* @__PURE__ */ React395.createElement(Text270, { size: "sm", c: "dimmed" }, block?.props?.description || "Encrypt secrets and store configuration in the oracle Matrix room.")), isChecking && /* @__PURE__ */ React395.createElement(
|
|
44173
|
+
return /* @__PURE__ */ React395.createElement(Stack289, { gap: "md" }, /* @__PURE__ */ React395.createElement(Stack289, { gap: 2 }, /* @__PURE__ */ React395.createElement(Text270, { fw: 600 }, block?.props?.title || "Store Secrets & Config"), /* @__PURE__ */ React395.createElement(Text270, { size: "sm", c: "dimmed" }, block?.props?.description || "Encrypt secrets and store configuration in the oracle Matrix room.")), isChecking && /* @__PURE__ */ React395.createElement(Group150, { gap: "xs" }, /* @__PURE__ */ React395.createElement(Loader94, { size: 14 }), /* @__PURE__ */ React395.createElement(Text270, { size: "sm", c: "dimmed" }, "Checking matrix room for already-stored secrets...")), !isChecking && !inputsReady && !isCompleted && !isStale && /* @__PURE__ */ React395.createElement(Group150, { gap: "xs" }, /* @__PURE__ */ React395.createElement(Loader94, { size: 14 }), /* @__PURE__ */ React395.createElement(Text270, { size: "sm", c: "dimmed" }, "Waiting for upstream blocks: ", missingFields.join(", "))), isCompleted && /* @__PURE__ */ React395.createElement(Stack289, { gap: "xs" }, /* @__PURE__ */ React395.createElement(Alert110, { icon: /* @__PURE__ */ React395.createElement(IconCheck46, { size: 16 }), title: "Secrets & Config Stored", color: "green" }, /* @__PURE__ */ React395.createElement(Text270, { size: "sm" }, "All ", storedSecrets.length, " secrets and oracle configuration stored in the matrix room.")), /* @__PURE__ */ React395.createElement(Stack289, { gap: 2 }, storedSecrets.map((name) => /* @__PURE__ */ React395.createElement(Group150, { key: name, gap: "xs" }, /* @__PURE__ */ React395.createElement(IconLock2, { size: 12 }), /* @__PURE__ */ React395.createElement(Text270, { size: "xs", c: "dimmed", style: { fontFamily: "monospace" } }, name)))), /* @__PURE__ */ React395.createElement(Group150, null, /* @__PURE__ */ React395.createElement(Button98, { variant: "outline", size: "xs", onClick: handleRestoreAll }, "Re-store all"))), isStale && /* @__PURE__ */ React395.createElement(Alert110, { icon: /* @__PURE__ */ React395.createElement(IconAlertCircle48, { size: 16 }), color: "yellow", title: "Inconsistent State" }, /* @__PURE__ */ React395.createElement(Stack289, { gap: "xs" }, /* @__PURE__ */ React395.createElement(Text270, { size: "sm" }, "Marked completed but missing proof. Stale state \u2014 reset and re-run."), /* @__PURE__ */ React395.createElement(Group150, null, /* @__PURE__ */ React395.createElement(Button98, { variant: "outline", size: "xs", onClick: handleRetry }, "Reset"), /* @__PURE__ */ React395.createElement(Button98, { variant: "filled", size: "xs", onClick: handleExecute, disabled: !inputsReady || !hasOpenRouter }, "Force Run Now")))), !isCompleted && !isStale && !isChecking && inputsReady && /* @__PURE__ */ React395.createElement(Stack289, { gap: "sm" }, /* @__PURE__ */ React395.createElement(Group150, { gap: "xs", align: "flex-end", wrap: "nowrap" }, lockIcon, /* @__PURE__ */ React395.createElement(BaseTextInput, { label: "SECP_MNEMONIC", readOnly: true, type: "password", value: resolvedInputs.mnemonic, style: { flex: 1 } })), /* @__PURE__ */ React395.createElement(Group150, { gap: "xs", align: "flex-end", wrap: "nowrap" }, lockIcon, /* @__PURE__ */ React395.createElement(BaseTextInput, { label: "MATRIX_ORACLE_ADMIN_PASSWORD", readOnly: true, type: "password", value: resolvedInputs.matrixPassword, style: { flex: 1 } })), /* @__PURE__ */ React395.createElement(Group150, { gap: "xs", align: "center", wrap: "nowrap" }, lockIcon, /* @__PURE__ */ React395.createElement(Stack289, { gap: 0, style: { flex: 1 } }, /* @__PURE__ */ React395.createElement(Text270, { size: "xs", c: "dimmed", style: { fontFamily: "monospace" } }, "MATRIX_ORACLE_ADMIN_ACCESS_TOKEN"), /* @__PURE__ */ React395.createElement(Text270, { size: "xs", c: "dimmed" }, "Generated by handler at submit time (fresh login)"))), /* @__PURE__ */ React395.createElement(Group150, { gap: "xs", align: "flex-end", wrap: "nowrap" }, lockIcon, /* @__PURE__ */ React395.createElement(BaseTextInput, { label: "MATRIX_RECOVERY_PHRASE", readOnly: true, type: "password", value: resolvedInputs.matrixRecoveryPhrase, style: { flex: 1 } })), /* @__PURE__ */ React395.createElement(Group150, { gap: "xs", align: "flex-end", wrap: "nowrap" }, lockIcon, /* @__PURE__ */ React395.createElement(BaseTextInput, { label: "MATRIX_VALUE_PIN", readOnly: true, type: "password", value: resolvedInputs.pin, style: { flex: 1 } })), /* @__PURE__ */ React395.createElement(Group150, { gap: "xs", align: "flex-end", wrap: "nowrap" }, lockIcon, isEditingOpenRouter ? /* @__PURE__ */ React395.createElement(
|
|
43908
44174
|
BaseTextInput,
|
|
43909
44175
|
{
|
|
43910
44176
|
label: "OPEN_ROUTER_API_KEY",
|
|
@@ -43914,7 +44180,7 @@ var OracleStoreSecretsAndConfigFlowDetail = ({ inputs, editor, block, runtime, u
|
|
|
43914
44180
|
onChange: (event) => setOpenRouterDraft(event.currentTarget.value),
|
|
43915
44181
|
style: { flex: 1 }
|
|
43916
44182
|
}
|
|
43917
|
-
) : /* @__PURE__ */ React395.createElement(BaseTextInput, { label: "OPEN_ROUTER_API_KEY", readOnly: true, type: "password", value: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022", style: { flex: 1 } })), /* @__PURE__ */ React395.createElement(
|
|
44183
|
+
) : /* @__PURE__ */ React395.createElement(BaseTextInput, { label: "OPEN_ROUTER_API_KEY", readOnly: true, type: "password", value: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022", style: { flex: 1 } })), /* @__PURE__ */ React395.createElement(Group150, { gap: "xs", justify: "flex-end" }, isEditingOpenRouter ? /* @__PURE__ */ React395.createElement(React395.Fragment, null, /* @__PURE__ */ React395.createElement(Button98, { size: "xs", onClick: handleSaveOpenRouter, loading: isEncryptingOpenRouter, disabled: !openRouterDraft || !resolvedInputs.publicKeyMultibase }, "Save"), hasOpenRouter && /* @__PURE__ */ React395.createElement(Button98, { size: "xs", variant: "subtle", onClick: handleCancelEditOpenRouter }, "Cancel")) : /* @__PURE__ */ React395.createElement(Button98, { size: "xs", variant: "outline", onClick: handleChangeOpenRouter }, "Change")), /* @__PURE__ */ React395.createElement(Divider40, { variant: "dashed" }), /* @__PURE__ */ React395.createElement(Text270, { size: "sm", fw: 600 }, "Identifiers (stored as plain config)"), /* @__PURE__ */ React395.createElement(BaseTextInput, { label: "MATRIX_ORACLE_ADMIN_USER_ID", readOnly: true, value: resolvedInputs.matrixUserId }), /* @__PURE__ */ React395.createElement(BaseTextInput, { label: "MATRIX_ACCOUNT_ROOM_ID", readOnly: true, value: resolvedInputs.matrixAccountRoomId }), /* @__PURE__ */ React395.createElement(BaseTextInput, { label: "ORACLE_ENTITY_DID", readOnly: true, value: resolvedInputs.entityDid }), /* @__PURE__ */ React395.createElement(Divider40, { variant: "dashed" }), /* @__PURE__ */ React395.createElement(Stack289, { gap: "xs" }, /* @__PURE__ */ React395.createElement(Group150, { justify: "space-between", style: { cursor: "pointer", userSelect: "none" }, onClick: () => setShowAdditional((v) => !v) }, /* @__PURE__ */ React395.createElement(Text270, { size: "sm", fw: 500 }, "Additional Configuration"), /* @__PURE__ */ React395.createElement(Group150, { gap: 6 }, /* @__PURE__ */ React395.createElement(Text270, { size: "xs", c: "dimmed" }, "Stored as plain config"), showAdditional ? /* @__PURE__ */ React395.createElement(IconChevronUp6, { size: 14 }) : /* @__PURE__ */ React395.createElement(IconChevronDown13, { size: 14 }))), /* @__PURE__ */ React395.createElement(Collapse13, { in: showAdditional }, /* @__PURE__ */ React395.createElement(Stack289, { gap: "xs", pt: "xs" }, isLoadingConstants && /* @__PURE__ */ React395.createElement(Group150, { gap: 6 }, /* @__PURE__ */ React395.createElement(Loader94, { size: 12 }), /* @__PURE__ */ React395.createElement(Text270, { size: "xs", c: "dimmed" }, "Loading network constants...")), /* @__PURE__ */ React395.createElement(BaseTextInput, { label: "ORACLE_NAME", value: resolvedInputs.oracleName || "", readOnly: true }), /* @__PURE__ */ React395.createElement(BaseTextInput, { label: "ORACLE_ADDRESS", value: resolvedInputs.oracleAddress || "", readOnly: true }), /* @__PURE__ */ React395.createElement(BaseTextInput, { label: "ORACLE_DID", value: resolvedInputs.oracleDid || "", readOnly: true }), networkConstants && Object.entries(networkConstants).map(([key, value]) => /* @__PURE__ */ React395.createElement(BaseTextInput, { key, label: key, value, readOnly: true }))))), isRunning && /* @__PURE__ */ React395.createElement(Group150, { gap: "xs" }, /* @__PURE__ */ React395.createElement(Loader94, { size: 14 }), /* @__PURE__ */ React395.createElement(Text270, { size: "sm" }, "Storing secrets and configuration...")), /* @__PURE__ */ React395.createElement(Group150, { justify: "flex-end" }, /* @__PURE__ */ React395.createElement(Button98, { variant: "filled", size: "sm", onClick: handleExecute, disabled: submitDisabled }, "Store Secrets & Config"))), isFailed && errorMessage && /* @__PURE__ */ React395.createElement(Alert110, { icon: /* @__PURE__ */ React395.createElement(IconAlertCircle48, { size: 16 }), color: "red", styles: actionAlertStyles }, errorMessage), isFailed && /* @__PURE__ */ React395.createElement(Group150, null, /* @__PURE__ */ React395.createElement(Button98, { variant: "outline", onClick: handleRetry }, "Try Again")));
|
|
43918
44184
|
};
|
|
43919
44185
|
|
|
43920
44186
|
// src/mantine/blocks/action/actionTypes/oracleStoreSecretsAndConfig/index.ts
|
|
@@ -44191,7 +44457,7 @@ var OracleConfigureOracleConfig = ({ inputs, onInputsChange }) => {
|
|
|
44191
44457
|
|
|
44192
44458
|
// src/mantine/blocks/action/actionTypes/oracleConfigureOracle/OracleConfigureOracleFlowDetail.tsx
|
|
44193
44459
|
import React397, { useCallback as useCallback185, useEffect as useEffect174, useMemo as useMemo159, useRef as useRef55, useState as useState235 } from "react";
|
|
44194
|
-
import { Alert as Alert111, Button as Button99, Collapse as Collapse14, Divider as Divider42, Group as
|
|
44460
|
+
import { Alert as Alert111, Button as Button99, Collapse as Collapse14, Divider as Divider42, Group as Group151, Loader as Loader95, Stack as Stack291, Text as Text272 } from "@mantine/core";
|
|
44195
44461
|
import { IconAlertCircle as IconAlertCircle49, IconCheck as IconCheck47, IconChevronDown as IconChevronDown14, IconChevronUp as IconChevronUp7, IconLock as IconLock4 } from "@tabler/icons-react";
|
|
44196
44462
|
var EXPECTED_SECRETS3 = ["SECP_MNEMONIC", "MATRIX_ORACLE_ADMIN_PASSWORD", "MATRIX_ORACLE_ADMIN_ACCESS_TOKEN", "MATRIX_RECOVERY_PHRASE", "MATRIX_VALUE_PIN", "OPEN_ROUTER_API_KEY"];
|
|
44197
44463
|
var FIELDS3 = [
|
|
@@ -44385,7 +44651,7 @@ var OracleConfigureOracleFlowDetail = ({ inputs, editor, block, runtime, updateR
|
|
|
44385
44651
|
}, [updateRuntime]);
|
|
44386
44652
|
const lockIcon = /* @__PURE__ */ React397.createElement(IconLock4, { size: 14 });
|
|
44387
44653
|
const submitDisabled = !inputsReady || !hasOpenRouter || isRunning || isCompleted || isDisabled;
|
|
44388
|
-
return /* @__PURE__ */ React397.createElement(Stack291, { gap: "md" }, /* @__PURE__ */ React397.createElement(Stack291, { gap: 2 }, /* @__PURE__ */ React397.createElement(Text272, { fw: 600 }, block?.props?.title || "Configure Oracle"), /* @__PURE__ */ React397.createElement(Text272, { size: "sm", c: "dimmed" }, block?.props?.description || "Contract oracle, encrypt secrets, and store configuration.")), isChecking && /* @__PURE__ */ React397.createElement(
|
|
44654
|
+
return /* @__PURE__ */ React397.createElement(Stack291, { gap: "md" }, /* @__PURE__ */ React397.createElement(Stack291, { gap: 2 }, /* @__PURE__ */ React397.createElement(Text272, { fw: 600 }, block?.props?.title || "Configure Oracle"), /* @__PURE__ */ React397.createElement(Text272, { size: "sm", c: "dimmed" }, block?.props?.description || "Contract oracle, encrypt secrets, and store configuration.")), isChecking && /* @__PURE__ */ React397.createElement(Group151, { gap: "xs" }, /* @__PURE__ */ React397.createElement(Loader95, { size: 14 }), /* @__PURE__ */ React397.createElement(Text272, { size: "sm", c: "dimmed" }, "Checking matrix room for already-stored secrets...")), !isChecking && !inputsReady && !isCompleted && !isStale && /* @__PURE__ */ React397.createElement(Group151, { gap: "xs" }, /* @__PURE__ */ React397.createElement(Loader95, { size: 14 }), /* @__PURE__ */ React397.createElement(Text272, { size: "sm", c: "dimmed" }, "Waiting for upstream blocks: ", missingFields.join(", "))), isCompleted && /* @__PURE__ */ React397.createElement(Stack291, { gap: "xs" }, /* @__PURE__ */ React397.createElement(Alert111, { icon: /* @__PURE__ */ React397.createElement(IconCheck47, { size: 16 }), title: "Oracle Configured", color: "green" }, /* @__PURE__ */ React397.createElement(Text272, { size: "sm" }, "Contract established, ", storedSecrets.length, " secrets stored, and oracle configuration saved.")), /* @__PURE__ */ React397.createElement(Stack291, { gap: 2 }, storedSecrets.map((name) => /* @__PURE__ */ React397.createElement(Group151, { key: name, gap: "xs" }, /* @__PURE__ */ React397.createElement(IconLock4, { size: 12 }), /* @__PURE__ */ React397.createElement(Text272, { size: "xs", c: "dimmed", style: { fontFamily: "monospace" } }, name)))), /* @__PURE__ */ React397.createElement(Group151, null, /* @__PURE__ */ React397.createElement(Button99, { variant: "outline", size: "xs", onClick: handleRestoreAll }, "Re-configure all"))), isStale && /* @__PURE__ */ React397.createElement(Alert111, { icon: /* @__PURE__ */ React397.createElement(IconAlertCircle49, { size: 16 }), color: "yellow", title: "Inconsistent State" }, /* @__PURE__ */ React397.createElement(Stack291, { gap: "xs" }, /* @__PURE__ */ React397.createElement(Text272, { size: "sm" }, "Marked completed but missing proof. Stale state \u2014 reset and re-run."), /* @__PURE__ */ React397.createElement(Group151, null, /* @__PURE__ */ React397.createElement(Button99, { variant: "outline", size: "xs", onClick: handleRetry }, "Reset"), /* @__PURE__ */ React397.createElement(Button99, { variant: "filled", size: "xs", onClick: handleExecute, disabled: !inputsReady || !hasOpenRouter }, "Force Run Now")))), !isCompleted && !isStale && !isChecking && inputsReady && /* @__PURE__ */ React397.createElement(Stack291, { gap: "sm" }, /* @__PURE__ */ React397.createElement(Group151, { gap: "xs", align: "flex-end", wrap: "nowrap" }, lockIcon, /* @__PURE__ */ React397.createElement(BaseTextInput, { label: "SECP_MNEMONIC", readOnly: true, type: "password", value: resolvedInputs.mnemonic, style: { flex: 1 } })), /* @__PURE__ */ React397.createElement(Group151, { gap: "xs", align: "flex-end", wrap: "nowrap" }, lockIcon, /* @__PURE__ */ React397.createElement(BaseTextInput, { label: "MATRIX_ORACLE_ADMIN_PASSWORD", readOnly: true, type: "password", value: resolvedInputs.matrixPassword, style: { flex: 1 } })), /* @__PURE__ */ React397.createElement(Group151, { gap: "xs", align: "center", wrap: "nowrap" }, lockIcon, /* @__PURE__ */ React397.createElement(Stack291, { gap: 0, style: { flex: 1 } }, /* @__PURE__ */ React397.createElement(Text272, { size: "xs", c: "dimmed", style: { fontFamily: "monospace" } }, "MATRIX_ORACLE_ADMIN_ACCESS_TOKEN"), /* @__PURE__ */ React397.createElement(Text272, { size: "xs", c: "dimmed" }, "Generated by handler at submit time (fresh login)"))), /* @__PURE__ */ React397.createElement(Group151, { gap: "xs", align: "flex-end", wrap: "nowrap" }, lockIcon, /* @__PURE__ */ React397.createElement(BaseTextInput, { label: "MATRIX_RECOVERY_PHRASE", readOnly: true, type: "password", value: resolvedInputs.matrixRecoveryPhrase, style: { flex: 1 } })), /* @__PURE__ */ React397.createElement(Group151, { gap: "xs", align: "flex-end", wrap: "nowrap" }, lockIcon, /* @__PURE__ */ React397.createElement(BaseTextInput, { label: "MATRIX_VALUE_PIN", readOnly: true, type: "password", value: resolvedInputs.pin, style: { flex: 1 } })), /* @__PURE__ */ React397.createElement(Group151, { gap: "xs", align: "flex-end", wrap: "nowrap" }, lockIcon, isEditingOpenRouter ? /* @__PURE__ */ React397.createElement(
|
|
44389
44655
|
BaseTextInput,
|
|
44390
44656
|
{
|
|
44391
44657
|
label: "OPEN_ROUTER_API_KEY",
|
|
@@ -44395,7 +44661,7 @@ var OracleConfigureOracleFlowDetail = ({ inputs, editor, block, runtime, updateR
|
|
|
44395
44661
|
onChange: (event) => setOpenRouterDraft(event.currentTarget.value),
|
|
44396
44662
|
style: { flex: 1 }
|
|
44397
44663
|
}
|
|
44398
|
-
) : /* @__PURE__ */ React397.createElement(BaseTextInput, { label: "OPEN_ROUTER_API_KEY", readOnly: true, type: "password", value: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022", style: { flex: 1 } })), /* @__PURE__ */ React397.createElement(
|
|
44664
|
+
) : /* @__PURE__ */ React397.createElement(BaseTextInput, { label: "OPEN_ROUTER_API_KEY", readOnly: true, type: "password", value: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022", style: { flex: 1 } })), /* @__PURE__ */ React397.createElement(Group151, { gap: "xs", justify: "flex-end" }, isEditingOpenRouter ? /* @__PURE__ */ React397.createElement(React397.Fragment, null, /* @__PURE__ */ React397.createElement(Button99, { size: "xs", onClick: handleSaveOpenRouter, loading: isEncryptingOpenRouter, disabled: !openRouterDraft || !resolvedInputs.publicKeyMultibase }, "Save"), hasOpenRouter && /* @__PURE__ */ React397.createElement(Button99, { size: "xs", variant: "subtle", onClick: handleCancelEditOpenRouter }, "Cancel")) : /* @__PURE__ */ React397.createElement(Button99, { size: "xs", variant: "outline", onClick: handleChangeOpenRouter }, "Change")), /* @__PURE__ */ React397.createElement(Divider42, { variant: "dashed" }), /* @__PURE__ */ React397.createElement(Text272, { size: "sm", fw: 600 }, "Identifiers (stored as plain config)"), /* @__PURE__ */ React397.createElement(BaseTextInput, { label: "MATRIX_ORACLE_ADMIN_USER_ID", readOnly: true, value: resolvedInputs.matrixUserId }), /* @__PURE__ */ React397.createElement(BaseTextInput, { label: "MATRIX_ACCOUNT_ROOM_ID", readOnly: true, value: resolvedInputs.matrixAccountRoomId }), /* @__PURE__ */ React397.createElement(BaseTextInput, { label: "ORACLE_ENTITY_DID", readOnly: true, value: resolvedInputs.entityDid }), /* @__PURE__ */ React397.createElement(Divider42, { variant: "dashed" }), /* @__PURE__ */ React397.createElement(Stack291, { gap: "xs" }, /* @__PURE__ */ React397.createElement(Group151, { justify: "space-between", style: { cursor: "pointer", userSelect: "none" }, onClick: () => setShowAdditional((v) => !v) }, /* @__PURE__ */ React397.createElement(Text272, { size: "sm", fw: 500 }, "Additional Configuration"), /* @__PURE__ */ React397.createElement(Group151, { gap: 6 }, /* @__PURE__ */ React397.createElement(Text272, { size: "xs", c: "dimmed" }, "Stored as plain config"), showAdditional ? /* @__PURE__ */ React397.createElement(IconChevronUp7, { size: 14 }) : /* @__PURE__ */ React397.createElement(IconChevronDown14, { size: 14 }))), /* @__PURE__ */ React397.createElement(Collapse14, { in: showAdditional }, /* @__PURE__ */ React397.createElement(Stack291, { gap: "xs", pt: "xs" }, isLoadingConstants && /* @__PURE__ */ React397.createElement(Group151, { gap: 6 }, /* @__PURE__ */ React397.createElement(Loader95, { size: 12 }), /* @__PURE__ */ React397.createElement(Text272, { size: "xs", c: "dimmed" }, "Loading network constants...")), /* @__PURE__ */ React397.createElement(BaseTextInput, { label: "ORACLE_NAME", value: resolvedInputs.oracleName || "", readOnly: true }), /* @__PURE__ */ React397.createElement(BaseTextInput, { label: "ORACLE_ADDRESS", value: resolvedInputs.oracleAddress || "", readOnly: true }), /* @__PURE__ */ React397.createElement(BaseTextInput, { label: "ORACLE_DID", value: resolvedInputs.oracleDid || "", readOnly: true }), networkConstants && Object.entries(networkConstants).map(([key, value]) => /* @__PURE__ */ React397.createElement(BaseTextInput, { key, label: key, value, readOnly: true }))))), isRunning && /* @__PURE__ */ React397.createElement(Group151, { gap: "xs" }, /* @__PURE__ */ React397.createElement(Loader95, { size: 14 }), /* @__PURE__ */ React397.createElement(Text272, { size: "sm" }, "Contracting oracle, storing secrets, and saving configuration...")), /* @__PURE__ */ React397.createElement(Group151, { justify: "flex-end" }, /* @__PURE__ */ React397.createElement(Button99, { variant: "filled", size: "sm", onClick: handleExecute, disabled: submitDisabled }, "Configure Oracle"))), isFailed && errorMessage && /* @__PURE__ */ React397.createElement(Alert111, { icon: /* @__PURE__ */ React397.createElement(IconAlertCircle49, { size: 16 }), color: "red", styles: actionAlertStyles }, errorMessage), isFailed && /* @__PURE__ */ React397.createElement(Group151, null, /* @__PURE__ */ React397.createElement(Button99, { variant: "outline", onClick: handleRetry }, "Try Again")));
|
|
44399
44665
|
};
|
|
44400
44666
|
|
|
44401
44667
|
// src/mantine/blocks/action/actionTypes/oracleConfigureOracle/index.ts
|
|
@@ -44419,7 +44685,7 @@ var OracleDeploySetupConfig = () => {
|
|
|
44419
44685
|
|
|
44420
44686
|
// src/mantine/blocks/action/actionTypes/oracleDeploySetup/OracleDeploySetupFlowDetail.tsx
|
|
44421
44687
|
import React399, { useCallback as useCallback186, useMemo as useMemo160 } from "react";
|
|
44422
|
-
import { Alert as Alert112, Button as Button100, Group as
|
|
44688
|
+
import { Alert as Alert112, Button as Button100, Group as Group152, Loader as Loader96, Stack as Stack293, Text as Text274 } from "@mantine/core";
|
|
44423
44689
|
import { IconCheck as IconCheck48, IconAlertCircle as IconAlertCircle50 } from "@tabler/icons-react";
|
|
44424
44690
|
|
|
44425
44691
|
// src/mantine/blocks/action/actionTypes/oracleDeploySetup/types.ts
|
|
@@ -44555,7 +44821,7 @@ var OracleDeploySetupFlowDetail = ({ inputs, editor, block, runtime, updateRunti
|
|
|
44555
44821
|
const handleRetry = useCallback186(() => {
|
|
44556
44822
|
updateRuntime({ state: "idle", error: void 0, output: {} });
|
|
44557
44823
|
}, [updateRuntime]);
|
|
44558
|
-
return /* @__PURE__ */ React399.createElement(Stack293, { gap: "md" }, /* @__PURE__ */ React399.createElement(Stack293, { gap: 2 }, /* @__PURE__ */ React399.createElement(Text274, { fw: 600 }, block?.props?.title || "Deploy Oracle \u2014 Setup"), /* @__PURE__ */ React399.createElement(Text274, { size: "sm", c: "dimmed" }, block?.props?.description || "Clones the oracle repository, writes configuration, installs dependencies, and builds.")), !isRunning && !isCompleted && !isStale && !isFailed && !inputsReady && /* @__PURE__ */ React399.createElement(
|
|
44824
|
+
return /* @__PURE__ */ React399.createElement(Stack293, { gap: "md" }, /* @__PURE__ */ React399.createElement(Stack293, { gap: 2 }, /* @__PURE__ */ React399.createElement(Text274, { fw: 600 }, block?.props?.title || "Deploy Oracle \u2014 Setup"), /* @__PURE__ */ React399.createElement(Text274, { size: "sm", c: "dimmed" }, block?.props?.description || "Clones the oracle repository, writes configuration, installs dependencies, and builds.")), !isRunning && !isCompleted && !isStale && !isFailed && !inputsReady && /* @__PURE__ */ React399.createElement(Group152, { gap: "xs" }, /* @__PURE__ */ React399.createElement(Loader96, { size: 14 }), /* @__PURE__ */ React399.createElement(Text274, { size: "sm", c: "dimmed" }, "Waiting for upstream secrets & config...")), isRunning && /* @__PURE__ */ React399.createElement(Group152, { gap: "xs" }, /* @__PURE__ */ React399.createElement(Loader96, { size: 14 }), /* @__PURE__ */ React399.createElement(Text274, { size: "sm" }, "Setting up oracle environment... This may take a few minutes.")), isCompleted && /* @__PURE__ */ React399.createElement(Alert112, { icon: /* @__PURE__ */ React399.createElement(IconCheck48, { size: 16 }), title: "Setup Complete", color: "green" }, /* @__PURE__ */ React399.createElement(Stack293, { gap: "xs" }, /* @__PURE__ */ React399.createElement(Text274, { size: "sm" }, "Oracle environment set up successfully."))), isStale && /* @__PURE__ */ React399.createElement(Alert112, { icon: /* @__PURE__ */ React399.createElement(IconAlertCircle50, { size: 16 }), color: "yellow", title: "Inconsistent State" }, /* @__PURE__ */ React399.createElement(Stack293, { gap: "xs" }, /* @__PURE__ */ React399.createElement(Text274, { size: "sm" }, "Marked completed but setupComplete not set. Stale state \u2014 reset and re-run."), /* @__PURE__ */ React399.createElement(Group152, null, /* @__PURE__ */ React399.createElement(Button100, { variant: "outline", size: "xs", onClick: handleRetry }, "Reset"), /* @__PURE__ */ React399.createElement(Button100, { variant: "filled", size: "xs", onClick: handleExecute, disabled: !inputsReady }, "Force Run Now")))), isFailed && errorMessage && /* @__PURE__ */ React399.createElement(Alert112, { icon: /* @__PURE__ */ React399.createElement(IconAlertCircle50, { size: 16 }), color: "red", styles: actionAlertStyles }, errorMessage), isFailed && /* @__PURE__ */ React399.createElement(Group152, null, /* @__PURE__ */ React399.createElement(Button100, { variant: "outline", onClick: handleRetry }, "Try Again")), !isRunning && !isStale && /* @__PURE__ */ React399.createElement(Group152, null, /* @__PURE__ */ React399.createElement(Button100, { variant: "filled", size: "sm", onClick: handleExecute, disabled: !inputsReady || isDisabled }, isCompleted ? "Re-run" : inputsReady ? "Run Now" : "Waiting for inputs...")));
|
|
44559
44825
|
};
|
|
44560
44826
|
|
|
44561
44827
|
// src/mantine/blocks/action/actionTypes/oracleDeploySetup/index.ts
|
|
@@ -44579,7 +44845,7 @@ var OracleDeployStartConfig = () => {
|
|
|
44579
44845
|
|
|
44580
44846
|
// src/mantine/blocks/action/actionTypes/oracleDeployStart/OracleDeployStartFlowDetail.tsx
|
|
44581
44847
|
import React401, { useCallback as useCallback187, useMemo as useMemo161 } from "react";
|
|
44582
|
-
import { Alert as Alert113, Button as Button101, Group as
|
|
44848
|
+
import { Alert as Alert113, Button as Button101, Group as Group153, Loader as Loader97, Stack as Stack295, Text as Text276 } from "@mantine/core";
|
|
44583
44849
|
import { IconCheck as IconCheck49, IconAlertCircle as IconAlertCircle51 } from "@tabler/icons-react";
|
|
44584
44850
|
|
|
44585
44851
|
// src/mantine/blocks/action/actionTypes/oracleDeployStart/types.ts
|
|
@@ -44639,7 +44905,7 @@ var OracleDeployStartFlowDetail = ({ inputs, editor, block, runtime, updateRunti
|
|
|
44639
44905
|
const handleRetry = useCallback187(() => {
|
|
44640
44906
|
updateRuntime({ state: "idle", error: void 0, output: {} });
|
|
44641
44907
|
}, [updateRuntime]);
|
|
44642
|
-
return /* @__PURE__ */ React401.createElement(Stack295, { gap: "md" }, /* @__PURE__ */ React401.createElement(Stack295, { gap: 2 }, /* @__PURE__ */ React401.createElement(Text276, { fw: 600 }, block?.props?.title || "Deploy Oracle \u2014 Start"), /* @__PURE__ */ React401.createElement(Text276, { size: "sm", c: "dimmed" }, block?.props?.description || "Starts the oracle process and waits for it to be ready.")), !isRunning && !isCompleted && !isStale && !isFailed && !inputsReady && /* @__PURE__ */ React401.createElement(
|
|
44908
|
+
return /* @__PURE__ */ React401.createElement(Stack295, { gap: "md" }, /* @__PURE__ */ React401.createElement(Stack295, { gap: 2 }, /* @__PURE__ */ React401.createElement(Text276, { fw: 600 }, block?.props?.title || "Deploy Oracle \u2014 Start"), /* @__PURE__ */ React401.createElement(Text276, { size: "sm", c: "dimmed" }, block?.props?.description || "Starts the oracle process and waits for it to be ready.")), !isRunning && !isCompleted && !isStale && !isFailed && !inputsReady && /* @__PURE__ */ React401.createElement(Group153, { gap: "xs" }, /* @__PURE__ */ React401.createElement(Loader97, { size: 14 }), /* @__PURE__ */ React401.createElement(Text276, { size: "sm", c: "dimmed" }, "Waiting for oracle setup to complete...")), isRunning && /* @__PURE__ */ React401.createElement(Group153, { gap: "xs" }, /* @__PURE__ */ React401.createElement(Loader97, { size: 14 }), /* @__PURE__ */ React401.createElement(Text276, { size: "sm" }, "Starting oracle...")), isCompleted && /* @__PURE__ */ React401.createElement(Alert113, { icon: /* @__PURE__ */ React401.createElement(IconCheck49, { size: 16 }), title: "Oracle Running", color: "green" }, /* @__PURE__ */ React401.createElement(Stack295, { gap: "xs" }, /* @__PURE__ */ React401.createElement(Text276, { size: "sm" }, "Oracle is running!"), processId && /* @__PURE__ */ React401.createElement(Text276, { size: "xs", c: "dimmed", style: { wordBreak: "break-all" } }, "Process ID: ", processId), status && /* @__PURE__ */ React401.createElement(Text276, { size: "xs", c: "dimmed" }, "Status: ", status))), isStale && /* @__PURE__ */ React401.createElement(Alert113, { icon: /* @__PURE__ */ React401.createElement(IconAlertCircle51, { size: 16 }), color: "yellow", title: "Inconsistent State" }, /* @__PURE__ */ React401.createElement(Stack295, { gap: "xs" }, /* @__PURE__ */ React401.createElement(Text276, { size: "sm" }, "Marked completed but no processId or running status recorded. Stale state \u2014 reset and re-run."), /* @__PURE__ */ React401.createElement(Group153, null, /* @__PURE__ */ React401.createElement(Button101, { variant: "outline", size: "xs", onClick: handleRetry }, "Reset"), /* @__PURE__ */ React401.createElement(Button101, { variant: "filled", size: "xs", onClick: handleExecute, disabled: !inputsReady }, "Force Run Now")))), isFailed && errorMessage && /* @__PURE__ */ React401.createElement(Alert113, { icon: /* @__PURE__ */ React401.createElement(IconAlertCircle51, { size: 16 }), color: "red", styles: actionAlertStyles }, errorMessage), isFailed && /* @__PURE__ */ React401.createElement(Group153, null, /* @__PURE__ */ React401.createElement(Button101, { variant: "outline", onClick: handleRetry }, "Try Again")), !isRunning && !isStale && /* @__PURE__ */ React401.createElement(Group153, null, /* @__PURE__ */ React401.createElement(Button101, { variant: "filled", size: "sm", onClick: handleExecute, disabled: !inputsReady || isDisabled }, isCompleted ? "Re-run" : inputsReady ? "Run Now" : "Waiting for inputs...")));
|
|
44643
44909
|
};
|
|
44644
44910
|
|
|
44645
44911
|
// src/mantine/blocks/action/actionTypes/oracleDeployStart/index.ts
|
|
@@ -44663,7 +44929,7 @@ var OracleDeployConfig = () => {
|
|
|
44663
44929
|
|
|
44664
44930
|
// src/mantine/blocks/action/actionTypes/oracleDeploy/OracleDeployFlowDetail.tsx
|
|
44665
44931
|
import React403, { useCallback as useCallback188, useMemo as useMemo162 } from "react";
|
|
44666
|
-
import { Alert as Alert114, Button as Button102, Group as
|
|
44932
|
+
import { Alert as Alert114, Button as Button102, Group as Group154, Loader as Loader98, Stack as Stack297, Text as Text278 } from "@mantine/core";
|
|
44667
44933
|
import { IconCheck as IconCheck50, IconAlertCircle as IconAlertCircle52 } from "@tabler/icons-react";
|
|
44668
44934
|
|
|
44669
44935
|
// src/mantine/blocks/action/actionTypes/oracleDeploy/types.ts
|
|
@@ -44863,7 +45129,7 @@ var OracleDeployFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, i
|
|
|
44863
45129
|
const handleRetry = useCallback188(() => {
|
|
44864
45130
|
updateRuntime({ state: "idle", error: void 0, output: {} });
|
|
44865
45131
|
}, [updateRuntime]);
|
|
44866
|
-
return /* @__PURE__ */ React403.createElement(Stack297, { gap: "md" }, /* @__PURE__ */ React403.createElement(Stack297, { gap: 2 }, /* @__PURE__ */ React403.createElement(Text278, { fw: 600 }, block?.props?.title || "Deploy Oracle"), /* @__PURE__ */ React403.createElement(Text278, { size: "sm", c: "dimmed" }, block?.props?.description || "Sets up the oracle environment, installs dependencies, builds, and starts the process.")), !isRunning && !isCompleted && !isStale && !isFailed && !inputsReady && /* @__PURE__ */ React403.createElement(
|
|
45132
|
+
return /* @__PURE__ */ React403.createElement(Stack297, { gap: "md" }, /* @__PURE__ */ React403.createElement(Stack297, { gap: 2 }, /* @__PURE__ */ React403.createElement(Text278, { fw: 600 }, block?.props?.title || "Deploy Oracle"), /* @__PURE__ */ React403.createElement(Text278, { size: "sm", c: "dimmed" }, block?.props?.description || "Sets up the oracle environment, installs dependencies, builds, and starts the process.")), !isRunning && !isCompleted && !isStale && !isFailed && !inputsReady && /* @__PURE__ */ React403.createElement(Group154, { gap: "xs" }, /* @__PURE__ */ React403.createElement(Loader98, { size: 14 }), /* @__PURE__ */ React403.createElement(Text278, { size: "sm", c: "dimmed" }, "Waiting for upstream secrets & config...")), isRunning && /* @__PURE__ */ React403.createElement(Group154, { gap: "xs" }, /* @__PURE__ */ React403.createElement(Loader98, { size: 14 }), /* @__PURE__ */ React403.createElement(Text278, { size: "sm" }, "Deploying oracle... This may take a few minutes.")), isCompleted && /* @__PURE__ */ React403.createElement(Alert114, { icon: /* @__PURE__ */ React403.createElement(IconCheck50, { size: 16 }), title: "Oracle Deployed", color: "green" }, /* @__PURE__ */ React403.createElement(Stack297, { gap: "xs" }, /* @__PURE__ */ React403.createElement(Text278, { size: "sm" }, "Oracle deployed and running!"), processId && /* @__PURE__ */ React403.createElement(Text278, { size: "xs", c: "dimmed" }, "Process ID: ", processId), status && /* @__PURE__ */ React403.createElement(Text278, { size: "xs", c: "dimmed" }, "Status: ", status), deploymentUrl && /* @__PURE__ */ React403.createElement(Text278, { size: "xs", c: "dimmed" }, "Deployment URL: ", deploymentUrl), domainUpdateTxHash && /* @__PURE__ */ React403.createElement(Text278, { size: "xs", c: "dimmed" }, "Domain updated on-chain (tx: ", domainUpdateTxHash.slice(0, 16), "\u2026)"))), isStale && /* @__PURE__ */ React403.createElement(Alert114, { icon: /* @__PURE__ */ React403.createElement(IconAlertCircle52, { size: 16 }), color: "yellow", title: "Inconsistent State" }, /* @__PURE__ */ React403.createElement(Stack297, { gap: "xs" }, /* @__PURE__ */ React403.createElement(Text278, { size: "sm" }, "Marked completed but missing deploy proof. Stale state \u2014 reset and re-run."), /* @__PURE__ */ React403.createElement(Group154, null, /* @__PURE__ */ React403.createElement(Button102, { variant: "outline", size: "xs", onClick: handleRetry }, "Reset"), /* @__PURE__ */ React403.createElement(Button102, { variant: "filled", size: "xs", onClick: handleExecute, disabled: !inputsReady }, "Force Run Now")))), isFailed && errorMessage && /* @__PURE__ */ React403.createElement(Alert114, { icon: /* @__PURE__ */ React403.createElement(IconAlertCircle52, { size: 16 }), color: "red", styles: actionAlertStyles }, errorMessage), isFailed && /* @__PURE__ */ React403.createElement(Group154, null, /* @__PURE__ */ React403.createElement(Button102, { variant: "outline", onClick: handleRetry }, "Try Again")), !isRunning && !isStale && /* @__PURE__ */ React403.createElement(Group154, null, /* @__PURE__ */ React403.createElement(Button102, { variant: "filled", size: "sm", onClick: handleExecute, disabled: !inputsReady || isDisabled }, isCompleted ? "Re-run" : inputsReady ? "Run Now" : "Waiting for inputs...")));
|
|
44867
45133
|
};
|
|
44868
45134
|
|
|
44869
45135
|
// src/mantine/blocks/action/actionTypes/oracleDeploy/index.ts
|
|
@@ -44979,7 +45245,7 @@ import React413 from "react";
|
|
|
44979
45245
|
|
|
44980
45246
|
// src/mantine/blocks/location/template/TemplateView.tsx
|
|
44981
45247
|
import React410, { useMemo as useMemo163 } from "react";
|
|
44982
|
-
import { Group as
|
|
45248
|
+
import { Group as Group156, Stack as Stack299, Text as Text281 } from "@mantine/core";
|
|
44983
45249
|
import { IconMapPin } from "@tabler/icons-react";
|
|
44984
45250
|
|
|
44985
45251
|
// src/mantine/blocks/location/template/TemplateConfig.tsx
|
|
@@ -45050,7 +45316,7 @@ function useUnlMap() {
|
|
|
45050
45316
|
|
|
45051
45317
|
// src/mantine/blocks/location/components/TileSelector.tsx
|
|
45052
45318
|
import React406, { useState as useState237, useCallback as useCallback189 } from "react";
|
|
45053
|
-
import { ActionIcon as ActionIcon51, Group as
|
|
45319
|
+
import { ActionIcon as ActionIcon51, Group as Group155, Tooltip as Tooltip34 } from "@mantine/core";
|
|
45054
45320
|
import { IconMap, IconMoon, IconSatellite, IconMountain } from "@tabler/icons-react";
|
|
45055
45321
|
var TILE_LAYERS = {
|
|
45056
45322
|
dark: {
|
|
@@ -45125,7 +45391,7 @@ var TileSelector = ({ mapRef }) => {
|
|
|
45125
45391
|
...OVERLAY_KEYS.map((key) => ({ type: key, label: TILE_LAYERS[key].label, icon: TILE_LAYERS[key].icon }))
|
|
45126
45392
|
];
|
|
45127
45393
|
return /* @__PURE__ */ React406.createElement(
|
|
45128
|
-
|
|
45394
|
+
Group155,
|
|
45129
45395
|
{
|
|
45130
45396
|
gap: 2,
|
|
45131
45397
|
style: {
|
|
@@ -45409,12 +45675,12 @@ var LocationTemplateView = ({ editor, block }) => {
|
|
|
45409
45675
|
const panelContent = useMemo163(() => /* @__PURE__ */ React410.createElement(TemplateConfig17, { editor, block }), [editor, block]);
|
|
45410
45676
|
const { open } = usePanel(panelId, panelContent);
|
|
45411
45677
|
const hasLocation = block.props.latitude && block.props.longitude;
|
|
45412
|
-
return /* @__PURE__ */ React410.createElement(BaseContainer, { blockId: block.id, onClick: open, style: { minHeight: 90, justifyContent: "center" } }, /* @__PURE__ */ React410.createElement(Stack299, { gap: "xs", justify: "center" }, /* @__PURE__ */ React410.createElement(
|
|
45678
|
+
return /* @__PURE__ */ React410.createElement(BaseContainer, { blockId: block.id, onClick: open, style: { minHeight: 90, justifyContent: "center" } }, /* @__PURE__ */ React410.createElement(Stack299, { gap: "xs", justify: "center" }, /* @__PURE__ */ React410.createElement(Group156, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React410.createElement(IconMapPin, { color: "currentColor", size: 26, stroke: 1.5 }), /* @__PURE__ */ React410.createElement(Stack299, { gap: 2 }, /* @__PURE__ */ React410.createElement(Text281, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Location"), block.props.description && /* @__PURE__ */ React410.createElement(Text281, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description))), hasLocation && /* @__PURE__ */ React410.createElement(LocationMap, { latitude: block.props.latitude, longitude: block.props.longitude, mapId: `location-template-map-${block.id}`, zoom: 14, showMarker: true, showTilesControl: true })));
|
|
45413
45679
|
};
|
|
45414
45680
|
|
|
45415
45681
|
// src/mantine/blocks/location/flow/FlowView.tsx
|
|
45416
45682
|
import React412, { useMemo as useMemo164 } from "react";
|
|
45417
|
-
import { Center as Center14, Group as
|
|
45683
|
+
import { Center as Center14, Group as Group157, Stack as Stack300, Text as Text282 } from "@mantine/core";
|
|
45418
45684
|
import { IconMapPin as IconMapPin2 } from "@tabler/icons-react";
|
|
45419
45685
|
|
|
45420
45686
|
// src/mantine/blocks/location/flow/FlowConfig.tsx
|
|
@@ -45432,7 +45698,7 @@ var LocationFlowView = ({ editor, block }) => {
|
|
|
45432
45698
|
const panelContent = useMemo164(() => /* @__PURE__ */ React412.createElement(FlowConfig3, { editor, block }), [editor, block]);
|
|
45433
45699
|
const { open } = usePanel(panelId, panelContent);
|
|
45434
45700
|
const hasLocation = block.props.latitude && block.props.longitude;
|
|
45435
|
-
return /* @__PURE__ */ React412.createElement(BaseContainer, { blockId: block.id, onClick: open, style: { minHeight: 90, justifyContent: "center" } }, /* @__PURE__ */ React412.createElement(Stack300, { gap: "xs", justify: "center" }, /* @__PURE__ */ React412.createElement(
|
|
45701
|
+
return /* @__PURE__ */ React412.createElement(BaseContainer, { blockId: block.id, onClick: open, style: { minHeight: 90, justifyContent: "center" } }, /* @__PURE__ */ React412.createElement(Stack300, { gap: "xs", justify: "center" }, /* @__PURE__ */ React412.createElement(Group157, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React412.createElement(IconMapPin2, { color: "currentColor", size: 26, stroke: 1.5 }), /* @__PURE__ */ React412.createElement(Stack300, { gap: 2 }, /* @__PURE__ */ React412.createElement(Text282, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Location"), block.props.description && /* @__PURE__ */ React412.createElement(Text282, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description))), hasLocation ? /* @__PURE__ */ React412.createElement(LocationMap, { latitude: block.props.latitude, longitude: block.props.longitude, mapId: `location-flow-map-${block.id}`, zoom: 14, showMarker: true, showTilesControl: true }) : /* @__PURE__ */ React412.createElement(Center14, { py: "md" }, /* @__PURE__ */ React412.createElement(Text282, { size: "sm", c: "dimmed" }, "Location not configured"))));
|
|
45436
45702
|
};
|
|
45437
45703
|
|
|
45438
45704
|
// src/mantine/blocks/location/LocationBlock.tsx
|
|
@@ -45474,7 +45740,7 @@ import React420 from "react";
|
|
|
45474
45740
|
|
|
45475
45741
|
// src/mantine/blocks/embed/template/TemplateView.tsx
|
|
45476
45742
|
import React417, { useMemo as useMemo165 } from "react";
|
|
45477
|
-
import { Box as Box72, Group as
|
|
45743
|
+
import { Box as Box72, Group as Group158, Stack as Stack302, Text as Text284 } from "@mantine/core";
|
|
45478
45744
|
|
|
45479
45745
|
// src/mantine/blocks/embed/template/TemplateConfig.tsx
|
|
45480
45746
|
import React416, { useCallback as useCallback191 } from "react";
|
|
@@ -45482,7 +45748,7 @@ import { IconSettings as IconSettings22 } from "@tabler/icons-react";
|
|
|
45482
45748
|
|
|
45483
45749
|
// src/mantine/blocks/embed/template/GeneralTab.tsx
|
|
45484
45750
|
import React415, { useEffect as useEffect178, useState as useState240 } from "react";
|
|
45485
|
-
import { Stack as Stack301, Switch as
|
|
45751
|
+
import { Stack as Stack301, Switch as Switch18, Text as Text283 } from "@mantine/core";
|
|
45486
45752
|
var GeneralTab18 = ({
|
|
45487
45753
|
url,
|
|
45488
45754
|
title,
|
|
@@ -45533,7 +45799,7 @@ var GeneralTab18 = ({
|
|
|
45533
45799
|
onHeightChange(v);
|
|
45534
45800
|
}
|
|
45535
45801
|
}
|
|
45536
|
-
), /* @__PURE__ */ React415.createElement(Stack301, { gap: "xs" }, /* @__PURE__ */ React415.createElement(
|
|
45802
|
+
), /* @__PURE__ */ React415.createElement(Stack301, { gap: "xs" }, /* @__PURE__ */ React415.createElement(Switch18, { label: "Allow authenticated embeds", checked: allowAuth, onChange: (event) => onAllowAuthChange(event.currentTarget.checked) }), /* @__PURE__ */ React415.createElement(Text283, { size: "xs", c: "dimmed" }, "Enable for services like Google Calendar that require cookie access. Only use with trusted URLs.")));
|
|
45537
45803
|
};
|
|
45538
45804
|
|
|
45539
45805
|
// src/mantine/blocks/embed/template/TemplateConfig.tsx
|
|
@@ -45607,7 +45873,7 @@ var EmbedTemplateView = ({ editor, block }) => {
|
|
|
45607
45873
|
const safeUrl = sanitizeEmbedUrl(block.props.url);
|
|
45608
45874
|
const height = Number(block.props.height) || 400;
|
|
45609
45875
|
const sandbox = block.props.allowAuth === "true" ? "allow-scripts allow-same-origin allow-forms allow-popups" : "allow-scripts allow-forms allow-popups";
|
|
45610
|
-
return /* @__PURE__ */ React417.createElement(BaseContainer, { blockId: block.id, onClick: open, style: { minHeight: 90, justifyContent: "center" } }, /* @__PURE__ */ React417.createElement(Stack302, { gap: "xs", justify: "center" }, /* @__PURE__ */ React417.createElement(
|
|
45876
|
+
return /* @__PURE__ */ React417.createElement(BaseContainer, { blockId: block.id, onClick: open, style: { minHeight: 90, justifyContent: "center" } }, /* @__PURE__ */ React417.createElement(Stack302, { gap: "xs", justify: "center" }, /* @__PURE__ */ React417.createElement(Group158, { wrap: "nowrap", align: "center" }, getIcon("code", block.props.icon), /* @__PURE__ */ React417.createElement(Stack302, { gap: 2 }, /* @__PURE__ */ React417.createElement(Text284, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Embed"), /* @__PURE__ */ React417.createElement(Text284, { size: "xs", c: "dimmed", contentEditable: false, lineClamp: 1 }, block.props.description || safeUrl || "Click to configure"))), safeUrl && /* @__PURE__ */ React417.createElement(Box72, { style: { borderRadius: 8, overflow: "hidden" } }, /* @__PURE__ */ React417.createElement(
|
|
45611
45877
|
"iframe",
|
|
45612
45878
|
{
|
|
45613
45879
|
...isImageUrl(safeUrl) ? { srcDoc: buildImageSrcdoc(safeUrl) } : { src: safeUrl },
|
|
@@ -45624,7 +45890,7 @@ var EmbedTemplateView = ({ editor, block }) => {
|
|
|
45624
45890
|
|
|
45625
45891
|
// src/mantine/blocks/embed/flow/FlowView.tsx
|
|
45626
45892
|
import React419, { useMemo as useMemo166 } from "react";
|
|
45627
|
-
import { Box as Box73, Group as
|
|
45893
|
+
import { Box as Box73, Group as Group159, Stack as Stack303, Text as Text285 } from "@mantine/core";
|
|
45628
45894
|
|
|
45629
45895
|
// src/mantine/blocks/embed/flow/FlowConfig.tsx
|
|
45630
45896
|
import React418, { useCallback as useCallback192 } from "react";
|
|
@@ -45673,7 +45939,7 @@ var EmbedFlowView = ({ editor, block }) => {
|
|
|
45673
45939
|
const safeUrl = sanitizeEmbedUrl(block.props.url);
|
|
45674
45940
|
const height = Number(block.props.height) || 400;
|
|
45675
45941
|
const sandbox = block.props.allowAuth === "true" ? "allow-scripts allow-same-origin allow-forms allow-popups" : "allow-scripts allow-forms allow-popups";
|
|
45676
|
-
return /* @__PURE__ */ React419.createElement(BaseContainer, { blockId: block.id, onClick: open, style: { minHeight: 90, justifyContent: "center" } }, /* @__PURE__ */ React419.createElement(Stack303, { gap: "xs", justify: "center" }, /* @__PURE__ */ React419.createElement(
|
|
45942
|
+
return /* @__PURE__ */ React419.createElement(BaseContainer, { blockId: block.id, onClick: open, style: { minHeight: 90, justifyContent: "center" } }, /* @__PURE__ */ React419.createElement(Stack303, { gap: "xs", justify: "center" }, /* @__PURE__ */ React419.createElement(Group159, { wrap: "nowrap", align: "center" }, getIcon("code", block.props.icon), /* @__PURE__ */ React419.createElement(Stack303, { gap: 2 }, /* @__PURE__ */ React419.createElement(Text285, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Embed"), /* @__PURE__ */ React419.createElement(Text285, { size: "xs", c: "dimmed", contentEditable: false, lineClamp: 1 }, block.props.description || safeUrl || "No URL configured"))), safeUrl && /* @__PURE__ */ React419.createElement(Box73, { style: { borderRadius: 8, overflow: "hidden" } }, /* @__PURE__ */ React419.createElement(
|
|
45677
45943
|
"iframe",
|
|
45678
45944
|
{
|
|
45679
45945
|
...isImageUrl(safeUrl) ? { srcDoc: buildImageSrcdoc(safeUrl) } : { src: safeUrl },
|
|
@@ -45726,7 +45992,7 @@ import { createReactBlockSpec as createReactBlockSpec23 } from "@blocknote/react
|
|
|
45726
45992
|
|
|
45727
45993
|
// src/mantine/blocks/secrets/SecretsBlock.tsx
|
|
45728
45994
|
import React422, { useCallback as useCallback193, useMemo as useMemo167, useState as useState241 } from "react";
|
|
45729
|
-
import { Anchor as Anchor6, ActionIcon as ActionIcon52, Button as Button103, Collapse as Collapse15, CopyButton as CopyButton3, Group as
|
|
45995
|
+
import { Anchor as Anchor6, ActionIcon as ActionIcon52, Button as Button103, Collapse as Collapse15, CopyButton as CopyButton3, Group as Group160, Paper as Paper25, Stack as Stack304, Text as Text286, Tooltip as Tooltip35 } from "@mantine/core";
|
|
45730
45996
|
import { IconCheck as IconCheck51, IconCopy as IconCopy3, IconDownload as IconDownload5, IconEye, IconEyeOff, IconKey as IconKey5 } from "@tabler/icons-react";
|
|
45731
45997
|
var SENSITIVE_KEYS = /* @__PURE__ */ new Set(["mnemonic", "matrixPassword", "matrixRecoveryPhrase", "matrixAccessToken", "pin", "openRouterApiKeyJwe", "authToken"]);
|
|
45732
45998
|
var BLOCK_LABELS = {
|
|
@@ -45828,12 +46094,12 @@ function MaskedValue({ value, isSensitive }) {
|
|
|
45828
46094
|
if (!isSensitive) {
|
|
45829
46095
|
return /* @__PURE__ */ React422.createElement(Text286, { size: "xs", ff: "monospace", style: { wordBreak: "break-all" } }, String(value));
|
|
45830
46096
|
}
|
|
45831
|
-
return /* @__PURE__ */ React422.createElement(
|
|
46097
|
+
return /* @__PURE__ */ React422.createElement(Group160, { gap: 4, align: "center", wrap: "nowrap" }, /* @__PURE__ */ React422.createElement(Text286, { size: "xs", ff: "monospace", style: { wordBreak: "break-all" } }, visible ? String(value) : "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022"), /* @__PURE__ */ React422.createElement(ActionIcon52, { variant: "subtle", size: "xs", onClick: () => setVisible((v) => !v) }, visible ? /* @__PURE__ */ React422.createElement(IconEyeOff, { size: 12 }) : /* @__PURE__ */ React422.createElement(IconEye, { size: 12 })));
|
|
45832
46098
|
}
|
|
45833
46099
|
function OutputEntry({ label, value, isSensitive }) {
|
|
45834
46100
|
const displayValue = typeof value === "object" ? JSON.stringify(value, null, 2) : String(value ?? "");
|
|
45835
46101
|
const desc = FIELD_DESCRIPTIONS[label];
|
|
45836
|
-
return /* @__PURE__ */ React422.createElement(Stack304, { gap: 0 }, /* @__PURE__ */ React422.createElement(
|
|
46102
|
+
return /* @__PURE__ */ React422.createElement(Stack304, { gap: 0 }, /* @__PURE__ */ React422.createElement(Group160, { gap: "xs", align: "flex-start", wrap: "nowrap", style: { minHeight: 24 } }, /* @__PURE__ */ React422.createElement(Text286, { size: "xs", c: "dimmed", style: { minWidth: 140, flexShrink: 0 } }, label), /* @__PURE__ */ React422.createElement(MaskedValue, { value: displayValue, isSensitive })), desc && /* @__PURE__ */ React422.createElement(Text286, { size: "xs", c: "dimmed", fs: "italic", pl: 140 }, desc));
|
|
45837
46103
|
}
|
|
45838
46104
|
function SecretsBlock({ editor, block }) {
|
|
45839
46105
|
const { docType } = useBlocknoteContext();
|
|
@@ -45856,9 +46122,9 @@ function SecretsBlock({ editor, block }) {
|
|
|
45856
46122
|
URL.revokeObjectURL(url);
|
|
45857
46123
|
}, [outputs]);
|
|
45858
46124
|
if (docType === "template") {
|
|
45859
|
-
return /* @__PURE__ */ React422.createElement(BaseContainer, { blockId: block.id }, /* @__PURE__ */ React422.createElement(Stack304, { gap: "xs" }, /* @__PURE__ */ React422.createElement(
|
|
46125
|
+
return /* @__PURE__ */ React422.createElement(BaseContainer, { blockId: block.id }, /* @__PURE__ */ React422.createElement(Stack304, { gap: "xs" }, /* @__PURE__ */ React422.createElement(Group160, { gap: "xs", align: "center" }, /* @__PURE__ */ React422.createElement(IconKey5, { size: 18 }), /* @__PURE__ */ React422.createElement(Text286, { fw: 600, size: "sm" }, block.props.title || "Flow Output")), /* @__PURE__ */ React422.createElement(Text286, { size: "xs", c: "dimmed" }, "Displays all flow outputs and allows downloading them in flow mode.")));
|
|
45860
46126
|
}
|
|
45861
|
-
return /* @__PURE__ */ React422.createElement(BaseContainer, { blockId: block.id }, /* @__PURE__ */ React422.createElement(Stack304, { gap: "md" }, /* @__PURE__ */ React422.createElement(
|
|
46127
|
+
return /* @__PURE__ */ React422.createElement(BaseContainer, { blockId: block.id }, /* @__PURE__ */ React422.createElement(Stack304, { gap: "md" }, /* @__PURE__ */ React422.createElement(Group160, { gap: "xs", align: "center" }, /* @__PURE__ */ React422.createElement(IconKey5, { size: 18 }), /* @__PURE__ */ React422.createElement(Text286, { fw: 600, size: "sm" }, block.props.title || "Flow Output")), /* @__PURE__ */ React422.createElement(Text286, { size: "sm", c: "dimmed" }, "Everything produced by this flow. You can view it here or download as JSON."), connectUrl && /* @__PURE__ */ React422.createElement(Stack304, { gap: "xs" }, /* @__PURE__ */ React422.createElement(Text286, { size: "sm", fw: 500 }, "Oracle Connect Link"), /* @__PURE__ */ React422.createElement(Group160, { gap: "xs", align: "center" }, /* @__PURE__ */ React422.createElement(Anchor6, { href: connectUrl, target: "_blank", size: "sm", style: { wordBreak: "break-all" } }, connectUrl), /* @__PURE__ */ React422.createElement(CopyButton3, { value: connectUrl, timeout: 2e3 }, ({ copied, copy }) => /* @__PURE__ */ React422.createElement(Tooltip35, { label: copied ? "Copied" : "Copy link", withArrow: true, position: "right" }, /* @__PURE__ */ React422.createElement(ActionIcon52, { color: copied ? "teal" : "gray", variant: "subtle", onClick: copy, size: "sm" }, copied ? /* @__PURE__ */ React422.createElement(IconCheck51, { size: 14 }) : /* @__PURE__ */ React422.createElement(IconCopy3, { size: 14 })))))), /* @__PURE__ */ React422.createElement(Group160, { gap: "xs" }, /* @__PURE__ */ React422.createElement(Button103, { variant: "light", size: "xs", leftSection: /* @__PURE__ */ React422.createElement(IconEye, { size: 14 }), onClick: () => setShowOutput((v) => !v) }, showOutput ? "Hide Output" : "View Output"), /* @__PURE__ */ React422.createElement(Button103, { variant: "filled", size: "sm", leftSection: /* @__PURE__ */ React422.createElement(IconDownload5, { size: 14 }), onClick: handleDownload, disabled: outputs.length === 0 }, "Download JSON")), /* @__PURE__ */ React422.createElement(Collapse15, { in: showOutput }, /* @__PURE__ */ React422.createElement(Stack304, { gap: "sm" }, outputs.length === 0 && /* @__PURE__ */ React422.createElement(Text286, { size: "xs", c: "dimmed", fs: "italic" }, "No outputs yet."), outputs.map(({ id, label, output }) => /* @__PURE__ */ React422.createElement(Paper25, { key: id, p: "xs", withBorder: true, style: { borderColor: "var(--mantine-color-neutralColor-6)" } }, /* @__PURE__ */ React422.createElement(Stack304, { gap: 4 }, /* @__PURE__ */ React422.createElement(Text286, { size: "xs", fw: 600 }, label), Object.entries(output).map(([key, value]) => /* @__PURE__ */ React422.createElement(OutputEntry, { key, label: key, value, isSensitive: SENSITIVE_KEYS.has(key) })))))))));
|
|
45862
46128
|
}
|
|
45863
46129
|
|
|
45864
46130
|
// src/mantine/blocks/secrets/SecretsBlockSpec.tsx
|
|
@@ -45903,7 +46169,7 @@ import React428 from "react";
|
|
|
45903
46169
|
|
|
45904
46170
|
// src/mantine/blocks/skills/template/SkillsTemplateView.tsx
|
|
45905
46171
|
import React426, { useMemo as useMemo168 } from "react";
|
|
45906
|
-
import { Badge as Badge61, Group as
|
|
46172
|
+
import { Badge as Badge61, Group as Group161, Stack as Stack305, Text as Text287 } from "@mantine/core";
|
|
45907
46173
|
var SkillsTemplateView = ({ editor: _editor, block }) => {
|
|
45908
46174
|
const skillCount = useMemo168(() => {
|
|
45909
46175
|
try {
|
|
@@ -45921,11 +46187,11 @@ var SkillsTemplateView = ({ editor: _editor, block }) => {
|
|
|
45921
46187
|
return 0;
|
|
45922
46188
|
}
|
|
45923
46189
|
}, [block.props.mcpServers]);
|
|
45924
|
-
return /* @__PURE__ */ React426.createElement(BaseContainer, { blockId: block.id }, /* @__PURE__ */ React426.createElement(Badge61, { size: "xs", variant: "light", color: "gray", style: { position: "absolute", top: 8, right: 8 } }, "Template"), /* @__PURE__ */ React426.createElement(
|
|
46190
|
+
return /* @__PURE__ */ React426.createElement(BaseContainer, { blockId: block.id }, /* @__PURE__ */ React426.createElement(Badge61, { size: "xs", variant: "light", color: "gray", style: { position: "absolute", top: 8, right: 8 } }, "Template"), /* @__PURE__ */ React426.createElement(Group161, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React426.createElement(Group161, { wrap: "nowrap", align: "center" }, getIcon("tools", block.props.icon), /* @__PURE__ */ React426.createElement(Stack305, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React426.createElement(Text287, { fw: 500, size: "sm" }, block.props.title || "Skills"), /* @__PURE__ */ React426.createElement(Text287, { size: "xs", c: "dimmed" }, skillCount > 0 || serverCount > 0 ? `${skillCount} skill(s), ${serverCount} MCP server(s) configured` : "Skills and MCP servers will be configured by the agent")))));
|
|
45925
46191
|
};
|
|
45926
46192
|
|
|
45927
46193
|
// src/mantine/blocks/skills/flow/SkillsFlowView.tsx
|
|
45928
|
-
import { ActionIcon as ActionIcon53, Badge as Badge62, Button as Button104, Collapse as Collapse16, Group as
|
|
46194
|
+
import { ActionIcon as ActionIcon53, Badge as Badge62, Button as Button104, Collapse as Collapse16, Group as Group162, Loader as Loader100, Paper as Paper26, Stack as Stack306, Text as Text288, Tooltip as Tooltip36 } from "@mantine/core";
|
|
45929
46195
|
import { IconBrain as IconBrain3, IconCheck as IconCheck52, IconPencil as IconPencil3, IconPlus as IconPlus11, IconTrash as IconTrash13, IconX as IconX21 } from "@tabler/icons-react";
|
|
45930
46196
|
import React427, { useCallback as useCallback194, useEffect as useEffect179, useMemo as useMemo169, useRef as useRef58, useState as useState242 } from "react";
|
|
45931
46197
|
function parseSkills2(raw) {
|
|
@@ -46112,7 +46378,7 @@ var SkillsFlowView = ({ editor, block }) => {
|
|
|
46112
46378
|
setSavingMcp(false);
|
|
46113
46379
|
resetMcpForm();
|
|
46114
46380
|
}, [mcpName, mcpUrl, mcpDescription, editingMcpIndex, mcpServers, updateMcpServers, resetMcpForm, handleValidateMcp]);
|
|
46115
|
-
return /* @__PURE__ */ React427.createElement(BaseContainer, { blockId: block.id }, /* @__PURE__ */ React427.createElement(Stack306, { gap: "md" }, /* @__PURE__ */ React427.createElement(
|
|
46381
|
+
return /* @__PURE__ */ React427.createElement(BaseContainer, { blockId: block.id }, /* @__PURE__ */ React427.createElement(Stack306, { gap: "md" }, /* @__PURE__ */ React427.createElement(Group162, { justify: "space-between", align: "center" }, /* @__PURE__ */ React427.createElement(Group162, { gap: "xs", align: "center" }, /* @__PURE__ */ React427.createElement(IconBrain3, { size: 20 }), /* @__PURE__ */ React427.createElement(Text288, { fw: 600, size: "sm" }, block.props.title || "Skills & MCP Servers")), isCompleted && /* @__PURE__ */ React427.createElement(Badge62, { color: "green", variant: "light", size: "sm" }, "Configured")), block.props.description && /* @__PURE__ */ React427.createElement(Text288, { size: "xs", c: "dimmed" }, block.props.description), /* @__PURE__ */ React427.createElement(Stack306, { gap: "xs" }, /* @__PURE__ */ React427.createElement(Text288, { size: "xs", fw: 500 }, "Skills"), loadingCapsules ? /* @__PURE__ */ React427.createElement(Group162, { gap: "xs" }, /* @__PURE__ */ React427.createElement(Loader100, { size: "xs" }), /* @__PURE__ */ React427.createElement(Text288, { size: "xs", c: "dimmed" }, "Loading skills...")) : !isCompleted ? /* @__PURE__ */ React427.createElement(
|
|
46116
46382
|
BaseMultiSelect,
|
|
46117
46383
|
{
|
|
46118
46384
|
placeholder: "Search and select skills...",
|
|
@@ -46139,7 +46405,7 @@ var SkillsFlowView = ({ editor, block }) => {
|
|
|
46139
46405
|
option: { padding: "8px 12px" }
|
|
46140
46406
|
}
|
|
46141
46407
|
}
|
|
46142
|
-
) : null, skills.map((skill) => /* @__PURE__ */ React427.createElement(Paper26, { key: skill.cid, p: "xs", withBorder: true, style: { borderColor: "var(--mantine-color-neutralColor-6)" } }, /* @__PURE__ */ React427.createElement(
|
|
46408
|
+
) : null, skills.map((skill) => /* @__PURE__ */ React427.createElement(Paper26, { key: skill.cid, p: "xs", withBorder: true, style: { borderColor: "var(--mantine-color-neutralColor-6)" } }, /* @__PURE__ */ React427.createElement(Group162, { justify: "space-between", wrap: "nowrap" }, /* @__PURE__ */ React427.createElement(Stack306, { gap: 2, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React427.createElement(Group162, { gap: "xs", align: "center" }, /* @__PURE__ */ React427.createElement(Text288, { size: "xs", fw: 500 }, skill.name), /* @__PURE__ */ React427.createElement(Badge62, { size: "xs", variant: "light", color: "blue" }, "CID")), skill.description && /* @__PURE__ */ React427.createElement(Text288, { size: "xs", c: "dimmed", lineClamp: 2 }, skill.description), /* @__PURE__ */ React427.createElement(Text288, { size: "xs", c: "dimmed", ff: "monospace", lineClamp: 1 }, skill.cid)), !isCompleted && /* @__PURE__ */ React427.createElement(ActionIcon53, { variant: "subtle", color: "red", size: "sm", onClick: () => updateSkills(skills.filter((s) => s.cid !== skill.cid)) }, /* @__PURE__ */ React427.createElement(IconX21, { size: 14 }))))), skills.length === 0 && !loadingCapsules && /* @__PURE__ */ React427.createElement(Text288, { size: "xs", c: "dimmed", fs: "italic" }, "No skills selected yet.")), /* @__PURE__ */ React427.createElement(Stack306, { gap: "xs" }, /* @__PURE__ */ React427.createElement(Group162, { justify: "space-between", align: "center" }, /* @__PURE__ */ React427.createElement(Text288, { size: "xs", fw: 500 }, "MCP Servers")), !isCompleted && mcpPresets.length > 0 && /* @__PURE__ */ React427.createElement(
|
|
46143
46409
|
BaseSelect,
|
|
46144
46410
|
{
|
|
46145
46411
|
placeholder: "Add from presets...",
|
|
@@ -46158,7 +46424,7 @@ var SkillsFlowView = ({ editor, block }) => {
|
|
|
46158
46424
|
), mcpServers.map((server, i) => {
|
|
46159
46425
|
const validation = validationResults[server.url];
|
|
46160
46426
|
const isValidating = validatingUrls[server.url];
|
|
46161
|
-
return /* @__PURE__ */ React427.createElement(Paper26, { key: i, p: "xs", withBorder: true, style: { borderColor: "var(--mantine-color-neutralColor-6)" } }, /* @__PURE__ */ React427.createElement(
|
|
46427
|
+
return /* @__PURE__ */ React427.createElement(Paper26, { key: i, p: "xs", withBorder: true, style: { borderColor: "var(--mantine-color-neutralColor-6)" } }, /* @__PURE__ */ React427.createElement(Group162, { justify: "space-between", wrap: "nowrap" }, /* @__PURE__ */ React427.createElement(Stack306, { gap: 2, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React427.createElement(Group162, { gap: "xs", align: "center" }, /* @__PURE__ */ React427.createElement(Text288, { size: "xs", fw: 500 }, server.name), validation && validation.success && /* @__PURE__ */ React427.createElement(Badge62, { size: "xs", variant: "light", color: "green", leftSection: /* @__PURE__ */ React427.createElement(IconCheck52, { size: 10 }) }, validation.toolCount, " tools")), server.description && /* @__PURE__ */ React427.createElement(Text288, { size: "xs", c: "dimmed", lineClamp: 1 }, server.description), /* @__PURE__ */ React427.createElement(Text288, { size: "xs", c: "dimmed", ff: "monospace", lineClamp: 1 }, server.url), validation && !validation.success && /* @__PURE__ */ React427.createElement(Text288, { size: "xs", c: "red" }, validation.error)), !isCompleted && /* @__PURE__ */ React427.createElement(Group162, { gap: 4 }, !server.isPreset && /* @__PURE__ */ React427.createElement(Tooltip36, { label: "Test connection" }, /* @__PURE__ */ React427.createElement(Button104, { variant: "subtle", size: "compact-xs", onClick: () => handleValidateMcp(server.url), disabled: isValidating }, isValidating ? /* @__PURE__ */ React427.createElement(Loader100, { size: 12 }) : "Test")), /* @__PURE__ */ React427.createElement(
|
|
46162
46428
|
ActionIcon53,
|
|
46163
46429
|
{
|
|
46164
46430
|
variant: "subtle",
|
|
@@ -46182,7 +46448,7 @@ var SkillsFlowView = ({ editor, block }) => {
|
|
|
46182
46448
|
value: mcpDescription,
|
|
46183
46449
|
onChange: (e) => setMcpDescription(e.currentTarget.value)
|
|
46184
46450
|
}
|
|
46185
|
-
), mcpSaveError && /* @__PURE__ */ React427.createElement(Text288, { size: "xs", c: "red" }, mcpSaveError), /* @__PURE__ */ React427.createElement(
|
|
46451
|
+
), mcpSaveError && /* @__PURE__ */ React427.createElement(Text288, { size: "xs", c: "red" }, mcpSaveError), /* @__PURE__ */ React427.createElement(Group162, { gap: "xs", justify: "flex-end" }, /* @__PURE__ */ React427.createElement(
|
|
46186
46452
|
Button104,
|
|
46187
46453
|
{
|
|
46188
46454
|
size: "xs",
|
|
@@ -48403,13 +48669,13 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
48403
48669
|
|
|
48404
48670
|
// src/mantine/components/Base/BaseIconPicker.tsx
|
|
48405
48671
|
import React432, { useState as useState248, useMemo as useMemo175, useEffect as useEffect185 } from "react";
|
|
48406
|
-
import { TextInput as TextInput11, Tabs as Tabs4, Box as Box74, Stack as Stack307, UnstyledButton as UnstyledButton7, Text as Text290, Center as Center15, ScrollArea as ScrollArea10, Group as
|
|
48672
|
+
import { TextInput as TextInput11, Tabs as Tabs4, Box as Box74, Stack as Stack307, UnstyledButton as UnstyledButton7, Text as Text290, Center as Center15, ScrollArea as ScrollArea10, Group as Group164, Popover as Popover5 } from "@mantine/core";
|
|
48407
48673
|
import * as TablerIcons2 from "@tabler/icons-react";
|
|
48408
48674
|
import { IconSearch as IconSearch11, IconX as IconX22, IconChevronLeft, IconChevronRight as IconChevronRight14 } from "@tabler/icons-react";
|
|
48409
48675
|
|
|
48410
48676
|
// src/mantine/components/Base/CoverImageButton.tsx
|
|
48411
48677
|
import React431, { forwardRef, useState as useState247 } from "react";
|
|
48412
|
-
import { UnstyledButton as UnstyledButton6, Group as
|
|
48678
|
+
import { UnstyledButton as UnstyledButton6, Group as Group163, Text as Text289 } from "@mantine/core";
|
|
48413
48679
|
var CoverImageButton = forwardRef(function CoverImageButton2({ isActive = false, onClick, icon: icon2, children, style }, ref) {
|
|
48414
48680
|
const [hovered, setHovered] = useState247(false);
|
|
48415
48681
|
return /* @__PURE__ */ React431.createElement(
|
|
@@ -48428,7 +48694,7 @@ var CoverImageButton = forwardRef(function CoverImageButton2({ isActive = false,
|
|
|
48428
48694
|
...style
|
|
48429
48695
|
}
|
|
48430
48696
|
},
|
|
48431
|
-
/* @__PURE__ */ React431.createElement(
|
|
48697
|
+
/* @__PURE__ */ React431.createElement(Group163, { gap: 4, wrap: "nowrap" }, icon2 && /* @__PURE__ */ React431.createElement(
|
|
48432
48698
|
"span",
|
|
48433
48699
|
{
|
|
48434
48700
|
style: {
|
|
@@ -48588,7 +48854,7 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, onRemove
|
|
|
48588
48854
|
transition: "background 0.15s ease"
|
|
48589
48855
|
}
|
|
48590
48856
|
},
|
|
48591
|
-
/* @__PURE__ */ React432.createElement(
|
|
48857
|
+
/* @__PURE__ */ React432.createElement(Group164, { gap: 4, wrap: "nowrap" }, /* @__PURE__ */ React432.createElement(IconX22, { size: 14 }), /* @__PURE__ */ React432.createElement(Text290, { fz: 12, c: "dimmed", style: { whiteSpace: "nowrap" } }, "Remove"))
|
|
48592
48858
|
),
|
|
48593
48859
|
/* @__PURE__ */ React432.createElement(Stack307, { gap: "md", p: "md" }, /* @__PURE__ */ React432.createElement(Tabs4, { value: activeTab, onChange: setActiveTab, variant: "pills" }, /* @__PURE__ */ React432.createElement(Tabs4.List, null, /* @__PURE__ */ React432.createElement(Tabs4.Tab, { value: "icons" }, "Icons"), /* @__PURE__ */ React432.createElement(Tabs4.Tab, { value: "upload" }, "Upload")), /* @__PURE__ */ React432.createElement(Tabs4.Panel, { value: "icons", pt: "md" }, /* @__PURE__ */ React432.createElement(
|
|
48594
48860
|
TextInput11,
|
|
@@ -48608,7 +48874,7 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, onRemove
|
|
|
48608
48874
|
}
|
|
48609
48875
|
}
|
|
48610
48876
|
}
|
|
48611
|
-
), !searchQuery && /* @__PURE__ */ React432.createElement(Box74, { mb: "md" }, /* @__PURE__ */ React432.createElement(Text290, { size: "sm", fw: 500, mb: "xs", px: "xs" }, "Recent"), /* @__PURE__ */ React432.createElement(ScrollArea10.Autosize, { scrollbarSize: 0, mah: 60 }, renderIconGrid(recentIcons))), /* @__PURE__ */ React432.createElement(Box74, null, /* @__PURE__ */ React432.createElement(
|
|
48877
|
+
), !searchQuery && /* @__PURE__ */ React432.createElement(Box74, { mb: "md" }, /* @__PURE__ */ React432.createElement(Text290, { size: "sm", fw: 500, mb: "xs", px: "xs" }, "Recent"), /* @__PURE__ */ React432.createElement(ScrollArea10.Autosize, { scrollbarSize: 0, mah: 60 }, renderIconGrid(recentIcons))), /* @__PURE__ */ React432.createElement(Box74, null, /* @__PURE__ */ React432.createElement(Group164, { justify: "space-between", mb: "xs", px: "xs" }, /* @__PURE__ */ React432.createElement(Text290, { size: "sm", fw: 500 }, searchQuery ? "Results" : "Icons"), totalPages > 1 && /* @__PURE__ */ React432.createElement(Group164, { gap: "xs" }, /* @__PURE__ */ React432.createElement(Text290, { size: "xs", c: "dimmed" }, "Page ", currentPage, " of ", totalPages, " (", filteredIcons.length, " total)"), /* @__PURE__ */ React432.createElement(BaseButton, { size: "xs", onClick: () => setCurrentPage((p) => Math.max(1, p - 1)), disabled: currentPage === 1, leftSection: /* @__PURE__ */ React432.createElement(IconChevronLeft, { size: 14 }) }, "Prev"), /* @__PURE__ */ React432.createElement(
|
|
48612
48878
|
BaseButton,
|
|
48613
48879
|
{
|
|
48614
48880
|
size: "xs",
|
|
@@ -48623,7 +48889,7 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, onRemove
|
|
|
48623
48889
|
|
|
48624
48890
|
// src/mantine/components/CoverImage.tsx
|
|
48625
48891
|
import React435, { useState as useState250, useRef as useRef62, useEffect as useEffect187, useMemo as useMemo177 } from "react";
|
|
48626
|
-
import { Box as Box77, Group as
|
|
48892
|
+
import { Box as Box77, Group as Group166 } from "@mantine/core";
|
|
48627
48893
|
import { IconMoodSmile, IconPhoto as IconPhoto6, IconSettings as IconSettings24, IconArrowsMove, IconTrash as IconTrash15, IconRefresh as IconRefresh16 } from "@tabler/icons-react";
|
|
48628
48894
|
|
|
48629
48895
|
// src/core/lib/imageTransform.ts
|
|
@@ -48814,7 +49080,7 @@ import { useDisclosure as useDisclosure7 } from "@mantine/hooks";
|
|
|
48814
49080
|
|
|
48815
49081
|
// src/mantine/components/FlowSettingsPanel.tsx
|
|
48816
49082
|
import React434, { useState as useState249, useEffect as useEffect186, useCallback as useCallback198 } from "react";
|
|
48817
|
-
import { Stack as Stack308, Group as
|
|
49083
|
+
import { Stack as Stack308, Group as Group165, Button as Button105, ActionIcon as ActionIcon54, Text as Text291, Box as Box76 } from "@mantine/core";
|
|
48818
49084
|
import { IconPlus as IconPlus12, IconTrash as IconTrash14 } from "@tabler/icons-react";
|
|
48819
49085
|
var SYSTEM_KEYS = /* @__PURE__ */ new Set(["@context", "_type", "schema_version", "doc_id", "title", "createdAt", "createdBy", "flowOwnerDid"]);
|
|
48820
49086
|
var FlowSettingsPanel = ({ editor }) => {
|
|
@@ -48881,7 +49147,7 @@ var FlowSettingsPanel = ({ editor }) => {
|
|
|
48881
49147
|
[editor]
|
|
48882
49148
|
);
|
|
48883
49149
|
const subtitle = /* @__PURE__ */ React434.createElement(Box76, { px: 40, mb: "md" }, /* @__PURE__ */ React434.createElement(Text291, { size: "sm", c: "dimmed" }, "Add key-value settings for this flow. These are available to oracles and action blocks at runtime."));
|
|
48884
|
-
return /* @__PURE__ */ React434.createElement(BaseRightPanelLayout, { title: "Flow Details", onClose: closePanel, isTemplate: true, captionContent: subtitle }, /* @__PURE__ */ React434.createElement(Stack308, { gap: "lg" }, rows.map((row, index) => /* @__PURE__ */ React434.createElement(Stack308, { key: index, gap: "xs" }, /* @__PURE__ */ React434.createElement(
|
|
49150
|
+
return /* @__PURE__ */ React434.createElement(BaseRightPanelLayout, { title: "Flow Details", onClose: closePanel, isTemplate: true, captionContent: subtitle }, /* @__PURE__ */ React434.createElement(Stack308, { gap: "lg" }, rows.map((row, index) => /* @__PURE__ */ React434.createElement(Stack308, { key: index, gap: "xs" }, /* @__PURE__ */ React434.createElement(Group165, { gap: "xs", align: "center", wrap: "nowrap" }, /* @__PURE__ */ React434.createElement(BaseTextInput, { placeholder: "Key (e.g. protocolDid)", value: row.key, onChange: (e) => handleKeyChange(index, e.currentTarget.value), style: { flex: 1 } }), /* @__PURE__ */ React434.createElement(ActionIcon54, { variant: "subtle", color: "red", onClick: () => handleDelete(index), size: "lg" }, /* @__PURE__ */ React434.createElement(IconTrash14, { size: 16 }))), /* @__PURE__ */ React434.createElement(BaseTextArea, { placeholder: "Value", value: row.value, onChange: (e) => handleValueChange(index, e.currentTarget.value), minRows: 1, maxRows: 8 }))), /* @__PURE__ */ React434.createElement(Button105, { variant: "subtle", leftSection: /* @__PURE__ */ React434.createElement(IconPlus12, { size: 16 }), onClick: handleAdd, size: "sm" }, "Add detail")));
|
|
48885
49151
|
};
|
|
48886
49152
|
|
|
48887
49153
|
// src/mantine/components/CoverImage.tsx
|
|
@@ -49033,7 +49299,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
49033
49299
|
}
|
|
49034
49300
|
)
|
|
49035
49301
|
)
|
|
49036
|
-
), editable && (isHovering || opened) && /* @__PURE__ */ React435.createElement(
|
|
49302
|
+
), editable && (isHovering || opened) && /* @__PURE__ */ React435.createElement(Group166, { gap: 4, style: { position: "absolute", bottom: hasLogo ? -18 : 0, left: 0, zIndex: 10 } }, !logoSrc && /* @__PURE__ */ React435.createElement(
|
|
49037
49303
|
BaseIconPicker,
|
|
49038
49304
|
{
|
|
49039
49305
|
opened,
|
|
@@ -49093,7 +49359,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
49093
49359
|
}
|
|
49094
49360
|
),
|
|
49095
49361
|
editable && isHovering && /* @__PURE__ */ React435.createElement(
|
|
49096
|
-
|
|
49362
|
+
Group166,
|
|
49097
49363
|
{
|
|
49098
49364
|
gap: "xs",
|
|
49099
49365
|
style: {
|
|
@@ -50282,7 +50548,7 @@ function IxoEditor({
|
|
|
50282
50548
|
|
|
50283
50549
|
// src/mantine/components/DevUcanGrantButton.tsx
|
|
50284
50550
|
import React441, { useEffect as useEffect192, useMemo as useMemo180, useState as useState254 } from "react";
|
|
50285
|
-
import { Alert as Alert115, Badge as Badge63, Button as Button106, Checkbox as Checkbox16, Divider as Divider44, Group as
|
|
50551
|
+
import { Alert as Alert115, Badge as Badge63, Button as Button106, Checkbox as Checkbox16, Divider as Divider44, Group as Group167, Loader as Loader101, Modal as Modal4, Paper as Paper27, Select as Select11, Stack as Stack310, Text as Text293 } from "@mantine/core";
|
|
50286
50552
|
import { IconKey as IconKey7, IconShieldPlus as IconShieldPlus4 } from "@tabler/icons-react";
|
|
50287
50553
|
var FLOW_AGENT_COMMAND_TYPES = [
|
|
50288
50554
|
"diagnose_blocker",
|
|
@@ -50547,7 +50813,7 @@ function DevUcanGrantButton({ editor, handlers: propHandlers }) {
|
|
|
50547
50813
|
disabled: loadingMembers || signing,
|
|
50548
50814
|
rightSection: loadingMembers ? /* @__PURE__ */ React441.createElement(Loader101, { size: 14 }) : null
|
|
50549
50815
|
}
|
|
50550
|
-
), /* @__PURE__ */ React441.createElement(Divider44, null), /* @__PURE__ */ React441.createElement(Stack310, { gap: "xs" }, /* @__PURE__ */ React441.createElement(
|
|
50816
|
+
), /* @__PURE__ */ React441.createElement(Divider44, null), /* @__PURE__ */ React441.createElement(Stack310, { gap: "xs" }, /* @__PURE__ */ React441.createElement(Group167, { justify: "space-between" }, /* @__PURE__ */ React441.createElement(Text293, { size: "sm", fw: 600 }, "UCAN capabilities"), /* @__PURE__ */ React441.createElement(Group167, { gap: "xs" }, /* @__PURE__ */ React441.createElement(Button106, { size: "compact-xs", variant: "subtle", onClick: () => setSelectedCapabilities(capabilityOptions.map((option) => option.id)) }, "All"), /* @__PURE__ */ React441.createElement(Button106, { size: "compact-xs", variant: "subtle", onClick: () => setSelectedCapabilities([]) }, "None"))), /* @__PURE__ */ React441.createElement(Paper27, { withBorder: true, p: "sm", style: { maxHeight: 360, overflow: "auto" } }, /* @__PURE__ */ React441.createElement(Stack310, { gap: "xs" }, capabilityOptions.map((option) => /* @__PURE__ */ React441.createElement(
|
|
50551
50817
|
Checkbox16,
|
|
50552
50818
|
{
|
|
50553
50819
|
key: option.id,
|
|
@@ -50555,15 +50821,15 @@ function DevUcanGrantButton({ editor, handlers: propHandlers }) {
|
|
|
50555
50821
|
onChange: (event) => {
|
|
50556
50822
|
setSelectedCapabilities((current) => event.currentTarget.checked ? [...current, option.id] : current.filter((id) => id !== option.id));
|
|
50557
50823
|
},
|
|
50558
|
-
label: /* @__PURE__ */ React441.createElement(
|
|
50824
|
+
label: /* @__PURE__ */ React441.createElement(Group167, { gap: "xs" }, /* @__PURE__ */ React441.createElement(Text293, { size: "sm" }, option.label), /* @__PURE__ */ React441.createElement(Badge63, { size: "xs", variant: "light" }, option.capability.can)),
|
|
50559
50825
|
description: `${option.description} on ${option.capability.with}`
|
|
50560
50826
|
}
|
|
50561
|
-
))))), message && /* @__PURE__ */ React441.createElement(Alert115, { color: message.color }, message.text), /* @__PURE__ */ React441.createElement(
|
|
50827
|
+
))))), message && /* @__PURE__ */ React441.createElement(Alert115, { color: message.color }, message.text), /* @__PURE__ */ React441.createElement(Group167, { justify: "flex-end" }, /* @__PURE__ */ React441.createElement(Button106, { variant: "subtle", onClick: () => setOpened(false), disabled: signing }, "Close"), /* @__PURE__ */ React441.createElement(Button106, { variant: "light", color: "gray", onClick: logAvailableHandlers, disabled: signing }, "Log handlers"), /* @__PURE__ */ React441.createElement(Button106, { leftSection: /* @__PURE__ */ React441.createElement(IconShieldPlus4, { size: 16 }), onClick: handleSign, loading: signing, disabled: !hasSigningHandler }, "Sign UCAN")))));
|
|
50562
50828
|
}
|
|
50563
50829
|
|
|
50564
50830
|
// src/mantine/components/EntitySigningSetup.tsx
|
|
50565
50831
|
import React442, { useState as useState255 } from "react";
|
|
50566
|
-
import { Modal as Modal5, Stack as Stack311, Text as Text294, TextInput as TextInput12, Button as Button107, Alert as Alert116, Group as
|
|
50832
|
+
import { Modal as Modal5, Stack as Stack311, Text as Text294, TextInput as TextInput12, Button as Button107, Alert as Alert116, Group as Group168 } from "@mantine/core";
|
|
50567
50833
|
import { IconAlertCircle as IconAlertCircle53, IconCheck as IconCheck54, IconKey as IconKey8 } from "@tabler/icons-react";
|
|
50568
50834
|
var EntitySigningSetup = ({ opened, onClose, entityDid, entityName, onSetup }) => {
|
|
50569
50835
|
const [pin, setPin] = useState255("");
|
|
@@ -50615,7 +50881,7 @@ var EntitySigningSetup = ({ opened, onClose, entityDid, entityName, onSetup }) =
|
|
|
50615
50881
|
{
|
|
50616
50882
|
opened,
|
|
50617
50883
|
onClose: handleClose,
|
|
50618
|
-
title: /* @__PURE__ */ React442.createElement(
|
|
50884
|
+
title: /* @__PURE__ */ React442.createElement(Group168, { gap: "xs" }, /* @__PURE__ */ React442.createElement(IconKey8, { size: 20 }), /* @__PURE__ */ React442.createElement(Text294, { fw: 600 }, "Entity Signing Setup")),
|
|
50619
50885
|
size: "md"
|
|
50620
50886
|
},
|
|
50621
50887
|
/* @__PURE__ */ React442.createElement(Stack311, { gap: "md" }, success ? /* @__PURE__ */ React442.createElement(Alert116, { color: "green", icon: /* @__PURE__ */ React442.createElement(IconCheck54, { size: 16 }) }, "Entity signing key set up successfully!") : /* @__PURE__ */ React442.createElement(React442.Fragment, null, /* @__PURE__ */ React442.createElement(Text294, { size: "sm", c: "dimmed" }, "Flow authorization requires a signing key for", " ", /* @__PURE__ */ React442.createElement(Text294, { span: true, fw: 500 }, entityName || entityDid), "."), /* @__PURE__ */ React442.createElement(Alert116, { color: "blue", variant: "light" }, /* @__PURE__ */ React442.createElement(Text294, { size: "sm" }, "This is a ", /* @__PURE__ */ React442.createElement("strong", null, "one-time setup"), " that allows flows to grant permissions without requiring wallet signatures for each delegation.")), /* @__PURE__ */ React442.createElement(Stack311, { gap: "xs" }, /* @__PURE__ */ React442.createElement(Text294, { size: "sm", fw: 500 }, "What happens:"), /* @__PURE__ */ React442.createElement(Text294, { size: "sm", c: "dimmed" }, "1. A new signing key is generated"), /* @__PURE__ */ React442.createElement(Text294, { size: "sm", c: "dimmed" }, "2. Key is registered on the entity's DID document (requires wallet)"), /* @__PURE__ */ React442.createElement(Text294, { size: "sm", c: "dimmed" }, "3. Key is stored encrypted in the entity's Matrix room")), /* @__PURE__ */ React442.createElement(
|
|
@@ -50629,13 +50895,13 @@ var EntitySigningSetup = ({ opened, onClose, entityDid, entityName, onSetup }) =
|
|
|
50629
50895
|
onChange: (e) => setPin(e.currentTarget.value),
|
|
50630
50896
|
disabled: loading
|
|
50631
50897
|
}
|
|
50632
|
-
), /* @__PURE__ */ React442.createElement(TextInput12, { label: "Confirm PIN", type: "password", placeholder: "Confirm PIN", value: confirmPin, onChange: (e) => setConfirmPin(e.currentTarget.value), disabled: loading }), error && /* @__PURE__ */ React442.createElement(Alert116, { color: "red", icon: /* @__PURE__ */ React442.createElement(IconAlertCircle53, { size: 16 }) }, error), /* @__PURE__ */ React442.createElement(
|
|
50898
|
+
), /* @__PURE__ */ React442.createElement(TextInput12, { label: "Confirm PIN", type: "password", placeholder: "Confirm PIN", value: confirmPin, onChange: (e) => setConfirmPin(e.currentTarget.value), disabled: loading }), error && /* @__PURE__ */ React442.createElement(Alert116, { color: "red", icon: /* @__PURE__ */ React442.createElement(IconAlertCircle53, { size: 16 }) }, error), /* @__PURE__ */ React442.createElement(Group168, { justify: "flex-end", mt: "md" }, /* @__PURE__ */ React442.createElement(Button107, { variant: "subtle", onClick: handleClose, disabled: loading }, "Cancel"), /* @__PURE__ */ React442.createElement(Button107, { onClick: handleSetup, loading, leftSection: /* @__PURE__ */ React442.createElement(IconKey8, { size: 16 }) }, "Setup Entity Signing"))))
|
|
50633
50899
|
);
|
|
50634
50900
|
};
|
|
50635
50901
|
|
|
50636
50902
|
// src/mantine/components/FlowPermissionsPanel.tsx
|
|
50637
50903
|
import React443, { useState as useState256, useEffect as useEffect193, useMemo as useMemo181 } from "react";
|
|
50638
|
-
import { Stack as Stack312, Text as Text295, Paper as Paper28, Group as
|
|
50904
|
+
import { Stack as Stack312, Text as Text295, Paper as Paper28, Group as Group169, Badge as Badge64, Button as Button108, ActionIcon as ActionIcon55, Loader as Loader102, Alert as Alert117, Divider as Divider45 } from "@mantine/core";
|
|
50639
50905
|
import { IconPlus as IconPlus13, IconTrash as IconTrash16, IconShieldCheck as IconShieldCheck19, IconUser as IconUser15, IconRobot as IconRobot5, IconBuilding as IconBuilding2 } from "@tabler/icons-react";
|
|
50640
50906
|
var FlowPermissionsPanel = ({ editor, entityDid, entityName, onGrantPermission, onRevokePermission, getUserDisplayName }) => {
|
|
50641
50907
|
const [delegations, setDelegations] = useState256([]);
|
|
@@ -50717,12 +50983,12 @@ var FlowPermissionsPanel = ({ editor, entityDid, entityName, onGrantPermission,
|
|
|
50717
50983
|
if (date < /* @__PURE__ */ new Date()) return "Expired";
|
|
50718
50984
|
return date.toLocaleDateString();
|
|
50719
50985
|
};
|
|
50720
|
-
return /* @__PURE__ */ React443.createElement(Stack312, { gap: "md" }, /* @__PURE__ */ React443.createElement(Stack312, { gap: "xs" }, /* @__PURE__ */ React443.createElement(Text295, { fw: 600, size: "sm" }, "Root Authority"), /* @__PURE__ */ React443.createElement(Paper28, { p: "sm", withBorder: true }, /* @__PURE__ */ React443.createElement(
|
|
50986
|
+
return /* @__PURE__ */ React443.createElement(Stack312, { gap: "md" }, /* @__PURE__ */ React443.createElement(Stack312, { gap: "xs" }, /* @__PURE__ */ React443.createElement(Text295, { fw: 600, size: "sm" }, "Root Authority"), /* @__PURE__ */ React443.createElement(Paper28, { p: "sm", withBorder: true }, /* @__PURE__ */ React443.createElement(Group169, { gap: "xs" }, /* @__PURE__ */ React443.createElement(IconShieldCheck19, { size: 20, color: "var(--mantine-color-green-6)" }), /* @__PURE__ */ React443.createElement(Stack312, { gap: 2, style: { flex: 1 } }, /* @__PURE__ */ React443.createElement(Text295, { size: "sm", fw: 500 }, entityName || entityDid), /* @__PURE__ */ React443.createElement(Text295, { size: "xs", c: "dimmed" }, rootDelegation ? `Granted: ${new Date(rootDelegation.createdAt).toLocaleDateString()}` : "Root capability not set up")), /* @__PURE__ */ React443.createElement(Badge64, { color: "green", variant: "light" }, "Entity")))), /* @__PURE__ */ React443.createElement(Divider45, { label: "Flow Permissions", labelPosition: "center" }), loading ? /* @__PURE__ */ React443.createElement(Group169, { justify: "center", py: "xl" }, /* @__PURE__ */ React443.createElement(Loader102, { size: "sm" })) : flowDelegations.length === 0 ? /* @__PURE__ */ React443.createElement(Alert117, { color: "gray", variant: "light" }, /* @__PURE__ */ React443.createElement(Text295, { size: "sm" }, "No flow permissions have been granted yet.")) : /* @__PURE__ */ React443.createElement(Stack312, { gap: "xs" }, flowDelegations.map(({ delegation, displayName, type }) => /* @__PURE__ */ React443.createElement(Paper28, { key: delegation.cid, p: "sm", withBorder: true }, /* @__PURE__ */ React443.createElement(Group169, { justify: "space-between" }, /* @__PURE__ */ React443.createElement(Group169, { gap: "xs" }, getIcon2(type), /* @__PURE__ */ React443.createElement(Stack312, { gap: 2 }, /* @__PURE__ */ React443.createElement(Text295, { size: "sm", fw: 500 }, displayName), /* @__PURE__ */ React443.createElement(Text295, { size: "xs", c: "dimmed" }, formatCapabilities(delegation.capabilities)), /* @__PURE__ */ React443.createElement(Group169, { gap: "xs" }, /* @__PURE__ */ React443.createElement(Text295, { size: "xs", c: "dimmed" }, "Expires: ", formatExpiration(delegation.expiration)), /* @__PURE__ */ React443.createElement(Text295, { size: "xs", c: "dimmed" }, "\u2022"), /* @__PURE__ */ React443.createElement(Text295, { size: "xs", c: "dimmed" }, "Granted by: ", delegation.issuerDid === entityDid ? "Entity" : delegation.issuerDid.slice(-8))))), /* @__PURE__ */ React443.createElement(ActionIcon55, { color: "red", variant: "subtle", onClick: () => handleRevoke(delegation.cid), loading: revoking === delegation.cid, disabled: !!revoking }, /* @__PURE__ */ React443.createElement(IconTrash16, { size: 16 })))))), /* @__PURE__ */ React443.createElement(Divider45, { label: "Custom Capabilities", labelPosition: "center" }), !loading && customDelegations.length === 0 ? /* @__PURE__ */ React443.createElement(Alert117, { color: "gray", variant: "light" }, /* @__PURE__ */ React443.createElement(Text295, { size: "sm" }, "No custom capabilities have been created yet.")) : /* @__PURE__ */ React443.createElement(Stack312, { gap: "xs" }, customDelegations.map(({ delegation, displayName, type }) => /* @__PURE__ */ React443.createElement(Paper28, { key: delegation.cid, p: "sm", withBorder: true, style: { borderColor: "var(--mantine-color-violet-4)" } }, /* @__PURE__ */ React443.createElement(Group169, { justify: "space-between" }, /* @__PURE__ */ React443.createElement(Group169, { gap: "xs" }, getIcon2(type), /* @__PURE__ */ React443.createElement(Stack312, { gap: 2 }, /* @__PURE__ */ React443.createElement(Group169, { gap: "xs" }, /* @__PURE__ */ React443.createElement(Text295, { size: "sm", fw: 500 }, displayName), /* @__PURE__ */ React443.createElement(Badge64, { size: "xs", variant: "light", color: "violet" }, "custom")), /* @__PURE__ */ React443.createElement(Text295, { size: "xs", c: "dimmed" }, formatCapabilities(delegation.capabilities)), /* @__PURE__ */ React443.createElement(Group169, { gap: "xs" }, /* @__PURE__ */ React443.createElement(Text295, { size: "xs", c: "dimmed" }, "Expires: ", formatExpiration(delegation.expiration)), /* @__PURE__ */ React443.createElement(Text295, { size: "xs", c: "dimmed" }, "\u2022"), /* @__PURE__ */ React443.createElement(Text295, { size: "xs", c: "dimmed" }, "Issued by: ", delegation.issuerDid.slice(-12))))), /* @__PURE__ */ React443.createElement(ActionIcon55, { color: "red", variant: "subtle", onClick: () => handleRevoke(delegation.cid), loading: revoking === delegation.cid, disabled: !!revoking }, /* @__PURE__ */ React443.createElement(IconTrash16, { size: 16 })))))), /* @__PURE__ */ React443.createElement(Button108, { leftSection: /* @__PURE__ */ React443.createElement(IconPlus13, { size: 16 }), variant: "light", onClick: onGrantPermission }, "Grant Permission"));
|
|
50721
50987
|
};
|
|
50722
50988
|
|
|
50723
50989
|
// src/mantine/components/GrantPermissionModal.tsx
|
|
50724
50990
|
import React444, { useState as useState257, useCallback as useCallback202 } from "react";
|
|
50725
|
-
import { Modal as Modal6, Stack as Stack313, Text as Text296, TextInput as TextInput13, Button as Button109, Group as
|
|
50991
|
+
import { Modal as Modal6, Stack as Stack313, Text as Text296, TextInput as TextInput13, Button as Button109, Group as Group170, Radio as Radio7, Checkbox as Checkbox17, Alert as Alert118, Paper as Paper29, Loader as Loader103, Badge as Badge65, ActionIcon as ActionIcon56, Divider as Divider46, NumberInput as NumberInput16 } from "@mantine/core";
|
|
50726
50992
|
import { IconSearch as IconSearch12, IconUser as IconUser16, IconRobot as IconRobot6, IconX as IconX23, IconShieldPlus as IconShieldPlus5 } from "@tabler/icons-react";
|
|
50727
50993
|
var GrantPermissionModal = ({ opened, onClose, flowUri, blocks, targetBlockId, searchUsers, getOracles, onGrant }) => {
|
|
50728
50994
|
const singleBlockMode = !!targetBlockId || blocks.length === 1;
|
|
@@ -50834,7 +51100,7 @@ var GrantPermissionModal = ({ opened, onClose, flowUri, blocks, targetBlockId, s
|
|
|
50834
51100
|
{
|
|
50835
51101
|
opened,
|
|
50836
51102
|
onClose: handleClose,
|
|
50837
|
-
title: /* @__PURE__ */ React444.createElement(
|
|
51103
|
+
title: /* @__PURE__ */ React444.createElement(Group170, { gap: "xs" }, /* @__PURE__ */ React444.createElement(IconShieldPlus5, { size: 20 }), /* @__PURE__ */ React444.createElement(Text296, { fw: 600 }, "Grant Permission")),
|
|
50838
51104
|
size: "lg"
|
|
50839
51105
|
},
|
|
50840
51106
|
/* @__PURE__ */ React444.createElement(Stack313, { gap: "md" }, /* @__PURE__ */ React444.createElement(Stack313, { gap: "xs" }, /* @__PURE__ */ React444.createElement(Text296, { size: "sm", fw: 500 }, "Recipient Type"), /* @__PURE__ */ React444.createElement(
|
|
@@ -50847,7 +51113,7 @@ var GrantPermissionModal = ({ opened, onClose, flowUri, blocks, targetBlockId, s
|
|
|
50847
51113
|
setSearchResults([]);
|
|
50848
51114
|
}
|
|
50849
51115
|
},
|
|
50850
|
-
/* @__PURE__ */ React444.createElement(
|
|
51116
|
+
/* @__PURE__ */ React444.createElement(Group170, null, /* @__PURE__ */ React444.createElement(Radio7, { value: "user", label: "User" }), /* @__PURE__ */ React444.createElement(Radio7, { value: "oracle", label: "Oracle" }), /* @__PURE__ */ React444.createElement(Radio7, { value: "manual", label: "Enter DID" }))
|
|
50851
51117
|
)), recipientType !== "manual" ? /* @__PURE__ */ React444.createElement(Stack313, { gap: "xs" }, /* @__PURE__ */ React444.createElement(
|
|
50852
51118
|
TextInput13,
|
|
50853
51119
|
{
|
|
@@ -50858,9 +51124,9 @@ var GrantPermissionModal = ({ opened, onClose, flowUri, blocks, targetBlockId, s
|
|
|
50858
51124
|
onChange: (e) => setSearchQuery(e.currentTarget.value),
|
|
50859
51125
|
onKeyDown: (e) => e.key === "Enter" && handleSearch()
|
|
50860
51126
|
}
|
|
50861
|
-
), selectedRecipient ? /* @__PURE__ */ React444.createElement(Paper29, { p: "sm", withBorder: true }, /* @__PURE__ */ React444.createElement(
|
|
51127
|
+
), selectedRecipient ? /* @__PURE__ */ React444.createElement(Paper29, { p: "sm", withBorder: true }, /* @__PURE__ */ React444.createElement(Group170, { justify: "space-between" }, /* @__PURE__ */ React444.createElement(Group170, { gap: "xs" }, recipientType === "oracle" ? /* @__PURE__ */ React444.createElement(IconRobot6, { size: 16 }) : /* @__PURE__ */ React444.createElement(IconUser16, { size: 16 }), /* @__PURE__ */ React444.createElement(Text296, { size: "sm" }, selectedRecipient.displayName), /* @__PURE__ */ React444.createElement(Badge65, { size: "xs", variant: "light" }, selectedRecipient.did.slice(-12))), /* @__PURE__ */ React444.createElement(ActionIcon56, { size: "sm", variant: "subtle", onClick: () => setSelectedRecipient(null) }, /* @__PURE__ */ React444.createElement(IconX23, { size: 14 })))) : searchResults.length > 0 ? /* @__PURE__ */ React444.createElement(Paper29, { p: "xs", withBorder: true, style: { maxHeight: 150, overflow: "auto" } }, /* @__PURE__ */ React444.createElement(Stack313, { gap: 4 }, searchResults.map((result) => /* @__PURE__ */ React444.createElement(Button109, { key: result.did, variant: "subtle", size: "sm", justify: "flex-start", onClick: () => setSelectedRecipient(result) }, result.displayName)))) : null) : /* @__PURE__ */ React444.createElement(TextInput13, { label: "Recipient DID", placeholder: "did:ixo:...", value: manualDid, onChange: (e) => setManualDid(e.currentTarget.value) }), /* @__PURE__ */ React444.createElement(Divider46, null), /* @__PURE__ */ React444.createElement(Stack313, { gap: "xs" }, /* @__PURE__ */ React444.createElement(Text296, { size: "sm", fw: 500 }, "Permission Scope"), singleBlockMode && fixedBlock ? (
|
|
50862
51128
|
// Single block mode: show fixed block info
|
|
50863
|
-
/* @__PURE__ */ React444.createElement(Paper29, { p: "sm", withBorder: true }, /* @__PURE__ */ React444.createElement(
|
|
51129
|
+
/* @__PURE__ */ React444.createElement(Paper29, { p: "sm", withBorder: true }, /* @__PURE__ */ React444.createElement(Group170, { gap: "xs" }, /* @__PURE__ */ React444.createElement(Badge65, { variant: "light", color: "blue" }, fixedBlock.type), /* @__PURE__ */ React444.createElement(Text296, { size: "sm" }, fixedBlock.name || `Block ${fixedBlock.id.slice(-8)}`)), /* @__PURE__ */ React444.createElement(Text296, { size: "xs", c: "dimmed", mt: "xs" }, "Permission will be granted to execute this specific block."))
|
|
50864
51130
|
) : (
|
|
50865
51131
|
// Multi-block mode: show scope selection
|
|
50866
51132
|
/* @__PURE__ */ React444.createElement(React444.Fragment, null, /* @__PURE__ */ React444.createElement(Radio7.Group, { value: scopeType, onChange: (v) => setScopeType(v) }, /* @__PURE__ */ React444.createElement(Stack313, { gap: "xs" }, /* @__PURE__ */ React444.createElement(Radio7, { value: "full", label: "Full flow access (can execute any block)" }), /* @__PURE__ */ React444.createElement(Radio7, { value: "blocks", label: "Specific blocks only" }))), scopeType === "blocks" && /* @__PURE__ */ React444.createElement(Paper29, { p: "sm", withBorder: true, style: { maxHeight: 150, overflow: "auto" } }, /* @__PURE__ */ React444.createElement(Stack313, { gap: "xs" }, blocks.map((block) => /* @__PURE__ */ React444.createElement(
|
|
@@ -50886,7 +51152,7 @@ var GrantPermissionModal = ({ opened, onClose, flowUri, blocks, targetBlockId, s
|
|
|
50886
51152
|
checked: canDelegate,
|
|
50887
51153
|
onChange: (e) => setCanDelegate(e.currentTarget.checked)
|
|
50888
51154
|
}
|
|
50889
|
-
), /* @__PURE__ */ React444.createElement(Divider46, null), /* @__PURE__ */ React444.createElement(TextInput13, { label: "Enter your PIN to sign this delegation", type: "password", placeholder: "PIN", value: pin, onChange: (e) => setPin(e.currentTarget.value) }), error && /* @__PURE__ */ React444.createElement(Alert118, { color: "red" }, error), /* @__PURE__ */ React444.createElement(
|
|
51155
|
+
), /* @__PURE__ */ React444.createElement(Divider46, null), /* @__PURE__ */ React444.createElement(TextInput13, { label: "Enter your PIN to sign this delegation", type: "password", placeholder: "PIN", value: pin, onChange: (e) => setPin(e.currentTarget.value) }), error && /* @__PURE__ */ React444.createElement(Alert118, { color: "red" }, error), /* @__PURE__ */ React444.createElement(Group170, { justify: "flex-end" }, /* @__PURE__ */ React444.createElement(Button109, { variant: "subtle", onClick: handleClose, disabled: loading }, "Cancel"), /* @__PURE__ */ React444.createElement(Button109, { onClick: handleGrant, loading }, "Grant Permission")))
|
|
50890
51156
|
);
|
|
50891
51157
|
};
|
|
50892
51158
|
|
|
@@ -51036,4 +51302,4 @@ export {
|
|
|
51036
51302
|
ixoGraphQLClient,
|
|
51037
51303
|
getEntity
|
|
51038
51304
|
};
|
|
51039
|
-
//# sourceMappingURL=chunk-
|
|
51305
|
+
//# sourceMappingURL=chunk-ZE2EEZH6.js.map
|