@ixo/editor 5.18.0 → 5.19.1
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.
|
@@ -2483,54 +2483,78 @@ function BaseRightPanelLayout({ title, isTemplate: _isTemplate = true, captionCo
|
|
|
2483
2483
|
}
|
|
2484
2484
|
}, [context?.block.props.skill]);
|
|
2485
2485
|
const tabState = useTabState(allTabs);
|
|
2486
|
-
return
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
setMaximized(false);
|
|
2486
|
+
return (
|
|
2487
|
+
// pos:absolute + inset:0 gives the Stack a definite size from its
|
|
2488
|
+
// positioned parent (AppShell.Aside). `h="100%"` doesn't reliably
|
|
2489
|
+
// resolve through the aside's overflow:auto + CSS-variable height, so
|
|
2490
|
+
// the inner flex:1 scroll container never constrains and the scroll
|
|
2491
|
+
// bubbles up to the AppShell.
|
|
2492
|
+
/* @__PURE__ */ React19.createElement(
|
|
2493
|
+
Stack10,
|
|
2494
|
+
{
|
|
2495
|
+
py: "md",
|
|
2496
|
+
style: {
|
|
2497
|
+
position: "absolute",
|
|
2498
|
+
inset: 0,
|
|
2499
|
+
overflow: "hidden"
|
|
2500
|
+
}
|
|
2502
2501
|
},
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
px: 40,
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2502
|
+
/* @__PURE__ */ React19.createElement(Flex2, { align: "center", px: "md", justify: "space-between", gap: "md" }, title ? /* @__PURE__ */ React19.createElement(Text8, { fz: 16, fw: 400, truncate: "end", style: { flex: 1, minWidth: 0 } }, title) : /* @__PURE__ */ React19.createElement(Box2, { style: { flex: 1 } }), /* @__PURE__ */ React19.createElement(Flex2, { align: "center", gap: "5px" }, /* @__PURE__ */ React19.createElement(
|
|
2503
|
+
PanelOptionsPopover,
|
|
2504
|
+
{
|
|
2505
|
+
isMaximized,
|
|
2506
|
+
onToggleMaximize: () => setMaximized(!isMaximized),
|
|
2507
|
+
context,
|
|
2508
|
+
isTemplate: _isTemplate,
|
|
2509
|
+
onSelectTab: tabState.setActiveTab,
|
|
2510
|
+
isMobile
|
|
2511
|
+
}
|
|
2512
|
+
), /* @__PURE__ */ React19.createElement(
|
|
2513
|
+
ActionIcon3,
|
|
2514
|
+
{
|
|
2515
|
+
onClick: () => {
|
|
2516
|
+
onClose();
|
|
2517
|
+
setMaximized(false);
|
|
2518
|
+
},
|
|
2519
|
+
variant: "secondary",
|
|
2520
|
+
"aria-label": "Close panel"
|
|
2521
|
+
},
|
|
2522
|
+
/* @__PURE__ */ React19.createElement(IconX2, { size: 18 })
|
|
2523
|
+
))),
|
|
2524
|
+
allTabs.length > 0 && /* @__PURE__ */ React19.createElement(Box2, { px: 40 }, /* @__PURE__ */ React19.createElement(TabsSelection, { tabs: allTabs, activeTab: tabState.activeTab, onTabChange: tabState.setActiveTab, defaultValue: tabState.defaultValue })),
|
|
2525
|
+
selectedSkill && selectedSkill?.name && /* @__PURE__ */ React19.createElement(
|
|
2526
|
+
Flex2,
|
|
2527
|
+
{
|
|
2528
|
+
mx: 40,
|
|
2529
|
+
style: { borderRadius: 16, cursor: "pointer" },
|
|
2530
|
+
mb: 12,
|
|
2531
|
+
py: "sm",
|
|
2532
|
+
px: "lg",
|
|
2533
|
+
onClick: () => askCompanion(`Use the skill. Skill name: ${selectedSkill.name}. Skill CID: ${selectedSkill.cid}.`),
|
|
2534
|
+
bg: "color-mix(in srgb, var(--mantine-color-accent-5) 20%, transparent)",
|
|
2535
|
+
align: "center",
|
|
2536
|
+
gap: "lg"
|
|
2537
|
+
},
|
|
2538
|
+
icon(IconWand, 20, "var(--mantine-color-accent-5)"),
|
|
2539
|
+
/* @__PURE__ */ React19.createElement(Stack10, { gap: 0 }, /* @__PURE__ */ React19.createElement(Text8, null, "Agent Skill available"), /* @__PURE__ */ React19.createElement(Text8, { fz: 14, c: "dimmed" }, "Let AI help you with this step"))
|
|
2540
|
+
),
|
|
2541
|
+
captionContent,
|
|
2542
|
+
/* @__PURE__ */ React19.createElement(
|
|
2543
|
+
Box2,
|
|
2544
|
+
{
|
|
2545
|
+
px: 40,
|
|
2546
|
+
className: "ixo-hide-scrollbar",
|
|
2547
|
+
style: {
|
|
2548
|
+
flex: 1,
|
|
2549
|
+
minHeight: 0,
|
|
2550
|
+
position: "relative",
|
|
2551
|
+
overflow: "auto"
|
|
2552
|
+
}
|
|
2553
|
+
},
|
|
2554
|
+
allTabs.length > 0 ? tabState.activeTabContent : children
|
|
2555
|
+
)
|
|
2556
|
+
)
|
|
2557
|
+
);
|
|
2534
2558
|
}
|
|
2535
2559
|
|
|
2536
2560
|
// src/mantine/components/AuthorizationTab.tsx
|
|
@@ -4679,7 +4703,7 @@ var ListTemplateView = ({ editor, block }) => {
|
|
|
4679
4703
|
};
|
|
4680
4704
|
|
|
4681
4705
|
// src/mantine/blocks/list/flow/ListFlowView.tsx
|
|
4682
|
-
import React93, { useState as useState42, useEffect as
|
|
4706
|
+
import React93, { useState as useState42, useEffect as useEffect38, useMemo as useMemo43, useCallback as useCallback35, useRef as useRef13 } from "react";
|
|
4683
4707
|
import { Stack as Stack63, Text as Text64, ActionIcon as ActionIcon16, Loader as Loader18, Center as Center9, Flex as Flex27, Title as Title5, Collapse as Collapse2, Tooltip as Tooltip9 } from "@mantine/core";
|
|
4684
4708
|
|
|
4685
4709
|
// src/mantine/blocks/list/linked_resources/ResourcesList.tsx
|
|
@@ -5225,7 +5249,7 @@ var DeedSubscriptionsList = ({ items, isMultiSelect: _isMultiSelect, isItemCheck
|
|
|
5225
5249
|
};
|
|
5226
5250
|
|
|
5227
5251
|
// src/mantine/blocks/list/ListSelectionPanel.tsx
|
|
5228
|
-
import React88, { useState as useState39, useEffect as
|
|
5252
|
+
import React88, { useState as useState39, useEffect as useEffect36, useMemo as useMemo41 } from "react";
|
|
5229
5253
|
import { Stack as Stack59, Alert as Alert16, Text as Text59, Loader as Loader17, Center as Center8, Space } from "@mantine/core";
|
|
5230
5254
|
import { IconClipboardText, IconChecklist as IconChecklist4, IconFileDescription as IconFileDescription2 } from "@tabler/icons-react";
|
|
5231
5255
|
|
|
@@ -5514,7 +5538,7 @@ var ClaimsListPanelContent = ({ collectionId, deedId, claim }) => {
|
|
|
5514
5538
|
};
|
|
5515
5539
|
|
|
5516
5540
|
// src/mantine/blocks/list/claims/ClaimsEvaluation.tsx
|
|
5517
|
-
import React87, { useCallback as useCallback34, useEffect as
|
|
5541
|
+
import React87, { useCallback as useCallback34, useEffect as useEffect35, useMemo as useMemo40, useRef as useRef12, useState as useState38 } from "react";
|
|
5518
5542
|
import { Alert as Alert15, Badge as Badge11, Box as Box24, Button as Button13, Card as Card5, Divider as Divider7, Group as Group28, Loader as Loader16, Stack as Stack58, Text as Text58 } from "@mantine/core";
|
|
5519
5543
|
|
|
5520
5544
|
// src/mantine/blocks/evaluator/EvaluatorBlock.tsx
|
|
@@ -6421,8 +6445,214 @@ import React67, { useMemo as useMemo25 } from "react";
|
|
|
6421
6445
|
import { Stack as Stack42, Text as Text41, Group as Group16 } from "@mantine/core";
|
|
6422
6446
|
|
|
6423
6447
|
// src/mantine/blocks/claim/flow/ClaimsListSheet.tsx
|
|
6424
|
-
import React66, { useState as useState22, useEffect as
|
|
6448
|
+
import React66, { useState as useState22, useEffect as useEffect23, useCallback as useCallback22, useMemo as useMemo24 } from "react";
|
|
6425
6449
|
import { Loader as Loader5, Stack as Stack41, Text as Text40, ActionIcon as ActionIcon9, Alert as Alert7, Box as Box19, Group as Group15 } from "@mantine/core";
|
|
6450
|
+
|
|
6451
|
+
// src/mantine/hooks/useOpenSurveys.ts
|
|
6452
|
+
import { useEffect as useEffect22 } from "react";
|
|
6453
|
+
import { create as create3 } from "zustand";
|
|
6454
|
+
var useOpenSurveyStore = create3((set) => ({
|
|
6455
|
+
surveys: /* @__PURE__ */ new Map(),
|
|
6456
|
+
register: (entry) => set((state) => {
|
|
6457
|
+
const next = new Map(state.surveys);
|
|
6458
|
+
next.set(entry.id, entry);
|
|
6459
|
+
return { surveys: next };
|
|
6460
|
+
}),
|
|
6461
|
+
unregister: (id) => set((state) => {
|
|
6462
|
+
if (!state.surveys.has(id)) return state;
|
|
6463
|
+
const next = new Map(state.surveys);
|
|
6464
|
+
next.delete(id);
|
|
6465
|
+
return { surveys: next };
|
|
6466
|
+
})
|
|
6467
|
+
}));
|
|
6468
|
+
function resolveChoiceValue(question, value) {
|
|
6469
|
+
const visibleChoices = question.visibleChoices;
|
|
6470
|
+
const staticChoices = question.choices;
|
|
6471
|
+
let rawChoices = null;
|
|
6472
|
+
if (Array.isArray(visibleChoices) && visibleChoices.length > 0) {
|
|
6473
|
+
rawChoices = visibleChoices;
|
|
6474
|
+
} else if (Array.isArray(staticChoices) && staticChoices.length > 0) {
|
|
6475
|
+
rawChoices = staticChoices;
|
|
6476
|
+
}
|
|
6477
|
+
if (!rawChoices) {
|
|
6478
|
+
return { kind: "passthrough", value };
|
|
6479
|
+
}
|
|
6480
|
+
if (Array.isArray(value)) {
|
|
6481
|
+
const resolvedItems = [];
|
|
6482
|
+
for (const item of value) {
|
|
6483
|
+
const itemResolved = resolveSingleChoiceValue(rawChoices, item);
|
|
6484
|
+
if (itemResolved.kind === "no-match") {
|
|
6485
|
+
return itemResolved;
|
|
6486
|
+
}
|
|
6487
|
+
resolvedItems.push(itemResolved.value);
|
|
6488
|
+
}
|
|
6489
|
+
return { kind: "resolved", value: resolvedItems };
|
|
6490
|
+
}
|
|
6491
|
+
return resolveSingleChoiceValue(rawChoices, value);
|
|
6492
|
+
}
|
|
6493
|
+
function resolveSingleChoiceValue(rawChoices, value) {
|
|
6494
|
+
const normalize = (v) => typeof v === "string" ? v.trim().toLowerCase() : String(v);
|
|
6495
|
+
const target = normalize(value);
|
|
6496
|
+
for (const choice of rawChoices) {
|
|
6497
|
+
const cv = choice?.value ?? choice;
|
|
6498
|
+
if (cv === value) return { kind: "passthrough", value };
|
|
6499
|
+
if (normalize(cv) === target) return { kind: "resolved", value: cv };
|
|
6500
|
+
}
|
|
6501
|
+
for (const choice of rawChoices) {
|
|
6502
|
+
const cv = choice?.value ?? choice;
|
|
6503
|
+
const text = typeof choice?.text === "string" ? choice.text : typeof choice?.locText?.text === "string" ? choice.locText.text : typeof choice?.locText?.calculatedText === "string" ? choice.locText.calculatedText : String(cv);
|
|
6504
|
+
if (normalize(text) === target) {
|
|
6505
|
+
return { kind: "resolved", value: cv };
|
|
6506
|
+
}
|
|
6507
|
+
}
|
|
6508
|
+
const sample = rawChoices.slice(0, 5).map((c) => `${c?.value ?? c}`).join(", ");
|
|
6509
|
+
return {
|
|
6510
|
+
kind: "no-match",
|
|
6511
|
+
reason: `value "${String(value)}" matches neither a choice value nor a choice text${sample ? ` (available values include: ${sample}${rawChoices.length > 5 ? ", \u2026" : ""})` : ""}`
|
|
6512
|
+
};
|
|
6513
|
+
}
|
|
6514
|
+
function extractChoices(rawChoices) {
|
|
6515
|
+
return rawChoices.map(
|
|
6516
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6517
|
+
(choice) => ({
|
|
6518
|
+
value: choice?.value ?? choice,
|
|
6519
|
+
text: typeof choice?.text === "string" ? choice.text : typeof choice?.locText?.text === "string" ? choice.locText.text : typeof choice?.locText?.calculatedText === "string" ? choice.locText.calculatedText : String(choice?.value ?? choice)
|
|
6520
|
+
})
|
|
6521
|
+
);
|
|
6522
|
+
}
|
|
6523
|
+
function summarizeQuestion(question) {
|
|
6524
|
+
const visibleChoices = question.visibleChoices;
|
|
6525
|
+
const staticChoices = question.choices;
|
|
6526
|
+
let choices;
|
|
6527
|
+
if (Array.isArray(visibleChoices) && visibleChoices.length > 0) {
|
|
6528
|
+
choices = extractChoices(visibleChoices);
|
|
6529
|
+
} else if (Array.isArray(staticChoices) && staticChoices.length > 0) {
|
|
6530
|
+
choices = extractChoices(staticChoices);
|
|
6531
|
+
}
|
|
6532
|
+
const choicesByUrlRaw = question.choicesByUrl;
|
|
6533
|
+
const choicesByUrl = choicesByUrlRaw && typeof choicesByUrlRaw.url === "string" && choicesByUrlRaw.url.length > 0 ? {
|
|
6534
|
+
url: String(choicesByUrlRaw.url),
|
|
6535
|
+
valueName: typeof choicesByUrlRaw.valueName === "string" ? choicesByUrlRaw.valueName : void 0,
|
|
6536
|
+
titleName: typeof choicesByUrlRaw.titleName === "string" ? choicesByUrlRaw.titleName : void 0,
|
|
6537
|
+
loaded: Array.isArray(visibleChoices) && visibleChoices.length > 0
|
|
6538
|
+
} : void 0;
|
|
6539
|
+
return {
|
|
6540
|
+
name: String(question.name),
|
|
6541
|
+
type: String(question.getType?.() ?? "unknown"),
|
|
6542
|
+
title: typeof question.title === "string" ? question.title : void 0,
|
|
6543
|
+
description: typeof question.description === "string" ? question.description : void 0,
|
|
6544
|
+
isRequired: Boolean(question.isRequired),
|
|
6545
|
+
visible: question.isVisible !== false,
|
|
6546
|
+
readOnly: Boolean(question.isReadOnly),
|
|
6547
|
+
inputType: typeof question.inputType === "string" ? question.inputType : void 0,
|
|
6548
|
+
choices,
|
|
6549
|
+
choicesByUrl
|
|
6550
|
+
};
|
|
6551
|
+
}
|
|
6552
|
+
function snapshotOpenSurvey(entry, opts = {}) {
|
|
6553
|
+
const { model } = entry;
|
|
6554
|
+
const questions = (model.getAllQuestions(false, false, true) ?? []).map(summarizeQuestion);
|
|
6555
|
+
const currentAnswers = model.data ?? {};
|
|
6556
|
+
const snapshot = {
|
|
6557
|
+
id: entry.id,
|
|
6558
|
+
title: entry.title,
|
|
6559
|
+
source: entry.source,
|
|
6560
|
+
context: entry.context,
|
|
6561
|
+
readonly: entry.readonly,
|
|
6562
|
+
questions,
|
|
6563
|
+
currentAnswers
|
|
6564
|
+
};
|
|
6565
|
+
if (opts.includeSchema) {
|
|
6566
|
+
snapshot.schema = entry.schema;
|
|
6567
|
+
}
|
|
6568
|
+
return snapshot;
|
|
6569
|
+
}
|
|
6570
|
+
function fillOpenSurvey(entry, patch, opts = {}) {
|
|
6571
|
+
const merge = opts.merge ?? true;
|
|
6572
|
+
const result = {
|
|
6573
|
+
applied: {},
|
|
6574
|
+
rejected: [],
|
|
6575
|
+
validation: []
|
|
6576
|
+
};
|
|
6577
|
+
if (entry.readonly) {
|
|
6578
|
+
for (const field of Object.keys(patch)) {
|
|
6579
|
+
result.rejected.push({ field, reason: "survey is read-only" });
|
|
6580
|
+
}
|
|
6581
|
+
return result;
|
|
6582
|
+
}
|
|
6583
|
+
const { model } = entry;
|
|
6584
|
+
if (!merge) {
|
|
6585
|
+
model.data = {};
|
|
6586
|
+
}
|
|
6587
|
+
const orderedNames = (model.getAllQuestions(false, false, true) ?? []).map(
|
|
6588
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6589
|
+
(q) => String(q.name)
|
|
6590
|
+
);
|
|
6591
|
+
const patchKeys = new Set(Object.keys(patch));
|
|
6592
|
+
const ordered = [
|
|
6593
|
+
...orderedNames.filter((name) => patchKeys.has(name)),
|
|
6594
|
+
...Object.keys(patch).filter((name) => !orderedNames.includes(name))
|
|
6595
|
+
];
|
|
6596
|
+
for (const field of ordered) {
|
|
6597
|
+
const value = patch[field];
|
|
6598
|
+
const question = model.getQuestionByName(field);
|
|
6599
|
+
if (!question) {
|
|
6600
|
+
result.rejected.push({ field, reason: "no question with that name" });
|
|
6601
|
+
continue;
|
|
6602
|
+
}
|
|
6603
|
+
if (question.isReadOnly) {
|
|
6604
|
+
result.rejected.push({ field, reason: "question is read-only" });
|
|
6605
|
+
continue;
|
|
6606
|
+
}
|
|
6607
|
+
try {
|
|
6608
|
+
const resolved = resolveChoiceValue(question, value);
|
|
6609
|
+
if (resolved.kind === "no-match") {
|
|
6610
|
+
result.rejected.push({ field, reason: resolved.reason });
|
|
6611
|
+
continue;
|
|
6612
|
+
}
|
|
6613
|
+
model.setValue(field, resolved.value);
|
|
6614
|
+
result.applied[field] = resolved.value;
|
|
6615
|
+
} catch (err) {
|
|
6616
|
+
result.rejected.push({
|
|
6617
|
+
field,
|
|
6618
|
+
reason: err instanceof Error ? err.message : "failed to set value"
|
|
6619
|
+
});
|
|
6620
|
+
}
|
|
6621
|
+
}
|
|
6622
|
+
try {
|
|
6623
|
+
model.validate(false, false);
|
|
6624
|
+
} catch {
|
|
6625
|
+
}
|
|
6626
|
+
for (const question of model.getAllQuestions(true, false, true) ?? []) {
|
|
6627
|
+
const errors = question.errors ?? [];
|
|
6628
|
+
for (const err of errors) {
|
|
6629
|
+
const message = typeof err.text === "string" && err.text || typeof err.getText === "function" && err.getText() || "invalid";
|
|
6630
|
+
result.validation.push({ field: String(question.name), message });
|
|
6631
|
+
}
|
|
6632
|
+
}
|
|
6633
|
+
return result;
|
|
6634
|
+
}
|
|
6635
|
+
function useRegisterOpenSurvey({
|
|
6636
|
+
id,
|
|
6637
|
+
title,
|
|
6638
|
+
source,
|
|
6639
|
+
schema,
|
|
6640
|
+
context,
|
|
6641
|
+
model,
|
|
6642
|
+
readonly = false,
|
|
6643
|
+
enabled = true
|
|
6644
|
+
}) {
|
|
6645
|
+
useEffect22(() => {
|
|
6646
|
+
if (!enabled || !model) return void 0;
|
|
6647
|
+
const { register, unregister } = useOpenSurveyStore.getState();
|
|
6648
|
+
register({ id, title, source, schema, context, readonly, model });
|
|
6649
|
+
return () => {
|
|
6650
|
+
unregister(id);
|
|
6651
|
+
};
|
|
6652
|
+
}, [id, title, source, model, readonly, enabled]);
|
|
6653
|
+
}
|
|
6654
|
+
|
|
6655
|
+
// src/mantine/blocks/claim/flow/ClaimsListSheet.tsx
|
|
6426
6656
|
import { IconArrowLeft as IconArrowLeft2, IconAlertCircle as IconAlertCircle2 } from "@tabler/icons-react";
|
|
6427
6657
|
import { Survey as Survey2, SurveyModel as SurveyModel2 } from "@ixo/surveys";
|
|
6428
6658
|
|
|
@@ -6532,7 +6762,7 @@ var ClaimsListSheet = ({
|
|
|
6532
6762
|
setSurveyLoading(false);
|
|
6533
6763
|
}
|
|
6534
6764
|
}, [deedId, collectionId]);
|
|
6535
|
-
|
|
6765
|
+
useEffect23(() => {
|
|
6536
6766
|
console.log("[ClaimsListSheet] useEffect fetchClaims");
|
|
6537
6767
|
fetchClaims();
|
|
6538
6768
|
}, [fetchClaims]);
|
|
@@ -6644,7 +6874,7 @@ var ClaimsListSheet = ({
|
|
|
6644
6874
|
},
|
|
6645
6875
|
[handlers, deedId, collectionId, adminAddress, closePanel, onSubmitComplete, execution]
|
|
6646
6876
|
);
|
|
6647
|
-
|
|
6877
|
+
useEffect23(() => {
|
|
6648
6878
|
if (surveyModel) {
|
|
6649
6879
|
console.log("[ClaimsListSheet] register surveyModel.onComplete listener");
|
|
6650
6880
|
surveyModel.onComplete.add(handleSurveyComplete);
|
|
@@ -6655,7 +6885,24 @@ var ClaimsListSheet = ({
|
|
|
6655
6885
|
}
|
|
6656
6886
|
return void 0;
|
|
6657
6887
|
}, [surveyModel, handleSurveyComplete]);
|
|
6658
|
-
|
|
6888
|
+
useRegisterOpenSurvey({
|
|
6889
|
+
id: `claim:${block.id}:${collectionId}:new`,
|
|
6890
|
+
title: `New Claim${collectionName ? ` \u2014 ${collectionName}` : ""}`,
|
|
6891
|
+
source: "panel",
|
|
6892
|
+
schema: surveyJson,
|
|
6893
|
+
context: {
|
|
6894
|
+
flowType: "claim-submission",
|
|
6895
|
+
blockId: block.id,
|
|
6896
|
+
blockTitle: block?.props?.title,
|
|
6897
|
+
blockType: "claim",
|
|
6898
|
+
deedId,
|
|
6899
|
+
collectionId,
|
|
6900
|
+
...getFlowRoomContext(editor)
|
|
6901
|
+
},
|
|
6902
|
+
model: surveyModel,
|
|
6903
|
+
enabled: viewMode === "survey" && !!surveyModel
|
|
6904
|
+
});
|
|
6905
|
+
useEffect23(() => {
|
|
6659
6906
|
return attachSurveyAnalytics({
|
|
6660
6907
|
model: surveyModel,
|
|
6661
6908
|
handlers,
|
|
@@ -6711,14 +6958,13 @@ var ClaimsListSheet = ({
|
|
|
6711
6958
|
return /* @__PURE__ */ React66.createElement(BaseRightPanelLayout, { title: viewMode === "list" ? collectionName : "Submit New Claim", onClose: closePanel, isTemplate: false, context: { editor, block } }, /* @__PURE__ */ React66.createElement(
|
|
6712
6959
|
Box19,
|
|
6713
6960
|
{
|
|
6714
|
-
pos: "relative",
|
|
6715
6961
|
style: {
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
|
|
6962
|
+
position: "absolute",
|
|
6963
|
+
top: 0,
|
|
6964
|
+
bottom: 0,
|
|
6965
|
+
left: -40,
|
|
6966
|
+
right: -40,
|
|
6967
|
+
overflow: "hidden"
|
|
6722
6968
|
}
|
|
6723
6969
|
},
|
|
6724
6970
|
/* @__PURE__ */ React66.createElement(
|
|
@@ -6836,7 +7082,7 @@ import React73, { useMemo as useMemo32 } from "react";
|
|
|
6836
7082
|
import { Stack as Stack47, Text as Text47, Center as Center4, Loader as Loader10, Group as Group19 } from "@mantine/core";
|
|
6837
7083
|
|
|
6838
7084
|
// src/mantine/hooks/useBlockAuthorization.ts
|
|
6839
|
-
import { useState as useState23, useEffect as
|
|
7085
|
+
import { useState as useState23, useEffect as useEffect24, useMemo as useMemo26 } from "react";
|
|
6840
7086
|
function useBlockAuthorization({ editor, blockId, actorDid, ucanService, flowUri }) {
|
|
6841
7087
|
const [result, setResult] = useState23({ authorized: false, reason: "Checking authorization..." });
|
|
6842
7088
|
const [loading, setLoading] = useState23(true);
|
|
@@ -6847,7 +7093,7 @@ function useBlockAuthorization({ editor, blockId, actorDid, ucanService, flowUri
|
|
|
6847
7093
|
return metadata?.doc_id ? `ixo:flow:${metadata.doc_id}` : "";
|
|
6848
7094
|
}, [flowUri, editor]);
|
|
6849
7095
|
const schemaVersion = useMemo26(() => editor.getFlowMetadata?.()?.schema_version || "0.3", [editor]);
|
|
6850
|
-
|
|
7096
|
+
useEffect24(() => {
|
|
6851
7097
|
const checkAuthorization = async () => {
|
|
6852
7098
|
setLoading(true);
|
|
6853
7099
|
if (!actorDid) {
|
|
@@ -6902,7 +7148,7 @@ import { Survey as Survey3 } from "@ixo/surveys";
|
|
|
6902
7148
|
import { IconCheck as IconCheck2, IconX as IconX5, IconAlertCircle as IconAlertCircle3 } from "@tabler/icons-react";
|
|
6903
7149
|
|
|
6904
7150
|
// src/mantine/blocks/components/bid/hooks/useBidView.ts
|
|
6905
|
-
import { useState as useState24, useEffect as
|
|
7151
|
+
import { useState as useState24, useEffect as useEffect25, useMemo as useMemo27 } from "react";
|
|
6906
7152
|
import { SurveyModel as SurveyModel3 } from "@ixo/surveys";
|
|
6907
7153
|
|
|
6908
7154
|
// src/mantine/blocks/components/bid/constants.ts
|
|
@@ -6954,7 +7200,7 @@ function useBidView(bid, deedId) {
|
|
|
6954
7200
|
const [surveyJson, setSurveyJson] = useState24(null);
|
|
6955
7201
|
const [loading, setLoading] = useState24(true);
|
|
6956
7202
|
const [error, setError] = useState24(null);
|
|
6957
|
-
|
|
7203
|
+
useEffect25(() => {
|
|
6958
7204
|
const fetchSurveyTemplate = async () => {
|
|
6959
7205
|
try {
|
|
6960
7206
|
setLoading(true);
|
|
@@ -7211,12 +7457,12 @@ var BidViewPanel = ({ editor, block, bid, deedId, adminAddress, onRefresh, execu
|
|
|
7211
7457
|
};
|
|
7212
7458
|
|
|
7213
7459
|
// src/mantine/hooks/useUserProfile.ts
|
|
7214
|
-
import { useState as useState27, useEffect as
|
|
7460
|
+
import { useState as useState27, useEffect as useEffect26 } from "react";
|
|
7215
7461
|
function useUserProfile(did) {
|
|
7216
7462
|
const handlers = useBlocknoteHandlers();
|
|
7217
7463
|
const [userProfile, setUserProfile] = useState27(null);
|
|
7218
7464
|
const [loading, setLoading] = useState27(false);
|
|
7219
|
-
|
|
7465
|
+
useEffect26(() => {
|
|
7220
7466
|
const fetchUserProfile = async () => {
|
|
7221
7467
|
if (!did) return;
|
|
7222
7468
|
try {
|
|
@@ -7263,7 +7509,7 @@ var BidItem = ({ editor, block, bid, deedId, adminAddress, onRefresh, execution,
|
|
|
7263
7509
|
};
|
|
7264
7510
|
|
|
7265
7511
|
// src/mantine/blocks/components/bid/hooks/useBids.ts
|
|
7266
|
-
import { useState as useState28, useEffect as
|
|
7512
|
+
import { useState as useState28, useEffect as useEffect27, useCallback as useCallback24 } from "react";
|
|
7267
7513
|
function useBids(collectionId) {
|
|
7268
7514
|
const handlers = useBlocknoteHandlers();
|
|
7269
7515
|
const [bids, setBids] = useState28([]);
|
|
@@ -7286,7 +7532,7 @@ function useBids(collectionId) {
|
|
|
7286
7532
|
setLoading(false);
|
|
7287
7533
|
}
|
|
7288
7534
|
}, [collectionId]);
|
|
7289
|
-
|
|
7535
|
+
useEffect27(() => {
|
|
7290
7536
|
fetchBids();
|
|
7291
7537
|
}, [fetchBids]);
|
|
7292
7538
|
return { bids, loading, error, refetch: fetchBids };
|
|
@@ -7339,7 +7585,7 @@ var BidsList = ({ editor, block, collectionId, deedId, adminAddress, onRefresh,
|
|
|
7339
7585
|
};
|
|
7340
7586
|
|
|
7341
7587
|
// src/mantine/blocks/components/bid/hooks/useUserBid.ts
|
|
7342
|
-
import { useState as useState29, useEffect as
|
|
7588
|
+
import { useState as useState29, useEffect as useEffect28, useCallback as useCallback26 } from "react";
|
|
7343
7589
|
function useUserBid(collectionId, userDid) {
|
|
7344
7590
|
const handlers = useBlocknoteHandlers();
|
|
7345
7591
|
const [userBid, setUserBid] = useState29(null);
|
|
@@ -7363,7 +7609,7 @@ function useUserBid(collectionId, userDid) {
|
|
|
7363
7609
|
setLoading(false);
|
|
7364
7610
|
}
|
|
7365
7611
|
}, [collectionId, userDid, handlers]);
|
|
7366
|
-
|
|
7612
|
+
useEffect28(() => {
|
|
7367
7613
|
fetchUserBid();
|
|
7368
7614
|
}, [fetchUserBid]);
|
|
7369
7615
|
return { userBid, loading, error, refetch: fetchUserBid };
|
|
@@ -7393,12 +7639,12 @@ var BidRoleSelectPanel = ({ editor, block, collectionId, openEA, openSA, userRol
|
|
|
7393
7639
|
};
|
|
7394
7640
|
|
|
7395
7641
|
// src/mantine/blocks/components/bid/components/BidSurveyPanel.tsx
|
|
7396
|
-
import React72, { useMemo as useMemo31, useEffect as
|
|
7642
|
+
import React72, { useMemo as useMemo31, useEffect as useEffect30, useRef as useRef9, useCallback as useCallback28 } from "react";
|
|
7397
7643
|
import { Loader as Loader9, Stack as Stack46, Text as Text46 } from "@mantine/core";
|
|
7398
7644
|
import { Survey as Survey4 } from "@ixo/surveys";
|
|
7399
7645
|
|
|
7400
7646
|
// src/mantine/blocks/components/bid/hooks/useBidSurvey.ts
|
|
7401
|
-
import { useState as useState30, useEffect as
|
|
7647
|
+
import { useState as useState30, useEffect as useEffect29, useMemo as useMemo30, useCallback as useCallback27 } from "react";
|
|
7402
7648
|
import { SurveyModel as SurveyModel4 } from "@ixo/surveys";
|
|
7403
7649
|
function useBidSurvey(deedId, collectionId, role, onSubmitComplete, execution, executeHookedActions) {
|
|
7404
7650
|
const handlers = useBlocknoteHandlers();
|
|
@@ -7407,7 +7653,7 @@ function useBidSurvey(deedId, collectionId, role, onSubmitComplete, execution, e
|
|
|
7407
7653
|
const [surveyJson, setSurveyJson] = useState30(null);
|
|
7408
7654
|
const [loading, setLoading] = useState30(true);
|
|
7409
7655
|
const [error, setError] = useState30(null);
|
|
7410
|
-
|
|
7656
|
+
useEffect29(() => {
|
|
7411
7657
|
const fetchSurveyTemplate = async () => {
|
|
7412
7658
|
try {
|
|
7413
7659
|
setLoading(true);
|
|
@@ -7508,7 +7754,7 @@ function useBidSurvey(deedId, collectionId, role, onSubmitComplete, execution, e
|
|
|
7508
7754
|
},
|
|
7509
7755
|
[handlers, collectionId, role, closePanel, onSubmitComplete, execution, executeHookedActions, deedId]
|
|
7510
7756
|
);
|
|
7511
|
-
|
|
7757
|
+
useEffect29(() => {
|
|
7512
7758
|
return attachSurveyAnalytics({
|
|
7513
7759
|
model: surveyModel,
|
|
7514
7760
|
handlers,
|
|
@@ -7539,7 +7785,7 @@ var BidSurveyPanel = ({ editor, block, deedId, collectionId, role, onSubmitCompl
|
|
|
7539
7785
|
const { surveyModel, loading, error, handleSurveyComplete } = useBidSurvey(deedId, collectionId, role, onSubmitComplete, execution, executeHookedActions);
|
|
7540
7786
|
const roleLabel = role === "service_agent" ? "Contributor" : "Evaluator";
|
|
7541
7787
|
const handleSurveyCompleteRef = useRef9(handleSurveyComplete);
|
|
7542
|
-
|
|
7788
|
+
useEffect30(() => {
|
|
7543
7789
|
handleSurveyCompleteRef.current = handleSurveyComplete;
|
|
7544
7790
|
}, [handleSurveyComplete]);
|
|
7545
7791
|
const stableHandleSurveyComplete = useCallback28((sender) => {
|
|
@@ -7555,7 +7801,7 @@ var BidSurveyPanel = ({ editor, block, deedId, collectionId, role, onSubmitCompl
|
|
|
7555
7801
|
}),
|
|
7556
7802
|
[]
|
|
7557
7803
|
);
|
|
7558
|
-
|
|
7804
|
+
useEffect30(() => {
|
|
7559
7805
|
if (surveyModel) {
|
|
7560
7806
|
surveyModel.onComplete.add(stableHandleSurveyComplete);
|
|
7561
7807
|
return () => {
|
|
@@ -7726,11 +7972,11 @@ var BidCollectionItem = ({ collection, editor, block, deedId, adminAddress, user
|
|
|
7726
7972
|
};
|
|
7727
7973
|
|
|
7728
7974
|
// src/mantine/blocks/evaluator/flow/EvaluationCollectionItem.tsx
|
|
7729
|
-
import React76, { useMemo as useMemo35, useEffect as
|
|
7975
|
+
import React76, { useMemo as useMemo35, useEffect as useEffect32, useRef as useRef10 } from "react";
|
|
7730
7976
|
import { Group as Group22, Stack as Stack50, Text as Text50 } from "@mantine/core";
|
|
7731
7977
|
|
|
7732
7978
|
// src/mantine/blocks/evaluator/flow/ClaimsList.tsx
|
|
7733
|
-
import React75, { useState as useState31, useEffect as
|
|
7979
|
+
import React75, { useState as useState31, useEffect as useEffect31, useCallback as useCallback29, useMemo as useMemo34 } from "react";
|
|
7734
7980
|
import {
|
|
7735
7981
|
Paper as Paper7,
|
|
7736
7982
|
CloseButton,
|
|
@@ -8173,7 +8419,7 @@ var ClaimsList = ({ collectionId, collectionName, deedId, adminAddress, onEvalua
|
|
|
8173
8419
|
setLoading(false);
|
|
8174
8420
|
}
|
|
8175
8421
|
}, [collectionId]);
|
|
8176
|
-
|
|
8422
|
+
useEffect31(() => {
|
|
8177
8423
|
fetchClaims();
|
|
8178
8424
|
}, [fetchClaims]);
|
|
8179
8425
|
const fetchClaimAndSurvey = useCallback29(
|
|
@@ -8563,7 +8809,7 @@ var ClaimListItem = ({ claim, onViewClaim }) => {
|
|
|
8563
8809
|
const handlers = useBlocknoteHandlers();
|
|
8564
8810
|
const [userProfile, setUserProfile] = useState31(null);
|
|
8565
8811
|
const [loadingProfile, setLoadingProfile] = useState31(false);
|
|
8566
|
-
|
|
8812
|
+
useEffect31(() => {
|
|
8567
8813
|
const fetchUserProfile = async () => {
|
|
8568
8814
|
if (!claim.agentDid) return;
|
|
8569
8815
|
try {
|
|
@@ -8603,7 +8849,7 @@ import { IconFile as IconFile3 } from "@tabler/icons-react";
|
|
|
8603
8849
|
var EvaluationCollectionItem = ({ collection, block, deedId, adminAddress, editor, userRole, onRefresh }) => {
|
|
8604
8850
|
const { getCurrentUser } = useBlocknoteHandlers();
|
|
8605
8851
|
const getCurrentUserRef = useRef10(getCurrentUser);
|
|
8606
|
-
|
|
8852
|
+
useEffect32(() => {
|
|
8607
8853
|
getCurrentUserRef.current = getCurrentUser;
|
|
8608
8854
|
}, [getCurrentUser]);
|
|
8609
8855
|
const currentUser = getCurrentUserRef.current();
|
|
@@ -9435,7 +9681,7 @@ import React86, { useCallback as useCallback33, useState as useState37 } from "r
|
|
|
9435
9681
|
import { Alert as Alert14, Badge as Badge10, Button as Button12, Group as Group27, Stack as Stack57, Text as Text57 } from "@mantine/core";
|
|
9436
9682
|
|
|
9437
9683
|
// src/mantine/blocks/action/actionTypes/_shared/ConnectionSelector.tsx
|
|
9438
|
-
import React82, { useCallback as useCallback30, useEffect as
|
|
9684
|
+
import React82, { useCallback as useCallback30, useEffect as useEffect33, useMemo as useMemo37, useRef as useRef11, useState as useState33 } from "react";
|
|
9439
9685
|
import { Alert as Alert13, Button as Button11, Group as Group23, Loader as Loader14, Stack as Stack54, Text as Text54 } from "@mantine/core";
|
|
9440
9686
|
import { IconPlug, IconRefresh as IconRefresh2 } from "@tabler/icons-react";
|
|
9441
9687
|
|
|
@@ -9478,10 +9724,10 @@ var ConnectionSelector = ({ toolkit, toolkitLabel, value, onChange, disabled })
|
|
|
9478
9724
|
setLoading(false);
|
|
9479
9725
|
}
|
|
9480
9726
|
}, [handlers, toolkit, toolkitLabel]);
|
|
9481
|
-
|
|
9727
|
+
useEffect33(() => {
|
|
9482
9728
|
loadConnections();
|
|
9483
9729
|
}, [loadConnections]);
|
|
9484
|
-
|
|
9730
|
+
useEffect33(() => {
|
|
9485
9731
|
return () => {
|
|
9486
9732
|
cleanupRef.current?.();
|
|
9487
9733
|
};
|
|
@@ -9945,7 +10191,7 @@ function DataInput({
|
|
|
9945
10191
|
}
|
|
9946
10192
|
|
|
9947
10193
|
// src/mantine/blocks/action/actionTypes/xero/_shared/XeroBankAccountPicker.tsx
|
|
9948
|
-
import React85, { useCallback as useCallback32, useEffect as
|
|
10194
|
+
import React85, { useCallback as useCallback32, useEffect as useEffect34, useState as useState36 } from "react";
|
|
9949
10195
|
import { ActionIcon as ActionIcon14, Group as Group26, Loader as Loader15, Stack as Stack56, Text as Text56 } from "@mantine/core";
|
|
9950
10196
|
import { IconRefresh as IconRefresh3 } from "@tabler/icons-react";
|
|
9951
10197
|
var XERO_LIST_ACCOUNTS_SLUG = "XERO_LIST_ACCOUNTS";
|
|
@@ -9996,7 +10242,7 @@ var XeroBankAccountPicker = ({
|
|
|
9996
10242
|
setLoading(false);
|
|
9997
10243
|
}
|
|
9998
10244
|
}, [connectedAccountId, handlers]);
|
|
9999
|
-
|
|
10245
|
+
useEffect34(() => {
|
|
10000
10246
|
void fetchBankAccounts();
|
|
10001
10247
|
}, [fetchBankAccounts]);
|
|
10002
10248
|
const valueHasRef = value.includes("{{");
|
|
@@ -10120,7 +10366,7 @@ var ClaimsEvaluation = ({ collectionId, adminAddress, deedId, claim, onRefresh }
|
|
|
10120
10366
|
}, [handlers]);
|
|
10121
10367
|
const [xeroOverride, setXeroOverride] = useState38(null);
|
|
10122
10368
|
const [overrideRev, setOverrideRev] = useState38(0);
|
|
10123
|
-
|
|
10369
|
+
useEffect35(() => {
|
|
10124
10370
|
const evalBlockId = xeroBlocks.evaluateBlockId;
|
|
10125
10371
|
if (!evalBlockId || !actorDid) {
|
|
10126
10372
|
setXeroOverride(null);
|
|
@@ -10168,7 +10414,7 @@ var ClaimsEvaluation = ({ collectionId, adminAddress, deedId, claim, onRefresh }
|
|
|
10168
10414
|
clearEvaluatorOverride(runtimeManager, evalBlockId, actorDid);
|
|
10169
10415
|
setOverrideRev((n) => n + 1);
|
|
10170
10416
|
}, [runtimeManager, xeroBlocks.evaluateBlockId, actorDid]);
|
|
10171
|
-
|
|
10417
|
+
useEffect35(() => {
|
|
10172
10418
|
if (!claim?.claimId || !collectionId || !deedId || !handlers?.getClaimData) {
|
|
10173
10419
|
return;
|
|
10174
10420
|
}
|
|
@@ -10219,7 +10465,7 @@ var ClaimsEvaluation = ({ collectionId, adminAddress, deedId, claim, onRefresh }
|
|
|
10219
10465
|
};
|
|
10220
10466
|
fetchAndTryEvaluateClaim();
|
|
10221
10467
|
}, [claim, collectionId, deedId, handlers, xeroBlocks.evaluateBlockId, runtimeManager]);
|
|
10222
|
-
|
|
10468
|
+
useEffect35(() => {
|
|
10223
10469
|
let cancelled = false;
|
|
10224
10470
|
const invoiceBlock = xeroBlocks.invoiceCreateBlock;
|
|
10225
10471
|
if (!invoiceBlock || !claim || !claimDataForXero) {
|
|
@@ -10631,7 +10877,7 @@ var ListSelectionPanel = ({ selectedIds, listConfig, listData, listType, userRol
|
|
|
10631
10877
|
if (!listType) return null;
|
|
10632
10878
|
return getSelectionPanelConfig(listType);
|
|
10633
10879
|
}, [listType]);
|
|
10634
|
-
|
|
10880
|
+
useEffect36(() => {
|
|
10635
10881
|
const fetchItemDetails = async () => {
|
|
10636
10882
|
if (!selectedItemId || !listType || !handlers || !panelConfig) {
|
|
10637
10883
|
setItemHandlerData(null);
|
|
@@ -10782,7 +11028,7 @@ var DaosList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
|
10782
11028
|
};
|
|
10783
11029
|
|
|
10784
11030
|
// src/mantine/blocks/list/claims/ClaimsList.tsx
|
|
10785
|
-
import React91, { useState as useState40, useEffect as
|
|
11031
|
+
import React91, { useState as useState40, useEffect as useEffect37, useMemo as useMemo42 } from "react";
|
|
10786
11032
|
import { Text as Text62, Stack as Stack62, Flex as Flex25, Box as Box27, Group as Group29 } from "@mantine/core";
|
|
10787
11033
|
var ClaimsList2 = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
10788
11034
|
const handlers = useBlocknoteHandlers();
|
|
@@ -10796,7 +11042,7 @@ var ClaimsList2 = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
|
10796
11042
|
});
|
|
10797
11043
|
return Array.from(dids);
|
|
10798
11044
|
}, [items]);
|
|
10799
|
-
|
|
11045
|
+
useEffect37(() => {
|
|
10800
11046
|
const fetchProfiles = async () => {
|
|
10801
11047
|
if (uniqueAgentDids.length === 0) {
|
|
10802
11048
|
setProfiles({});
|
|
@@ -11159,7 +11405,7 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
11159
11405
|
[editor, block, selectedIds, listConfig, listType, userRole, handlePanelClose, data]
|
|
11160
11406
|
);
|
|
11161
11407
|
const { open: openSelectionPanel, close: closeSelectionPanel } = usePanel(selectionPanelId, selectionPanelContent);
|
|
11162
|
-
|
|
11408
|
+
useEffect38(() => {
|
|
11163
11409
|
if (!isMultiSelect && selectedIds.size > 1) {
|
|
11164
11410
|
const arr = Array.from(selectedIds);
|
|
11165
11411
|
const lastSelected = arr.length > 0 ? arr[arr.length - 1] : void 0;
|
|
@@ -11246,7 +11492,7 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
11246
11492
|
}
|
|
11247
11493
|
return {};
|
|
11248
11494
|
}, [block.props.sort]);
|
|
11249
|
-
|
|
11495
|
+
useEffect38(() => {
|
|
11250
11496
|
const unsubscribe = subscribe((event) => {
|
|
11251
11497
|
if (event === "collapse") close();
|
|
11252
11498
|
else if (event === "expand") open();
|
|
@@ -11459,10 +11705,10 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
11459
11705
|
setLoading(false);
|
|
11460
11706
|
}
|
|
11461
11707
|
}, [handlers, page, listType, listConfig, runtimeSearchValue, daoRoleFilter]);
|
|
11462
|
-
|
|
11708
|
+
useEffect38(() => {
|
|
11463
11709
|
fetchDataRef.current = fetchData;
|
|
11464
11710
|
}, [fetchData]);
|
|
11465
|
-
|
|
11711
|
+
useEffect38(() => {
|
|
11466
11712
|
if (listType && listConfig) {
|
|
11467
11713
|
fetchData();
|
|
11468
11714
|
}
|
|
@@ -11630,7 +11876,7 @@ var ListBlockSpec = createReactBlockSpec3(
|
|
|
11630
11876
|
);
|
|
11631
11877
|
|
|
11632
11878
|
// src/mantine/blocks/overview/OverviewBlock.tsx
|
|
11633
|
-
import React96, { useEffect as
|
|
11879
|
+
import React96, { useEffect as useEffect39, useState as useState43 } from "react";
|
|
11634
11880
|
import { createReactBlockSpec as createReactBlockSpec4 } from "@blocknote/react";
|
|
11635
11881
|
import { Stack as Stack64, Text as Text65, Box as Box29, Loader as Loader19, Alert as Alert17, Group as Group30, Accordion as Accordion3, Collapse as Collapse3 } from "@mantine/core";
|
|
11636
11882
|
import { IconChevronRight as IconChevronRight3, IconChevronDown as IconChevronDown3, IconFileDescription as IconFileDescription3, IconWorld, IconCalendar, IconUser as IconUser6, IconCircleCheck } from "@tabler/icons-react";
|
|
@@ -11641,7 +11887,7 @@ var OverviewBlockContent = () => {
|
|
|
11641
11887
|
const [loading, setLoading] = useState43(true);
|
|
11642
11888
|
const [error, setError] = useState43(null);
|
|
11643
11889
|
const [detailsOpened, { toggle: toggleDetails }] = useDisclosure5(false);
|
|
11644
|
-
|
|
11890
|
+
useEffect39(() => {
|
|
11645
11891
|
const fetchDomainCard = async () => {
|
|
11646
11892
|
setLoading(true);
|
|
11647
11893
|
setError(null);
|
|
@@ -11792,7 +12038,7 @@ import React132, { useCallback as useCallback37 } from "react";
|
|
|
11792
12038
|
import { IconSettings as IconSettings5, IconBolt as IconBolt3, IconCheck as IconCheck4, IconShieldCheck as IconShieldCheck6, IconClock as IconClock5 } from "@tabler/icons-react";
|
|
11793
12039
|
|
|
11794
12040
|
// src/mantine/blocks/proposal/template/GeneralTab.tsx
|
|
11795
|
-
import React97, { useEffect as
|
|
12041
|
+
import React97, { useEffect as useEffect40, useState as useState44 } from "react";
|
|
11796
12042
|
import { Stack as Stack65, Text as Text66, Loader as Loader20, SegmentedControl as SegmentedControl4 } from "@mantine/core";
|
|
11797
12043
|
var GeneralTab4 = ({ title, description, coreAddress, onTitleChange, onDescriptionChange, onGroupChange }) => {
|
|
11798
12044
|
const handlers = useBlocknoteHandlers();
|
|
@@ -11802,13 +12048,13 @@ var GeneralTab4 = ({ title, description, coreAddress, onTitleChange, onDescripti
|
|
|
11802
12048
|
const [loadingGroups, setLoadingGroups] = useState44(false);
|
|
11803
12049
|
const [inputMode, setInputMode] = useState44("select");
|
|
11804
12050
|
const [manualAddress, setManualAddress] = useState44("");
|
|
11805
|
-
|
|
12051
|
+
useEffect40(() => {
|
|
11806
12052
|
setLocalTitle(title || "");
|
|
11807
12053
|
}, [title]);
|
|
11808
|
-
|
|
12054
|
+
useEffect40(() => {
|
|
11809
12055
|
setLocalDescription(description || "");
|
|
11810
12056
|
}, [description]);
|
|
11811
|
-
|
|
12057
|
+
useEffect40(() => {
|
|
11812
12058
|
if (coreAddress) {
|
|
11813
12059
|
const matchesGroup = groups.some((g) => g.coreAddress === coreAddress);
|
|
11814
12060
|
if (matchesGroup) {
|
|
@@ -11819,7 +12065,7 @@ var GeneralTab4 = ({ title, description, coreAddress, onTitleChange, onDescripti
|
|
|
11819
12065
|
}
|
|
11820
12066
|
}
|
|
11821
12067
|
}, [coreAddress, groups]);
|
|
11822
|
-
|
|
12068
|
+
useEffect40(() => {
|
|
11823
12069
|
const fetchGroups = async () => {
|
|
11824
12070
|
if (!handlers?.getDAOGroups) {
|
|
11825
12071
|
return;
|
|
@@ -11907,7 +12153,7 @@ var GeneralTab4 = ({ title, description, coreAddress, onTitleChange, onDescripti
|
|
|
11907
12153
|
};
|
|
11908
12154
|
|
|
11909
12155
|
// src/mantine/blocks/proposal/template/ActionsTab.tsx
|
|
11910
|
-
import React130, { useCallback as useCallback36, useEffect as
|
|
12156
|
+
import React130, { useCallback as useCallback36, useEffect as useEffect43, useState as useState52 } from "react";
|
|
11911
12157
|
import { Card as Card13, Stack as Stack98 } from "@mantine/core";
|
|
11912
12158
|
|
|
11913
12159
|
// src/mantine/blocks/proposal/actions-components/ActionsCard.tsx
|
|
@@ -12013,7 +12259,7 @@ var ActionsCard = ({ actions, isSelected, onClick, onEditAction, onRemoveAction,
|
|
|
12013
12259
|
};
|
|
12014
12260
|
|
|
12015
12261
|
// src/mantine/blocks/proposal/ActionsPanel.tsx
|
|
12016
|
-
import React129, { useState as useState51, useEffect as
|
|
12262
|
+
import React129, { useState as useState51, useEffect as useEffect42, useMemo as useMemo44 } from "react";
|
|
12017
12263
|
import { Stack as Stack97, Button as Button19, Group as Group42, Text as Text75, Card as Card12, Badge as Badge16, Divider as Divider9, ScrollArea as ScrollArea5, Alert as Alert20, Tabs as Tabs2, SimpleGrid, Paper as Paper8 } from "@mantine/core";
|
|
12018
12264
|
|
|
12019
12265
|
// src/mantine/blocks/proposal/actions-components/SpendActionForm.tsx
|
|
@@ -12255,12 +12501,12 @@ var ExecuteActionForm = ({ data, onChange }) => {
|
|
|
12255
12501
|
};
|
|
12256
12502
|
|
|
12257
12503
|
// src/mantine/blocks/proposal/actions-components/forms/CustomActionForm.tsx
|
|
12258
|
-
import React105, { useState as useState47, useEffect as
|
|
12504
|
+
import React105, { useState as useState47, useEffect as useEffect41 } from "react";
|
|
12259
12505
|
import { Stack as Stack73, Alert as Alert18, Group as Group34, Text as Text70, Badge as Badge15 } from "@mantine/core";
|
|
12260
12506
|
var CustomActionForm = ({ data, onChange }) => {
|
|
12261
12507
|
const [isValid, setIsValid] = useState47(true);
|
|
12262
12508
|
const [error, setError] = useState47("");
|
|
12263
|
-
|
|
12509
|
+
useEffect41(() => {
|
|
12264
12510
|
try {
|
|
12265
12511
|
if (data.message) {
|
|
12266
12512
|
JSON.parse(data.message);
|
|
@@ -13906,7 +14152,7 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
|
|
|
13906
14152
|
});
|
|
13907
14153
|
const currentActionConfig = getActionConfig(selectedActionType);
|
|
13908
14154
|
const categorizedActions = useMemo44(() => getCategorizedActions(), []);
|
|
13909
|
-
|
|
14155
|
+
useEffect42(() => {
|
|
13910
14156
|
if (!isEditing) {
|
|
13911
14157
|
const config = getActionConfig(selectedActionType);
|
|
13912
14158
|
if (config) {
|
|
@@ -14048,7 +14294,7 @@ var ActionsTab = ({ actions, onActionsChange }) => {
|
|
|
14048
14294
|
}
|
|
14049
14295
|
};
|
|
14050
14296
|
const currentActions = parseActions(actions);
|
|
14051
|
-
|
|
14297
|
+
useEffect43(() => {
|
|
14052
14298
|
if (currentActions.length === 0 && !isEditorVisible) {
|
|
14053
14299
|
setEditingIndex(null);
|
|
14054
14300
|
setIsEditorVisible(true);
|
|
@@ -14247,12 +14493,12 @@ var OnChainProposalCard = ({
|
|
|
14247
14493
|
};
|
|
14248
14494
|
|
|
14249
14495
|
// src/mantine/blocks/proposal/flow/FlowConfig.tsx
|
|
14250
|
-
import React137, { useCallback as useCallback39, useState as useState57, useEffect as
|
|
14496
|
+
import React137, { useCallback as useCallback39, useState as useState57, useEffect as useEffect47 } from "react";
|
|
14251
14497
|
import { Stack as Stack104, Button as Button23, Text as Text80, Card as Card17, Loader as Loader21, SegmentedControl as SegmentedControl5 } from "@mantine/core";
|
|
14252
14498
|
import { IconPlus as IconPlus2, IconBolt as IconBolt4, IconCheck as IconCheck5 } from "@tabler/icons-react";
|
|
14253
14499
|
|
|
14254
14500
|
// src/mantine/blocks/proposal/flow/useFlowBusinessLogic.ts
|
|
14255
|
-
import { useEffect as
|
|
14501
|
+
import { useEffect as useEffect44, useState as useState53 } from "react";
|
|
14256
14502
|
var CHAIN_STATUSES = ["open", "passed", "rejected", "executed", "closed", "execution_failed", "veto_timelock"];
|
|
14257
14503
|
var isChainStatus = (value) => {
|
|
14258
14504
|
return CHAIN_STATUSES.includes(value);
|
|
@@ -14295,7 +14541,7 @@ var useFlowBusinessLogic = ({ block, editor }) => {
|
|
|
14295
14541
|
props: { ...block.props, ...nextProps }
|
|
14296
14542
|
});
|
|
14297
14543
|
};
|
|
14298
|
-
|
|
14544
|
+
useEffect44(() => {
|
|
14299
14545
|
if (!handlers || !coreAddress || !proposalId) {
|
|
14300
14546
|
setProposalContractAddress(null);
|
|
14301
14547
|
return;
|
|
@@ -14315,7 +14561,7 @@ var useFlowBusinessLogic = ({ block, editor }) => {
|
|
|
14315
14561
|
isCancelled = true;
|
|
14316
14562
|
};
|
|
14317
14563
|
}, [handlers, coreAddress, proposalId]);
|
|
14318
|
-
|
|
14564
|
+
useEffect44(() => {
|
|
14319
14565
|
if (!proposal) return;
|
|
14320
14566
|
const chainStatus = proposal.proposal.status;
|
|
14321
14567
|
const parsedStatus = parseStatus(chainStatus);
|
|
@@ -14397,7 +14643,7 @@ var useFlowBusinessLogic = ({ block, editor }) => {
|
|
|
14397
14643
|
};
|
|
14398
14644
|
|
|
14399
14645
|
// src/mantine/blocks/proposal/flow/useVoteBusinessLogic.ts
|
|
14400
|
-
import { useState as useState54, useEffect as
|
|
14646
|
+
import { useState as useState54, useEffect as useEffect45 } from "react";
|
|
14401
14647
|
var useVoteBusinessLogic = ({ block }) => {
|
|
14402
14648
|
const [localError, setLocalError] = useState54(null);
|
|
14403
14649
|
const [userVote, setUserVote] = useState54(null);
|
|
@@ -14413,7 +14659,7 @@ var useVoteBusinessLogic = ({ block }) => {
|
|
|
14413
14659
|
const description = block.props.description || "";
|
|
14414
14660
|
const status = block.props.status || "draft";
|
|
14415
14661
|
const coreAddress = block.props.coreAddress || "";
|
|
14416
|
-
|
|
14662
|
+
useEffect45(() => {
|
|
14417
14663
|
if (!handlers || !coreAddress || !proposalId) {
|
|
14418
14664
|
setProposalContractAddress(null);
|
|
14419
14665
|
return;
|
|
@@ -14433,7 +14679,7 @@ var useVoteBusinessLogic = ({ block }) => {
|
|
|
14433
14679
|
isCancelled = true;
|
|
14434
14680
|
};
|
|
14435
14681
|
}, [handlers, coreAddress, proposalId]);
|
|
14436
|
-
|
|
14682
|
+
useEffect45(() => {
|
|
14437
14683
|
if (!handlers || !proposalContractAddress || !proposalId) {
|
|
14438
14684
|
return;
|
|
14439
14685
|
}
|
|
@@ -14712,7 +14958,7 @@ var FlowGeneralTab = ({
|
|
|
14712
14958
|
};
|
|
14713
14959
|
|
|
14714
14960
|
// src/mantine/blocks/proposal/flow/ActionsTab.tsx
|
|
14715
|
-
import React136, { useCallback as useCallback38, useEffect as
|
|
14961
|
+
import React136, { useCallback as useCallback38, useEffect as useEffect46, useState as useState56 } from "react";
|
|
14716
14962
|
import { Alert as Alert21, Button as Button22, Card as Card16, Stack as Stack103, Text as Text79 } from "@mantine/core";
|
|
14717
14963
|
var ActionsTab2 = ({ actions, onActionsChange, isProposalCreated }) => {
|
|
14718
14964
|
const [isEditorVisible, setIsEditorVisible] = useState56(false);
|
|
@@ -14726,7 +14972,7 @@ var ActionsTab2 = ({ actions, onActionsChange, isProposalCreated }) => {
|
|
|
14726
14972
|
}
|
|
14727
14973
|
};
|
|
14728
14974
|
const currentActions = parseActions(actions);
|
|
14729
|
-
|
|
14975
|
+
useEffect46(() => {
|
|
14730
14976
|
if (!isProposalCreated && currentActions.length === 0 && !isEditorVisible) {
|
|
14731
14977
|
setEditingIndex(null);
|
|
14732
14978
|
setIsEditorVisible(true);
|
|
@@ -14837,7 +15083,7 @@ var FlowConfig2 = ({ editor, block }) => {
|
|
|
14837
15083
|
},
|
|
14838
15084
|
[editor, block]
|
|
14839
15085
|
);
|
|
14840
|
-
|
|
15086
|
+
useEffect47(() => {
|
|
14841
15087
|
if (coreAddress) {
|
|
14842
15088
|
const matchesGroup = groups.some((g) => g.coreAddress === coreAddress);
|
|
14843
15089
|
if (matchesGroup) {
|
|
@@ -14848,7 +15094,7 @@ var FlowConfig2 = ({ editor, block }) => {
|
|
|
14848
15094
|
}
|
|
14849
15095
|
}
|
|
14850
15096
|
}, [coreAddress, groups]);
|
|
14851
|
-
|
|
15097
|
+
useEffect47(() => {
|
|
14852
15098
|
const fetchGroups = async () => {
|
|
14853
15099
|
if (!handlers?.getDAOGroups) {
|
|
14854
15100
|
return;
|
|
@@ -15106,7 +15352,7 @@ var ProposalBlockSpec = createReactBlockSpec5(
|
|
|
15106
15352
|
);
|
|
15107
15353
|
|
|
15108
15354
|
// src/mantine/blocks/enumChecklist/EnumChecklistBlock.tsx
|
|
15109
|
-
import React147, { useState as useState59, useEffect as
|
|
15355
|
+
import React147, { useState as useState59, useEffect as useEffect48, useMemo as useMemo47, useCallback as useCallback40 } from "react";
|
|
15110
15356
|
import { createReactBlockSpec as createReactBlockSpec6 } from "@blocknote/react";
|
|
15111
15357
|
import { Stack as Stack110, Text as Text86, Button as Button28, ActionIcon as ActionIcon19, Center as Center10, Flex as Flex29 } from "@mantine/core";
|
|
15112
15358
|
|
|
@@ -15498,7 +15744,7 @@ var EnumChecklistBlockContent = ({ block, editor }) => {
|
|
|
15498
15744
|
}
|
|
15499
15745
|
return /* @__PURE__ */ new Set();
|
|
15500
15746
|
}, [block.props.selectedIds]);
|
|
15501
|
-
|
|
15747
|
+
useEffect48(() => {
|
|
15502
15748
|
if (listConfig?.selection_mode === "single" && selectedIds.size > 1) {
|
|
15503
15749
|
const arr = Array.from(selectedIds);
|
|
15504
15750
|
const lastSelected = arr.length > 0 ? arr[arr.length - 1] : void 0;
|
|
@@ -15621,7 +15867,7 @@ import React151, { useCallback as useCallback42, useMemo as useMemo49 } from "re
|
|
|
15621
15867
|
import { IconSettings as IconSettings7, IconCode as IconCode2, IconShieldCheck as IconShieldCheck7, IconUser as IconUser7, IconChecklist as IconChecklist5, IconClock as IconClock6 } from "@tabler/icons-react";
|
|
15622
15868
|
|
|
15623
15869
|
// src/mantine/blocks/apiRequest/template/GeneralTab.tsx
|
|
15624
|
-
import React148, { useEffect as
|
|
15870
|
+
import React148, { useEffect as useEffect49, useState as useState60 } from "react";
|
|
15625
15871
|
import { Divider as Divider10, Stack as Stack111, Text as Text87, Button as Button29, Group as Group50, ActionIcon as ActionIcon20, Paper as Paper9 } from "@mantine/core";
|
|
15626
15872
|
import { IconTrash as IconTrash2, IconPlus as IconPlus3 } from "@tabler/icons-react";
|
|
15627
15873
|
var GeneralTab5 = ({
|
|
@@ -15646,12 +15892,12 @@ var GeneralTab5 = ({
|
|
|
15646
15892
|
const [localMethod, setLocalMethod] = useState60(method || "GET");
|
|
15647
15893
|
const [localHeaders, setLocalHeaders] = useState60(headers || []);
|
|
15648
15894
|
const [localBody, setLocalBody] = useState60(body || []);
|
|
15649
|
-
|
|
15650
|
-
|
|
15651
|
-
|
|
15652
|
-
|
|
15653
|
-
|
|
15654
|
-
|
|
15895
|
+
useEffect49(() => setLocalTitle(title || ""), [title]);
|
|
15896
|
+
useEffect49(() => setLocalDescription(description || ""), [description]);
|
|
15897
|
+
useEffect49(() => setLocalEndpoint(endpoint || ""), [endpoint]);
|
|
15898
|
+
useEffect49(() => setLocalMethod(method || "GET"), [method]);
|
|
15899
|
+
useEffect49(() => setLocalHeaders(headers || []), [headers]);
|
|
15900
|
+
useEffect49(() => setLocalBody(body || []), [body]);
|
|
15655
15901
|
const handleAddHeader = () => {
|
|
15656
15902
|
const newHeaders = [...localHeaders, { key: "", value: "" }];
|
|
15657
15903
|
setLocalHeaders(newHeaders);
|
|
@@ -15870,7 +16116,7 @@ var ResponseSchemaTab = ({ schema, onSchemaChange, blockId }) => {
|
|
|
15870
16116
|
};
|
|
15871
16117
|
|
|
15872
16118
|
// src/mantine/components/EvaluationTab.tsx
|
|
15873
|
-
import React150, { useMemo as useMemo48, useState as useState61, useEffect as
|
|
16119
|
+
import React150, { useMemo as useMemo48, useState as useState61, useEffect as useEffect50, useCallback as useCallback41 } from "react";
|
|
15874
16120
|
import { Stack as Stack113, TextInput as TextInput5, Text as Text89 } from "@mantine/core";
|
|
15875
16121
|
var EvaluationTab = ({ editor, block: initialBlock }) => {
|
|
15876
16122
|
const [, forceUpdate] = useState61({});
|
|
@@ -15878,7 +16124,7 @@ var EvaluationTab = ({ editor, block: initialBlock }) => {
|
|
|
15878
16124
|
const doc = editor?.document || [];
|
|
15879
16125
|
return doc.find((b) => b.id === initialBlock.id) || initialBlock;
|
|
15880
16126
|
}, [editor?.document, initialBlock]);
|
|
15881
|
-
|
|
16127
|
+
useEffect50(() => {
|
|
15882
16128
|
if (!editor) return;
|
|
15883
16129
|
const handleChange = () => {
|
|
15884
16130
|
forceUpdate({});
|
|
@@ -16412,7 +16658,7 @@ import React157, { useCallback as useCallback43 } from "react";
|
|
|
16412
16658
|
import { IconSettings as IconSettings8 } from "@tabler/icons-react";
|
|
16413
16659
|
|
|
16414
16660
|
// src/mantine/blocks/notify/template/GeneralTab.tsx
|
|
16415
|
-
import React156, { useEffect as
|
|
16661
|
+
import React156, { useEffect as useEffect51, useState as useState63 } from "react";
|
|
16416
16662
|
import { Divider as Divider12, Stack as Stack116, Text as Text92, Group as Group54, ActionIcon as ActionIcon22, Paper as Paper11 } from "@mantine/core";
|
|
16417
16663
|
import { IconTrash as IconTrash4 } from "@tabler/icons-react";
|
|
16418
16664
|
var GeneralTab6 = ({
|
|
@@ -16452,17 +16698,17 @@ var GeneralTab6 = ({
|
|
|
16452
16698
|
const [localBodyType, setLocalBodyType] = useState63(bodyType || "text");
|
|
16453
16699
|
const [localFrom, setLocalFrom] = useState63(from || "");
|
|
16454
16700
|
const [localReplyTo, setLocalReplyTo] = useState63(replyTo || "");
|
|
16455
|
-
|
|
16456
|
-
|
|
16457
|
-
|
|
16458
|
-
|
|
16459
|
-
|
|
16460
|
-
|
|
16461
|
-
|
|
16462
|
-
|
|
16463
|
-
|
|
16464
|
-
|
|
16465
|
-
|
|
16701
|
+
useEffect51(() => setLocalTitle(title || ""), [title]);
|
|
16702
|
+
useEffect51(() => setLocalDescription(description || ""), [description]);
|
|
16703
|
+
useEffect51(() => setLocalChannel(channel || "email"), [channel]);
|
|
16704
|
+
useEffect51(() => setLocalTo(to || []), [to]);
|
|
16705
|
+
useEffect51(() => setLocalCc(cc || []), [cc]);
|
|
16706
|
+
useEffect51(() => setLocalBcc(bcc || []), [bcc]);
|
|
16707
|
+
useEffect51(() => setLocalSubject(subject || ""), [subject]);
|
|
16708
|
+
useEffect51(() => setLocalBody(body || ""), [body]);
|
|
16709
|
+
useEffect51(() => setLocalBodyType(bodyType || "text"), [bodyType]);
|
|
16710
|
+
useEffect51(() => setLocalFrom(from || ""), [from]);
|
|
16711
|
+
useEffect51(() => setLocalReplyTo(replyTo || ""), [replyTo]);
|
|
16466
16712
|
const handleAddRecipient = (type) => {
|
|
16467
16713
|
const setter = type === "to" ? setLocalTo : type === "cc" ? setLocalCc : setLocalBcc;
|
|
16468
16714
|
const callback = type === "to" ? onToChange : type === "cc" ? onCcChange : onBccChange;
|
|
@@ -16970,7 +17216,7 @@ import React163, { useCallback as useCallback45 } from "react";
|
|
|
16970
17216
|
import { IconSettings as IconSettings9, IconShieldCheck as IconShieldCheck8, IconUser as IconUser10, IconContract as IconContract2, IconChecklist as IconChecklist6, IconClock as IconClock7 } from "@tabler/icons-react";
|
|
16971
17217
|
|
|
16972
17218
|
// src/mantine/blocks/claim/template/GeneralTab.tsx
|
|
16973
|
-
import React162, { useEffect as
|
|
17219
|
+
import React162, { useEffect as useEffect52, useState as useState65, useCallback as useCallback44, useMemo as useMemo53 } from "react";
|
|
16974
17220
|
var GeneralTab7 = ({
|
|
16975
17221
|
title,
|
|
16976
17222
|
description,
|
|
@@ -16985,10 +17231,10 @@ var GeneralTab7 = ({
|
|
|
16985
17231
|
}) => {
|
|
16986
17232
|
const [localTitle, setLocalTitle] = useState65(title || "");
|
|
16987
17233
|
const [localDescription, setLocalDescription] = useState65(description || "");
|
|
16988
|
-
|
|
17234
|
+
useEffect52(() => {
|
|
16989
17235
|
setLocalTitle(title || "");
|
|
16990
17236
|
}, [title]);
|
|
16991
|
-
|
|
17237
|
+
useEffect52(() => {
|
|
16992
17238
|
setLocalDescription(description || "");
|
|
16993
17239
|
}, [description]);
|
|
16994
17240
|
const parsedSelectedCollections = useMemo53(() => {
|
|
@@ -17130,7 +17376,7 @@ var ClaimTemplateView = ({ editor, block }) => {
|
|
|
17130
17376
|
};
|
|
17131
17377
|
|
|
17132
17378
|
// src/mantine/blocks/claim/flow/FlowView.tsx
|
|
17133
|
-
import React165, { useMemo as useMemo55, useRef as useRef14, useEffect as
|
|
17379
|
+
import React165, { useMemo as useMemo55, useRef as useRef14, useEffect as useEffect53, useCallback as useCallback46 } from "react";
|
|
17134
17380
|
import { Stack as Stack120, Text as Text96, Loader as Loader24, Center as Center11, Alert as Alert25 } from "@mantine/core";
|
|
17135
17381
|
import { IconAlertCircle as IconAlertCircle10 } from "@tabler/icons-react";
|
|
17136
17382
|
var ClaimFlowView = ({ editor, block }) => {
|
|
@@ -17161,7 +17407,7 @@ var ClaimFlowView = ({ editor, block }) => {
|
|
|
17161
17407
|
[flowNode, runtime, ucanService, invocationStore, userAddress, flowOwnerDid, flowUri, flowId, schemaVersion]
|
|
17162
17408
|
);
|
|
17163
17409
|
const executionRef = useRef14(executionValue);
|
|
17164
|
-
|
|
17410
|
+
useEffect53(() => {
|
|
17165
17411
|
executionRef.current = executionValue;
|
|
17166
17412
|
}, [executionValue]);
|
|
17167
17413
|
const execution = useMemo55(
|
|
@@ -17208,7 +17454,7 @@ var ClaimFlowView = ({ editor, block }) => {
|
|
|
17208
17454
|
const adminAddress = block.props.adminAddress || "";
|
|
17209
17455
|
const { collections, loading, error, refetch } = useCollections(did, selectedCollectionIds, block, editor);
|
|
17210
17456
|
const refetchRef = useRef14(refetch);
|
|
17211
|
-
|
|
17457
|
+
useEffect53(() => {
|
|
17212
17458
|
refetchRef.current = refetch;
|
|
17213
17459
|
}, [refetch]);
|
|
17214
17460
|
const stableRefetch = useCallback46(() => {
|
|
@@ -17296,14 +17542,14 @@ import React169 from "react";
|
|
|
17296
17542
|
import { createReactBlockSpec as createReactBlockSpec10 } from "@blocknote/react";
|
|
17297
17543
|
|
|
17298
17544
|
// src/mantine/blocks/visualization/VisualizationBlock.tsx
|
|
17299
|
-
import React168, { useMemo as useMemo56, useCallback as useCallback47, useRef as useRef15, useState as useState66, useEffect as
|
|
17545
|
+
import React168, { useMemo as useMemo56, useCallback as useCallback47, useRef as useRef15, useState as useState66, useEffect as useEffect54 } from "react";
|
|
17300
17546
|
import { Box as Box34, Stack as Stack121, Text as Text97, Paper as Paper12, Group as Group58 } from "@mantine/core";
|
|
17301
17547
|
function VisualizationBlock({ block, editor }) {
|
|
17302
17548
|
const { visualizationRenderer } = useBlocknoteContext();
|
|
17303
17549
|
const { vizType, config, title, preferences } = block.props;
|
|
17304
17550
|
const containerRef = useRef15(null);
|
|
17305
17551
|
const [hasValidDimensions, setHasValidDimensions] = useState66(false);
|
|
17306
|
-
|
|
17552
|
+
useEffect54(() => {
|
|
17307
17553
|
const container = containerRef.current;
|
|
17308
17554
|
if (!container) return;
|
|
17309
17555
|
const checkDimensions = () => {
|
|
@@ -17393,7 +17639,7 @@ import React172 from "react";
|
|
|
17393
17639
|
import { createReactBlockSpec as createReactBlockSpec11 } from "@blocknote/react";
|
|
17394
17640
|
|
|
17395
17641
|
// src/mantine/blocks/dynamicList/DynamicListBlock.tsx
|
|
17396
|
-
import React171, { useMemo as useMemo58, useState as useState68, useCallback as useCallback48, useEffect as
|
|
17642
|
+
import React171, { useMemo as useMemo58, useState as useState68, useCallback as useCallback48, useEffect as useEffect55, useRef as useRef16 } from "react";
|
|
17397
17643
|
import { Box as Box36, Stack as Stack123, Text as Text99, Paper as Paper14, Group as Group60, Button as Button33, ActionIcon as ActionIcon24, Tooltip as Tooltip12, Code as Code6, Flex as Flex30, Collapse as Collapse6, Title as Title6, Badge as Badge22, TextInput as TextInput6, CloseButton as CloseButton3, Select as Select3, Menu as Menu2 } from "@mantine/core";
|
|
17398
17644
|
import { useDisclosure as useDisclosure6 } from "@mantine/hooks";
|
|
17399
17645
|
import {
|
|
@@ -17658,7 +17904,7 @@ function DynamicListBlock({ block, editor }) {
|
|
|
17658
17904
|
const endIndex = startIndex + DEFAULT_PAGE_SIZE;
|
|
17659
17905
|
return allData.slice(startIndex, endIndex);
|
|
17660
17906
|
}, [allData, page]);
|
|
17661
|
-
|
|
17907
|
+
useEffect55(() => {
|
|
17662
17908
|
if (page > totalPages && totalPages > 0) {
|
|
17663
17909
|
setPage(1);
|
|
17664
17910
|
}
|
|
@@ -17819,7 +18065,7 @@ function DynamicListBlock({ block, editor }) {
|
|
|
17819
18065
|
return next;
|
|
17820
18066
|
});
|
|
17821
18067
|
}, []);
|
|
17822
|
-
|
|
18068
|
+
useEffect55(() => {
|
|
17823
18069
|
setPage(1);
|
|
17824
18070
|
}, [searchQuery]);
|
|
17825
18071
|
const formatValue2 = (value, type) => {
|
|
@@ -18077,14 +18323,14 @@ import React174, { useCallback as useCallback49 } from "react";
|
|
|
18077
18323
|
import { IconSettings as IconSettings10, IconShieldCheck as IconShieldCheck9 } from "@tabler/icons-react";
|
|
18078
18324
|
|
|
18079
18325
|
// src/mantine/blocks/domainCreator/template/GeneralTab.tsx
|
|
18080
|
-
import React173, { useEffect as
|
|
18326
|
+
import React173, { useEffect as useEffect56, useState as useState69 } from "react";
|
|
18081
18327
|
var GeneralTab8 = ({ title, description, icon: icon2, onTitleChange, onDescriptionChange, onIconChange }) => {
|
|
18082
18328
|
const [localTitle, setLocalTitle] = useState69(title || "");
|
|
18083
18329
|
const [localDescription, setLocalDescription] = useState69(description || "");
|
|
18084
18330
|
const [localIcon, setLocalIcon] = useState69(icon2 || "file-text");
|
|
18085
|
-
|
|
18086
|
-
|
|
18087
|
-
|
|
18331
|
+
useEffect56(() => setLocalTitle(title || ""), [title]);
|
|
18332
|
+
useEffect56(() => setLocalDescription(description || ""), [description]);
|
|
18333
|
+
useEffect56(() => setLocalIcon(icon2 || "file-text"), [icon2]);
|
|
18088
18334
|
return /* @__PURE__ */ React173.createElement(BaseSection, null, /* @__PURE__ */ React173.createElement(
|
|
18089
18335
|
BaseTextInput,
|
|
18090
18336
|
{
|
|
@@ -18168,7 +18414,7 @@ import { ActionIcon as ActionIcon25, Badge as Badge24, Group as Group63, Stack a
|
|
|
18168
18414
|
import { IconChevronRight as IconChevronRight6, IconCheck as IconCheck8, IconAlertCircle as IconAlertCircle12 } from "@tabler/icons-react";
|
|
18169
18415
|
|
|
18170
18416
|
// src/mantine/blocks/domainCreator/flow/DomainCreatorSurveyPanel.tsx
|
|
18171
|
-
import React176, { useCallback as useCallback50, useEffect as
|
|
18417
|
+
import React176, { useCallback as useCallback50, useEffect as useEffect57, useMemo as useMemo60, useRef as useRef17, useState as useState70 } from "react";
|
|
18172
18418
|
import { Alert as Alert26, Button as Button34, Group as Group62, Loader as Loader25, Stack as Stack125, Text as Text101 } from "@mantine/core";
|
|
18173
18419
|
import { useDebouncedCallback } from "@mantine/hooks";
|
|
18174
18420
|
import { IconAlertCircle as IconAlertCircle11, IconCheck as IconCheck7 } from "@tabler/icons-react";
|
|
@@ -18241,13 +18487,13 @@ var DomainCreatorSurveyPanel = ({ editor, block, onComplete, entityDid: existing
|
|
|
18241
18487
|
}
|
|
18242
18488
|
});
|
|
18243
18489
|
}, SYNC_DEBOUNCE_MS);
|
|
18244
|
-
|
|
18490
|
+
useEffect57(() => {
|
|
18245
18491
|
const answersJson = block.props.answers;
|
|
18246
18492
|
if (answersJson) {
|
|
18247
18493
|
syncPropToSurvey(answersJson);
|
|
18248
18494
|
}
|
|
18249
18495
|
}, [block.props.answers, syncPropToSurvey]);
|
|
18250
|
-
|
|
18496
|
+
useEffect57(() => {
|
|
18251
18497
|
const handleValueChanged = () => {
|
|
18252
18498
|
if (isUpdatingFromProp.current) return;
|
|
18253
18499
|
syncSurveyToProp(surveyModel.data);
|
|
@@ -18257,7 +18503,7 @@ var DomainCreatorSurveyPanel = ({ editor, block, onComplete, entityDid: existing
|
|
|
18257
18503
|
surveyModel.onValueChanged.remove(handleValueChanged);
|
|
18258
18504
|
};
|
|
18259
18505
|
}, [surveyModel, syncSurveyToProp]);
|
|
18260
|
-
|
|
18506
|
+
useEffect57(() => {
|
|
18261
18507
|
const needsSchema = !block.props.surveySchema;
|
|
18262
18508
|
const needsAnswers = !block.props.answers;
|
|
18263
18509
|
if (needsSchema || needsAnswers) {
|
|
@@ -18385,7 +18631,7 @@ var DomainCreatorSurveyPanel = ({ editor, block, onComplete, entityDid: existing
|
|
|
18385
18631
|
},
|
|
18386
18632
|
[processDomainCreation, onComplete, editor, block]
|
|
18387
18633
|
);
|
|
18388
|
-
|
|
18634
|
+
useEffect57(() => {
|
|
18389
18635
|
surveyModel.onComplete.add(handleSurveyComplete);
|
|
18390
18636
|
return () => {
|
|
18391
18637
|
surveyModel.onComplete.remove(handleSurveyComplete);
|
|
@@ -18528,7 +18774,7 @@ import React182, { useCallback as useCallback54, useMemo as useMemo63 } from "re
|
|
|
18528
18774
|
import { IconSettings as IconSettings11, IconVariable as IconVariable2, IconShieldCheck as IconShieldCheck10 } from "@tabler/icons-react";
|
|
18529
18775
|
|
|
18530
18776
|
// src/mantine/blocks/email/template/GeneralTab.tsx
|
|
18531
|
-
import React180, { useEffect as
|
|
18777
|
+
import React180, { useEffect as useEffect58, useState as useState72, useCallback as useCallback52, useRef as useRef18 } from "react";
|
|
18532
18778
|
import { Divider as Divider14, Loader as Loader26, Select as Select4, Stack as Stack127, Text as Text103 } from "@mantine/core";
|
|
18533
18779
|
|
|
18534
18780
|
// src/mantine/blocks/email/utils/extractHandlebars.ts
|
|
@@ -18575,14 +18821,14 @@ var GeneralTab9 = ({ editor, blockId, getCurrentBlock, onTitleChange, onTemplate
|
|
|
18575
18821
|
const [loadingTemplates, setLoadingTemplates] = useState72(false);
|
|
18576
18822
|
const [loadingContent, setLoadingContent] = useState72(false);
|
|
18577
18823
|
const [error, setError] = useState72(null);
|
|
18578
|
-
|
|
18824
|
+
useEffect58(() => {
|
|
18579
18825
|
const currentBlock = getCurrentBlock();
|
|
18580
18826
|
setLocalTitle(currentBlock.props.title || "");
|
|
18581
18827
|
setLocalTemplateName(currentBlock.props.templateName || "");
|
|
18582
18828
|
setLocalTo(currentBlock.props.to || "");
|
|
18583
18829
|
}, [getCurrentBlock]);
|
|
18584
18830
|
const hasLoadedTemplates = useRef18(false);
|
|
18585
|
-
|
|
18831
|
+
useEffect58(() => {
|
|
18586
18832
|
if (hasLoadedTemplates.current) return;
|
|
18587
18833
|
async function loadTemplates() {
|
|
18588
18834
|
if (!handlers.listEmailTemplates) {
|
|
@@ -18693,7 +18939,7 @@ var GeneralTab9 = ({ editor, blockId, getCurrentBlock, onTitleChange, onTemplate
|
|
|
18693
18939
|
};
|
|
18694
18940
|
|
|
18695
18941
|
// src/mantine/blocks/email/template/VariablesTab.tsx
|
|
18696
|
-
import React181, { useMemo as useMemo62, useCallback as useCallback53, useState as useState73, useEffect as
|
|
18942
|
+
import React181, { useMemo as useMemo62, useCallback as useCallback53, useState as useState73, useEffect as useEffect59 } from "react";
|
|
18697
18943
|
import { Alert as Alert27, Badge as Badge25, Divider as Divider15, Group as Group64, Stack as Stack128, Text as Text104 } from "@mantine/core";
|
|
18698
18944
|
import { IconInfoCircle as IconInfoCircle4, IconCheck as IconCheck9 } from "@tabler/icons-react";
|
|
18699
18945
|
var VariablesTab = ({ editor, blockId, getCurrentBlock, onVariablesChange }) => {
|
|
@@ -18714,7 +18960,7 @@ var VariablesTab = ({ editor, blockId, getCurrentBlock, onVariablesChange }) =>
|
|
|
18714
18960
|
}
|
|
18715
18961
|
}, [blockProps.variables]);
|
|
18716
18962
|
const [localMapping, setLocalMapping] = useState73(parsedVariableMapping);
|
|
18717
|
-
|
|
18963
|
+
useEffect59(() => {
|
|
18718
18964
|
const currentBlock = getCurrentBlock();
|
|
18719
18965
|
try {
|
|
18720
18966
|
const mapping = JSON.parse(currentBlock.props.variables || "{}");
|
|
@@ -19133,7 +19379,7 @@ import React188, { useCallback as useCallback56 } from "react";
|
|
|
19133
19379
|
import { IconSettings as IconSettings12 } from "@tabler/icons-react";
|
|
19134
19380
|
|
|
19135
19381
|
// src/mantine/blocks/protocolSelector/template/GeneralTab.tsx
|
|
19136
|
-
import React187, { useEffect as
|
|
19382
|
+
import React187, { useEffect as useEffect60, useMemo as useMemo66, useState as useState75 } from "react";
|
|
19137
19383
|
import { Divider as Divider17, Stack as Stack131, Text as Text107, PillsInput as PillsInput2, Pill as Pill2, Box as Box37 } from "@mantine/core";
|
|
19138
19384
|
var GeneralTab10 = ({ title, description, protocolDids, onTitleChange, onDescriptionChange, onProtocolDidsChange }) => {
|
|
19139
19385
|
const [localTitle, setLocalTitle] = useState75(title || "");
|
|
@@ -19147,10 +19393,10 @@ var GeneralTab10 = ({ title, description, protocolDids, onTitleChange, onDescrip
|
|
|
19147
19393
|
return [];
|
|
19148
19394
|
}
|
|
19149
19395
|
}, [protocolDids]);
|
|
19150
|
-
|
|
19396
|
+
useEffect60(() => {
|
|
19151
19397
|
setLocalTitle(title || "");
|
|
19152
19398
|
}, [title]);
|
|
19153
|
-
|
|
19399
|
+
useEffect60(() => {
|
|
19154
19400
|
setLocalDescription(description || "");
|
|
19155
19401
|
}, [description]);
|
|
19156
19402
|
const handleAddDid = () => {
|
|
@@ -19270,7 +19516,7 @@ import { Badge as Badge28, Box as Box40, Group as Group69, Stack as Stack134, Te
|
|
|
19270
19516
|
import { IconCircleDashed as IconCircleDashed3, IconChecks as IconChecks3 } from "@tabler/icons-react";
|
|
19271
19517
|
|
|
19272
19518
|
// src/mantine/blocks/protocolSelector/flow/ProtocolSelectionPanel.tsx
|
|
19273
|
-
import React191, { useState as useState76, useEffect as
|
|
19519
|
+
import React191, { useState as useState76, useEffect as useEffect61, useMemo as useMemo68, useCallback as useCallback57 } from "react";
|
|
19274
19520
|
import { Stack as Stack133, Text as Text109, Box as Box39, Group as Group68, Loader as Loader28 } from "@mantine/core";
|
|
19275
19521
|
|
|
19276
19522
|
// src/icons/EntityAvatar.tsx
|
|
@@ -19309,7 +19555,7 @@ var ProtocolSelectionPanel = ({ editor, block }) => {
|
|
|
19309
19555
|
}
|
|
19310
19556
|
}, [block.props.protocolDids]);
|
|
19311
19557
|
const [protocols, setProtocols] = useState76([]);
|
|
19312
|
-
|
|
19558
|
+
useEffect61(() => {
|
|
19313
19559
|
if (protocolDids.length === 0) {
|
|
19314
19560
|
setProtocols([]);
|
|
19315
19561
|
return;
|
|
@@ -19536,7 +19782,7 @@ import { Badge as Badge29, Group as Group70, Stack as Stack135, Text as Text112
|
|
|
19536
19782
|
import React196, { useCallback as useCallback58 } from "react";
|
|
19537
19783
|
|
|
19538
19784
|
// src/mantine/blocks/form/template/GeneralTab.tsx
|
|
19539
|
-
import React195, { useEffect as
|
|
19785
|
+
import React195, { useEffect as useEffect62, useState as useState77 } from "react";
|
|
19540
19786
|
import { Text as Text111 } from "@mantine/core";
|
|
19541
19787
|
var GeneralTab11 = ({ title, description, icon: icon2, surveySchema, onTitleChange, onDescriptionChange, onIconChange, onSurveySchemaChange }) => {
|
|
19542
19788
|
const [localTitle, setLocalTitle] = useState77(title || "");
|
|
@@ -19544,10 +19790,10 @@ var GeneralTab11 = ({ title, description, icon: icon2, surveySchema, onTitleChan
|
|
|
19544
19790
|
const [localIcon, setLocalIcon] = useState77(icon2 || "checklist");
|
|
19545
19791
|
const [localSchema, setLocalSchema] = useState77(surveySchema || "");
|
|
19546
19792
|
const [schemaError, setSchemaError] = useState77(null);
|
|
19547
|
-
|
|
19548
|
-
|
|
19549
|
-
|
|
19550
|
-
|
|
19793
|
+
useEffect62(() => setLocalTitle(title || ""), [title]);
|
|
19794
|
+
useEffect62(() => setLocalDescription(description || ""), [description]);
|
|
19795
|
+
useEffect62(() => setLocalIcon(icon2 || "checklist"), [icon2]);
|
|
19796
|
+
useEffect62(() => setLocalSchema(surveySchema || ""), [surveySchema]);
|
|
19551
19797
|
const handleSchemaChange = (value) => {
|
|
19552
19798
|
setLocalSchema(value);
|
|
19553
19799
|
setSchemaError(null);
|
|
@@ -19668,7 +19914,7 @@ import { ActionIcon as ActionIcon27, Badge as Badge30, Group as Group71, Stack a
|
|
|
19668
19914
|
import { IconChevronRight as IconChevronRight7 } from "@tabler/icons-react";
|
|
19669
19915
|
|
|
19670
19916
|
// src/mantine/blocks/form/flow/FormPanel.tsx
|
|
19671
|
-
import React198, { useCallback as useCallback59, useEffect as
|
|
19917
|
+
import React198, { useCallback as useCallback59, useEffect as useEffect63, useMemo as useMemo71, useRef as useRef19 } from "react";
|
|
19672
19918
|
import { Alert as Alert29, Text as Text113, useComputedColorScheme as useComputedColorScheme2 } from "@mantine/core";
|
|
19673
19919
|
import { useDebouncedCallback as useDebouncedCallback2 } from "@mantine/hooks";
|
|
19674
19920
|
import { IconAlertCircle as IconAlertCircle13 } from "@tabler/icons-react";
|
|
@@ -19743,13 +19989,13 @@ var FormPanel = ({ editor, block, onComplete }) => {
|
|
|
19743
19989
|
output: { ...runtime.output, form: { ...runtime.output?.form, answers: newAnswersJson } }
|
|
19744
19990
|
});
|
|
19745
19991
|
}, SYNC_DEBOUNCE_MS2);
|
|
19746
|
-
|
|
19992
|
+
useEffect63(() => {
|
|
19747
19993
|
const answersJson = runtime.output?.form?.answers;
|
|
19748
19994
|
if (answersJson) {
|
|
19749
19995
|
syncPropToSurvey(answersJson);
|
|
19750
19996
|
}
|
|
19751
19997
|
}, [runtime.output?.form?.answers, syncPropToSurvey]);
|
|
19752
|
-
|
|
19998
|
+
useEffect63(() => {
|
|
19753
19999
|
if (!surveyModel) return;
|
|
19754
20000
|
const handleValueChanged = () => {
|
|
19755
20001
|
if (isUpdatingFromProp.current) return;
|
|
@@ -19774,7 +20020,7 @@ var FormPanel = ({ editor, block, onComplete }) => {
|
|
|
19774
20020
|
},
|
|
19775
20021
|
[updateRuntime, onComplete]
|
|
19776
20022
|
);
|
|
19777
|
-
|
|
20023
|
+
useEffect63(() => {
|
|
19778
20024
|
if (!surveyModel) return;
|
|
19779
20025
|
surveyModel.onComplete.add(handleSurveyComplete);
|
|
19780
20026
|
return () => {
|
|
@@ -19888,14 +20134,14 @@ import React203, { useCallback as useCallback61 } from "react";
|
|
|
19888
20134
|
import { IconSettings as IconSettings14, IconContract as IconContract3, IconClock as IconClock8 } from "@tabler/icons-react";
|
|
19889
20135
|
|
|
19890
20136
|
// src/mantine/blocks/domainCreatorSign/template/GeneralTab.tsx
|
|
19891
|
-
import React202, { useEffect as
|
|
20137
|
+
import React202, { useEffect as useEffect64, useState as useState79 } from "react";
|
|
19892
20138
|
var GeneralTab12 = ({ title, description, icon: icon2, onTitleChange, onDescriptionChange, onIconChange }) => {
|
|
19893
20139
|
const [localTitle, setLocalTitle] = useState79(title || "");
|
|
19894
20140
|
const [localDescription, setLocalDescription] = useState79(description || "");
|
|
19895
20141
|
const [localIcon, setLocalIcon] = useState79(icon2 || "file-text");
|
|
19896
|
-
|
|
19897
|
-
|
|
19898
|
-
|
|
20142
|
+
useEffect64(() => setLocalTitle(title || ""), [title]);
|
|
20143
|
+
useEffect64(() => setLocalDescription(description || ""), [description]);
|
|
20144
|
+
useEffect64(() => setLocalIcon(icon2 || "file-text"), [icon2]);
|
|
19899
20145
|
return /* @__PURE__ */ React202.createElement(BaseSection, null, /* @__PURE__ */ React202.createElement(
|
|
19900
20146
|
BaseTextInput,
|
|
19901
20147
|
{
|
|
@@ -19980,7 +20226,7 @@ var DomainCreatorSignTemplateView = ({ editor, block }) => {
|
|
|
19980
20226
|
};
|
|
19981
20227
|
|
|
19982
20228
|
// src/mantine/blocks/domainCreatorSign/flow/FlowView.tsx
|
|
19983
|
-
import React208, { useCallback as useCallback63, useMemo as useMemo74, useEffect as
|
|
20229
|
+
import React208, { useCallback as useCallback63, useMemo as useMemo74, useEffect as useEffect65 } from "react";
|
|
19984
20230
|
import { ActionIcon as ActionIcon28, Badge as Badge33, Group as Group74, Stack as Stack140, Text as Text119, Tooltip as Tooltip18 } from "@mantine/core";
|
|
19985
20231
|
import { IconChevronRight as IconChevronRight8 } from "@tabler/icons-react";
|
|
19986
20232
|
|
|
@@ -20330,7 +20576,7 @@ var DomainCreatorSignFlowView = ({ editor, block }) => {
|
|
|
20330
20576
|
const domainCardData = block.props.domainCardData || "{}";
|
|
20331
20577
|
const isDataReady = isDomainCardDataReady(domainCardData);
|
|
20332
20578
|
const status = runtimeState === "completed" ? "completed" : runtimeState === "failed" ? "error" : runtimeState === "running" ? runtime.output?.domain?.step || "signing" : isDataReady ? "ready" : "pending";
|
|
20333
|
-
|
|
20579
|
+
useEffect65(() => {
|
|
20334
20580
|
if (!runtimeState && isDataReady) {
|
|
20335
20581
|
updateRuntime({ state: "idle" });
|
|
20336
20582
|
}
|
|
@@ -20488,14 +20734,14 @@ import { Badge as Badge34, Group as Group75, Stack as Stack141, Text as Text120
|
|
|
20488
20734
|
import React212, { useCallback as useCallback64 } from "react";
|
|
20489
20735
|
|
|
20490
20736
|
// src/mantine/blocks/domainCardViewer/template/GeneralTab.tsx
|
|
20491
|
-
import React211, { useEffect as
|
|
20737
|
+
import React211, { useEffect as useEffect66, useState as useState83 } from "react";
|
|
20492
20738
|
var GeneralTab13 = ({ title, description, icon: icon2, onTitleChange, onDescriptionChange, onIconChange }) => {
|
|
20493
20739
|
const [localTitle, setLocalTitle] = useState83(title || "");
|
|
20494
20740
|
const [localDescription, setLocalDescription] = useState83(description || "");
|
|
20495
20741
|
const [localIcon, setLocalIcon] = useState83(icon2 || "dots-circle");
|
|
20496
|
-
|
|
20497
|
-
|
|
20498
|
-
|
|
20742
|
+
useEffect66(() => setLocalTitle(title || ""), [title]);
|
|
20743
|
+
useEffect66(() => setLocalDescription(description || ""), [description]);
|
|
20744
|
+
useEffect66(() => setLocalIcon(icon2 || "dots-circle"), [icon2]);
|
|
20499
20745
|
return /* @__PURE__ */ React211.createElement(BaseSection, null, /* @__PURE__ */ React211.createElement(
|
|
20500
20746
|
BaseTextInput,
|
|
20501
20747
|
{
|
|
@@ -20583,7 +20829,7 @@ var DomainCardViewerTemplateView = ({ editor, block }) => {
|
|
|
20583
20829
|
};
|
|
20584
20830
|
|
|
20585
20831
|
// src/mantine/blocks/domainCardViewer/flow/FlowView.tsx
|
|
20586
|
-
import React215, { useMemo as useMemo77, useCallback as useCallback65, useEffect as
|
|
20832
|
+
import React215, { useMemo as useMemo77, useCallback as useCallback65, useEffect as useEffect67 } from "react";
|
|
20587
20833
|
import { ActionIcon as ActionIcon29, Badge as Badge35, Button as Button38, Group as Group76, Stack as Stack143, Text as Text122, Tooltip as Tooltip19 } from "@mantine/core";
|
|
20588
20834
|
import { IconChevronRight as IconChevronRight9, IconLoader, IconTestPipe, IconTrash as IconTrash5 } from "@tabler/icons-react";
|
|
20589
20835
|
|
|
@@ -20898,7 +21144,7 @@ var DomainCardViewerFlowView = ({ editor, block }) => {
|
|
|
20898
21144
|
const status = block.props.status || "pending";
|
|
20899
21145
|
const domainPreviewData = block.props.domainPreviewData || "{}";
|
|
20900
21146
|
const isDataReady = isPreviewDataReady(domainPreviewData);
|
|
20901
|
-
|
|
21147
|
+
useEffect67(() => {
|
|
20902
21148
|
if (status === "pending" && isDataReady) {
|
|
20903
21149
|
editor.updateBlock(block, {
|
|
20904
21150
|
props: {
|
|
@@ -21055,7 +21301,7 @@ import React221, { useCallback as useCallback68 } from "react";
|
|
|
21055
21301
|
import { IconSettings as IconSettings16, IconBolt as IconBolt6, IconShieldCheck as IconShieldCheck11 } from "@tabler/icons-react";
|
|
21056
21302
|
|
|
21057
21303
|
// src/mantine/blocks/governanceGroup/template/GeneralTab.tsx
|
|
21058
|
-
import React218, { useEffect as
|
|
21304
|
+
import React218, { useEffect as useEffect68, useState as useState84 } from "react";
|
|
21059
21305
|
import { Card as Card19, SimpleGrid as SimpleGrid2, Stack as Stack144, Text as Text123, ThemeIcon as ThemeIcon3 } from "@mantine/core";
|
|
21060
21306
|
import { IconUsers as IconUsers3, IconSignature, IconPhoto as IconPhoto2, IconCoin } from "@tabler/icons-react";
|
|
21061
21307
|
|
|
@@ -21098,9 +21344,9 @@ var GeneralTab14 = ({ title, description, icon: icon2, groupType, onTitleChange,
|
|
|
21098
21344
|
const [localTitle, setLocalTitle] = useState84(title || "");
|
|
21099
21345
|
const [localDescription, setLocalDescription] = useState84(description || "");
|
|
21100
21346
|
const [localIcon, setLocalIcon] = useState84(icon2 || "users");
|
|
21101
|
-
|
|
21102
|
-
|
|
21103
|
-
|
|
21347
|
+
useEffect68(() => setLocalTitle(title || ""), [title]);
|
|
21348
|
+
useEffect68(() => setLocalDescription(description || ""), [description]);
|
|
21349
|
+
useEffect68(() => setLocalIcon(icon2 || "users"), [icon2]);
|
|
21104
21350
|
return /* @__PURE__ */ React218.createElement(BaseSection, null, /* @__PURE__ */ React218.createElement(Stack144, { gap: "md" }, /* @__PURE__ */ React218.createElement(Text123, { size: "sm", fw: 500 }, "Group Type"), /* @__PURE__ */ React218.createElement(SimpleGrid2, { cols: 2, spacing: "sm" }, GROUP_TYPE_CONFIGS.map((config) => {
|
|
21105
21351
|
const isSelected = groupType === config.type;
|
|
21106
21352
|
return /* @__PURE__ */ React218.createElement(
|
|
@@ -21162,12 +21408,12 @@ var GeneralTab14 = ({ title, description, icon: icon2, groupType, onTitleChange,
|
|
|
21162
21408
|
};
|
|
21163
21409
|
|
|
21164
21410
|
// src/mantine/components/HookedActionsTab/HookedActionsTab.tsx
|
|
21165
|
-
import React220, { useCallback as useCallback67, useMemo as useMemo78, useEffect as
|
|
21411
|
+
import React220, { useCallback as useCallback67, useMemo as useMemo78, useEffect as useEffect70, useState as useState86 } from "react";
|
|
21166
21412
|
import { Stack as Stack146, Text as Text125, Alert as Alert32, Accordion as Accordion4, Group as Group78, Badge as Badge37, Menu as Menu3, Button as Button39 } from "@mantine/core";
|
|
21167
21413
|
import { IconPlus as IconPlus5, IconMail as IconMail5, IconLink as IconLink3 } from "@tabler/icons-react";
|
|
21168
21414
|
|
|
21169
21415
|
// src/mantine/components/HookedActionsTab/ActionInstanceCard.tsx
|
|
21170
|
-
import React219, { useCallback as useCallback66, useState as useState85, useEffect as
|
|
21416
|
+
import React219, { useCallback as useCallback66, useState as useState85, useEffect as useEffect69 } from "react";
|
|
21171
21417
|
import { Card as Card20, Stack as Stack145, Group as Group77, Text as Text124, ActionIcon as ActionIcon30, Switch as Switch5, Badge as Badge36, Divider as Divider18, Loader as Loader31 } from "@mantine/core";
|
|
21172
21418
|
import { IconTrash as IconTrash6, IconMail as IconMail4, IconLink as IconLink2 } from "@tabler/icons-react";
|
|
21173
21419
|
var getActionIcon = (type) => {
|
|
@@ -21186,7 +21432,7 @@ var ActionInstanceCard = ({ instance, actionType, payloadFields, availableBlocks
|
|
|
21186
21432
|
const [loadingTemplates, setLoadingTemplates] = useState85(false);
|
|
21187
21433
|
const [templateVariables, setTemplateVariables] = useState85([]);
|
|
21188
21434
|
const [loadingVariables, setLoadingVariables] = useState85(false);
|
|
21189
|
-
|
|
21435
|
+
useEffect69(() => {
|
|
21190
21436
|
if (instance.type === "sendEmail" && handlers.listEmailTemplates) {
|
|
21191
21437
|
setLoadingTemplates(true);
|
|
21192
21438
|
handlers.listEmailTemplates({}).then((response) => {
|
|
@@ -21199,7 +21445,7 @@ var ActionInstanceCard = ({ instance, actionType, payloadFields, availableBlocks
|
|
|
21199
21445
|
}).catch(console.error).finally(() => setLoadingTemplates(false));
|
|
21200
21446
|
}
|
|
21201
21447
|
}, [instance.type, handlers.listEmailTemplates]);
|
|
21202
|
-
|
|
21448
|
+
useEffect69(() => {
|
|
21203
21449
|
const templateName = instance.config.templateName;
|
|
21204
21450
|
if (instance.type === "sendEmail" && templateName && handlers.getEmailTemplate) {
|
|
21205
21451
|
setLoadingVariables(true);
|
|
@@ -21406,11 +21652,11 @@ function ensureActionTypesRegistered() {
|
|
|
21406
21652
|
}
|
|
21407
21653
|
var HookedActionsTab = ({ editor, block, blockActions, hookedActions, onHookedActionsChange }) => {
|
|
21408
21654
|
const handlers = useBlocknoteHandlers();
|
|
21409
|
-
|
|
21655
|
+
useEffect70(() => {
|
|
21410
21656
|
ensureActionTypesRegistered();
|
|
21411
21657
|
}, []);
|
|
21412
21658
|
const [dynamicFields, setDynamicFields] = useState86({});
|
|
21413
|
-
|
|
21659
|
+
useEffect70(() => {
|
|
21414
21660
|
const blockProps = block?.props || {};
|
|
21415
21661
|
let cancelled = false;
|
|
21416
21662
|
const resolveAll = async () => {
|
|
@@ -22416,12 +22662,12 @@ var GovernanceGroupTemplateView = ({ editor, block }) => {
|
|
|
22416
22662
|
};
|
|
22417
22663
|
|
|
22418
22664
|
// src/mantine/blocks/governanceGroup/flow/FlowView.tsx
|
|
22419
|
-
import React224, { useCallback as useCallback70, useEffect as
|
|
22665
|
+
import React224, { useCallback as useCallback70, useEffect as useEffect72, useMemo as useMemo81, useRef as useRef21, useState as useState88 } from "react";
|
|
22420
22666
|
import { ActionIcon as ActionIcon31, Badge as Badge39, Group as Group81, Stack as Stack149, Text as Text128, Tooltip as Tooltip20 } from "@mantine/core";
|
|
22421
22667
|
import { IconChevronRight as IconChevronRight10 } from "@tabler/icons-react";
|
|
22422
22668
|
|
|
22423
22669
|
// src/mantine/blocks/governanceGroup/flow/GovernanceGroupPanel.tsx
|
|
22424
|
-
import React223, { useCallback as useCallback69, useEffect as
|
|
22670
|
+
import React223, { useCallback as useCallback69, useEffect as useEffect71, useMemo as useMemo80, useRef as useRef20, useState as useState87 } from "react";
|
|
22425
22671
|
import { Alert as Alert33, Button as Button40, Card as Card21, Group as Group80, Loader as Loader32, SimpleGrid as SimpleGrid3, Stack as Stack148, Text as Text127, ThemeIcon as ThemeIcon4, useComputedColorScheme as useComputedColorScheme3 } from "@mantine/core";
|
|
22426
22672
|
import { useDebouncedCallback as useDebouncedCallback3 } from "@mantine/hooks";
|
|
22427
22673
|
import { IconAlertCircle as IconAlertCircle16, IconCheck as IconCheck13, IconUsers as IconUsers4, IconSignature as IconSignature2, IconPhoto as IconPhoto3, IconCoin as IconCoin2, IconArrowLeft as IconArrowLeft5 } from "@tabler/icons-react";
|
|
@@ -22511,13 +22757,13 @@ var GovernanceGroupPanel = ({ editor, block, onComplete }) => {
|
|
|
22511
22757
|
}
|
|
22512
22758
|
});
|
|
22513
22759
|
}, SYNC_DEBOUNCE_MS3);
|
|
22514
|
-
|
|
22760
|
+
useEffect71(() => {
|
|
22515
22761
|
const answersJson = block.props.answers;
|
|
22516
22762
|
if (answersJson && surveyModel) {
|
|
22517
22763
|
syncPropToSurvey(answersJson);
|
|
22518
22764
|
}
|
|
22519
22765
|
}, [block.props.answers, syncPropToSurvey, surveyModel]);
|
|
22520
|
-
|
|
22766
|
+
useEffect71(() => {
|
|
22521
22767
|
if (!surveyModel) return;
|
|
22522
22768
|
const handleValueChanged = () => {
|
|
22523
22769
|
if (isUpdatingFromProp.current) return;
|
|
@@ -22601,7 +22847,7 @@ var GovernanceGroupPanel = ({ editor, block, onComplete }) => {
|
|
|
22601
22847
|
},
|
|
22602
22848
|
[processGroupCreation, onComplete, editor, block, selectedGroupType]
|
|
22603
22849
|
);
|
|
22604
|
-
|
|
22850
|
+
useEffect71(() => {
|
|
22605
22851
|
if (!surveyModel) return;
|
|
22606
22852
|
surveyModel.onComplete.add(handleSurveyComplete);
|
|
22607
22853
|
return () => {
|
|
@@ -22678,7 +22924,7 @@ var GovernanceGroupFlowView = ({ editor, block }) => {
|
|
|
22678
22924
|
const hasExistingSubmission = lastSubmission?.coreAddress;
|
|
22679
22925
|
const editorRef = useRef21(editor);
|
|
22680
22926
|
const blockRef = useRef21(block);
|
|
22681
|
-
|
|
22927
|
+
useEffect72(() => {
|
|
22682
22928
|
editorRef.current = editor;
|
|
22683
22929
|
blockRef.current = block;
|
|
22684
22930
|
});
|
|
@@ -22719,7 +22965,7 @@ var GovernanceGroupFlowView = ({ editor, block }) => {
|
|
|
22719
22965
|
});
|
|
22720
22966
|
setSubmissionStatus("success");
|
|
22721
22967
|
}, []);
|
|
22722
|
-
|
|
22968
|
+
useEffect72(() => {
|
|
22723
22969
|
handleCompleteRef.current = handleComplete;
|
|
22724
22970
|
});
|
|
22725
22971
|
const stableHandleComplete = useCallback70(
|
|
@@ -22845,7 +23091,7 @@ var GeneralTab15 = ({ title, description, icon: icon2, onTitleChange, onDescript
|
|
|
22845
23091
|
};
|
|
22846
23092
|
|
|
22847
23093
|
// src/mantine/blocks/flowLink/template/LinksTab.tsx
|
|
22848
|
-
import React228, { useEffect as
|
|
23094
|
+
import React228, { useEffect as useEffect73, useMemo as useMemo82, useState as useState89 } from "react";
|
|
22849
23095
|
import { Stack as Stack151, Card as Card22, Group as Group82, ActionIcon as ActionIcon32, Text as Text129, Divider as Divider19 } from "@mantine/core";
|
|
22850
23096
|
import { IconPlus as IconPlus6, IconTrash as IconTrash7, IconGripVertical } from "@tabler/icons-react";
|
|
22851
23097
|
import { DndContext, PointerSensor, useSensor, useSensors, closestCenter, useDraggable, useDroppable } from "@dnd-kit/core";
|
|
@@ -22869,7 +23115,7 @@ function generateId(prefix) {
|
|
|
22869
23115
|
// src/mantine/blocks/flowLink/template/LinksTab.tsx
|
|
22870
23116
|
var DraggableLinkCard = ({ link, index, onRemove, onUpdate }) => {
|
|
22871
23117
|
const [localUrl, setLocalUrl] = useState89(link.url || "");
|
|
22872
|
-
|
|
23118
|
+
useEffect73(() => {
|
|
22873
23119
|
setLocalUrl(link.url || "");
|
|
22874
23120
|
}, [link.url]);
|
|
22875
23121
|
const { attributes, listeners, setNodeRef: setDragRef, transform, isDragging } = useDraggable({ id: link.id });
|
|
@@ -23012,7 +23258,7 @@ import React232, { useMemo as useMemo84 } from "react";
|
|
|
23012
23258
|
import { Badge as Badge41, Group as Group85, Stack as Stack154, Text as Text132, Tooltip as Tooltip22 } from "@mantine/core";
|
|
23013
23259
|
|
|
23014
23260
|
// src/mantine/blocks/flowLink/flow/FlowLinkPanel.tsx
|
|
23015
|
-
import React231, { useState as useState90, useEffect as
|
|
23261
|
+
import React231, { useState as useState90, useEffect as useEffect74, useCallback as useCallback71 } from "react";
|
|
23016
23262
|
import { Stack as Stack153, Text as Text131, Card as Card23, Group as Group84, Badge as Badge40, ActionIcon as ActionIcon33, Loader as Loader33, Tooltip as Tooltip21 } from "@mantine/core";
|
|
23017
23263
|
import { IconRefresh as IconRefresh6, IconCheck as IconCheck14, IconClock as IconClock10, IconCircleDashed as IconCircleDashed4 } from "@tabler/icons-react";
|
|
23018
23264
|
var FlowLinkPanel = ({ editor, block }) => {
|
|
@@ -23040,7 +23286,7 @@ var FlowLinkPanel = ({ editor, block }) => {
|
|
|
23040
23286
|
);
|
|
23041
23287
|
setLinksWithStatus(updatedLinks);
|
|
23042
23288
|
}, [handlers, links]);
|
|
23043
|
-
|
|
23289
|
+
useEffect74(() => {
|
|
23044
23290
|
fetchStatuses();
|
|
23045
23291
|
}, []);
|
|
23046
23292
|
const handleNavigate = (link) => {
|
|
@@ -23194,7 +23440,7 @@ import { Stack as Stack157 } from "@mantine/core";
|
|
|
23194
23440
|
import { IconCheck as IconCheck15, IconClock as IconClock11, IconContract as IconContract4, IconSettings as IconSettings18, IconShieldCheck as IconShieldCheck13, IconUserCheck as IconUserCheck4 } from "@tabler/icons-react";
|
|
23195
23441
|
|
|
23196
23442
|
// src/mantine/blocks/action/template/GeneralTab.tsx
|
|
23197
|
-
import React236, { useEffect as
|
|
23443
|
+
import React236, { useEffect as useEffect75, useMemo as useMemo85, useState as useState91 } from "react";
|
|
23198
23444
|
import { Group as Group87, Stack as Stack156, Text as Text134, Button as Button41, ActionIcon as ActionIcon34, Paper as Paper16, Select as Select5, Box as Box43 } from "@mantine/core";
|
|
23199
23445
|
import {
|
|
23200
23446
|
IconMail as IconMail6,
|
|
@@ -23460,8 +23706,8 @@ var GeneralTab16 = ({
|
|
|
23460
23706
|
}) => {
|
|
23461
23707
|
const [localTitle, setLocalTitle] = useState91(title || "");
|
|
23462
23708
|
const [localDescription, setLocalDescription] = useState91(description || "");
|
|
23463
|
-
|
|
23464
|
-
|
|
23709
|
+
useEffect75(() => setLocalTitle(title || ""), [title]);
|
|
23710
|
+
useEffect75(() => setLocalDescription(description || ""), [description]);
|
|
23465
23711
|
const actionTypeOptions = useMemo85(() => {
|
|
23466
23712
|
return getAllActions().map((a) => {
|
|
23467
23713
|
const m = getActionMeta(a.type);
|
|
@@ -23647,7 +23893,7 @@ function BarrierSourcesEditor({
|
|
|
23647
23893
|
}
|
|
23648
23894
|
function GenericInputsEditor({ inputs, onInputsChange, editor, blockId }) {
|
|
23649
23895
|
const [localInputs, setLocalInputs] = useState91(() => parseInputPairs(inputs));
|
|
23650
|
-
|
|
23896
|
+
useEffect75(() => setLocalInputs(parseInputPairs(inputs)), [inputs]);
|
|
23651
23897
|
const handleAddInput = () => {
|
|
23652
23898
|
const updated = [...localInputs, { key: "", value: "" }];
|
|
23653
23899
|
setLocalInputs(updated);
|
|
@@ -23855,16 +24101,16 @@ var ActionTemplateView = ({ editor, block }) => {
|
|
|
23855
24101
|
};
|
|
23856
24102
|
|
|
23857
24103
|
// src/mantine/blocks/action/flow/FlowView.tsx
|
|
23858
|
-
import React242, { useCallback as useCallback75, useEffect as
|
|
24104
|
+
import React242, { useCallback as useCallback75, useEffect as useEffect79, useMemo as useMemo90, useRef as useRef23, useState as useState95 } from "react";
|
|
23859
24105
|
import { Group as Group91, Stack as Stack161, Text as Text139, Code as Code8, Alert as Alert35, Box as Box47, Divider as Divider20, Button as Button43, Loader as Loader34 } from "@mantine/core";
|
|
23860
24106
|
import { IconAlertTriangle as IconAlertTriangle4, IconUser as IconUser13, IconBolt as IconBolt9, IconShieldCheck as IconShieldCheck14, IconPlayerPlay as IconPlayerPlay2 } from "@tabler/icons-react";
|
|
23861
24107
|
|
|
23862
24108
|
// src/mantine/hooks/useAutoCommitOnExecute.ts
|
|
23863
|
-
import { useEffect as
|
|
24109
|
+
import { useEffect as useEffect76, useRef as useRef22 } from "react";
|
|
23864
24110
|
function useAutoCommitOnExecute(editor, block, runtimeState) {
|
|
23865
24111
|
const handlers = useBlocknoteHandlers();
|
|
23866
24112
|
const prevState = useRef22(runtimeState);
|
|
23867
|
-
|
|
24113
|
+
useEffect76(() => {
|
|
23868
24114
|
const wasCompleted = prevState.current === "completed";
|
|
23869
24115
|
prevState.current = runtimeState;
|
|
23870
24116
|
if (runtimeState !== "completed" || wasCompleted) return;
|
|
@@ -24070,7 +24316,7 @@ import React240 from "react";
|
|
|
24070
24316
|
import { Text as Text137 } from "@mantine/core";
|
|
24071
24317
|
|
|
24072
24318
|
// src/mantine/blocks/action/diff/useActionDiff.ts
|
|
24073
|
-
import { useState as useState93, useEffect as
|
|
24319
|
+
import { useState as useState93, useEffect as useEffect77, useCallback as useCallback73, useMemo as useMemo88 } from "react";
|
|
24074
24320
|
function useActionDiff({ actionType, inputs, actorDid = "", entityDid }) {
|
|
24075
24321
|
const [diffs, setDiffs] = useState93([]);
|
|
24076
24322
|
const [error, setError] = useState93();
|
|
@@ -24087,7 +24333,7 @@ function useActionDiff({ actionType, inputs, actorDid = "", entityDid }) {
|
|
|
24087
24333
|
}
|
|
24088
24334
|
}, [inputs]);
|
|
24089
24335
|
const refetch = useCallback73(() => setFetchKey((k) => k + 1), []);
|
|
24090
|
-
|
|
24336
|
+
useEffect77(() => {
|
|
24091
24337
|
if (!hasResolver) return;
|
|
24092
24338
|
const registration = getDiffResolver(actionType);
|
|
24093
24339
|
if (!registration) return;
|
|
@@ -24118,13 +24364,13 @@ function useActionDiff({ actionType, inputs, actorDid = "", entityDid }) {
|
|
|
24118
24364
|
}
|
|
24119
24365
|
|
|
24120
24366
|
// src/mantine/blocks/action/PendingInvocationList.tsx
|
|
24121
|
-
import React241, { useEffect as
|
|
24367
|
+
import React241, { useEffect as useEffect78, useState as useState94, useMemo as useMemo89, useCallback as useCallback74 } from "react";
|
|
24122
24368
|
import { Stack as Stack160, Group as Group90, Text as Text138, Box as Box46, Badge as Badge43, Button as Button42, Paper as Paper17, ActionIcon as ActionIcon35, Tooltip as Tooltip23 } from "@mantine/core";
|
|
24123
24369
|
import { IconBolt as IconBolt8, IconRefresh as IconRefresh7, IconX as IconX13 } from "@tabler/icons-react";
|
|
24124
24370
|
var PendingInvocationList = ({ editor, blockId, actionType: _actionType, onInvoke }) => {
|
|
24125
24371
|
const yDoc = editor?._yDoc;
|
|
24126
24372
|
const [pendings, setPendings] = useState94([]);
|
|
24127
|
-
|
|
24373
|
+
useEffect78(() => {
|
|
24128
24374
|
if (!yDoc) return;
|
|
24129
24375
|
const outer = yDoc.getMap("pendingInvocations");
|
|
24130
24376
|
const refresh = () => {
|
|
@@ -24350,7 +24596,7 @@ function ActionPanelContent({
|
|
|
24350
24596
|
},
|
|
24351
24597
|
[updateRuntime]
|
|
24352
24598
|
);
|
|
24353
|
-
|
|
24599
|
+
useEffect79(() => {
|
|
24354
24600
|
if (runtime.state !== "completed" || !invokingId) return;
|
|
24355
24601
|
handlePendingInvocationCompleted(invokingId);
|
|
24356
24602
|
}, [runtime.state, invokingId, handlePendingInvocationCompleted]);
|
|
@@ -24595,7 +24841,7 @@ function GenericFlowPanel({
|
|
|
24595
24841
|
}
|
|
24596
24842
|
|
|
24597
24843
|
// src/mantine/blocks/action/actionTypes/pod/domainIndexerLookup/DomainIndexerLookupConfig.tsx
|
|
24598
|
-
import React243, { useCallback as useCallback76, useEffect as
|
|
24844
|
+
import React243, { useCallback as useCallback76, useEffect as useEffect80, useState as useState96 } from "react";
|
|
24599
24845
|
import { Stack as Stack162, Text as Text140 } from "@mantine/core";
|
|
24600
24846
|
|
|
24601
24847
|
// src/mantine/blocks/action/actionTypes/pod/types.ts
|
|
@@ -24622,7 +24868,7 @@ function parseJsonSafe(json, fallback) {
|
|
|
24622
24868
|
var DEFAULT = { agentMessage: "", userMessage: "" };
|
|
24623
24869
|
var DomainIndexerLookupConfig = ({ inputs, onInputsChange }) => {
|
|
24624
24870
|
const [local, setLocal] = useState96(() => parseJsonSafe(inputs, DEFAULT));
|
|
24625
|
-
|
|
24871
|
+
useEffect80(() => {
|
|
24626
24872
|
setLocal(parseJsonSafe(inputs, DEFAULT));
|
|
24627
24873
|
}, [inputs]);
|
|
24628
24874
|
const update = useCallback76(
|
|
@@ -24702,12 +24948,12 @@ registerActionTypeUI("qi/pod.domain-indexer-lookup", {
|
|
|
24702
24948
|
});
|
|
24703
24949
|
|
|
24704
24950
|
// src/mantine/blocks/action/actionTypes/pod/domainSingleSelection/DomainSingleSelectionConfig.tsx
|
|
24705
|
-
import React245, { useCallback as useCallback78, useEffect as
|
|
24951
|
+
import React245, { useCallback as useCallback78, useEffect as useEffect81, useState as useState98 } from "react";
|
|
24706
24952
|
import { Stack as Stack164, Text as Text142 } from "@mantine/core";
|
|
24707
24953
|
var DEFAULT2 = { filter: "", blueprintDids: [] };
|
|
24708
24954
|
var DomainSingleSelectionConfig = ({ inputs, onInputsChange }) => {
|
|
24709
24955
|
const [local, setLocal] = useState98(() => parseJsonSafe(inputs, DEFAULT2));
|
|
24710
|
-
|
|
24956
|
+
useEffect81(() => {
|
|
24711
24957
|
setLocal(parseJsonSafe(inputs, DEFAULT2));
|
|
24712
24958
|
}, [inputs]);
|
|
24713
24959
|
const update = useCallback78(
|
|
@@ -24727,12 +24973,12 @@ import { Alert as Alert37, Box as Box48, Group as Group92, Loader as Loader36, S
|
|
|
24727
24973
|
import { IconAlertCircle as IconAlertCircle18 } from "@tabler/icons-react";
|
|
24728
24974
|
|
|
24729
24975
|
// src/mantine/hooks/useEntities.ts
|
|
24730
|
-
import { useEffect as
|
|
24976
|
+
import { useEffect as useEffect82, useState as useState99 } from "react";
|
|
24731
24977
|
var EMPTY = { query: "", results: [], status: "idle", updatedAt: "" };
|
|
24732
24978
|
function useEntities(editor) {
|
|
24733
24979
|
const yDoc = editor?._yRuntime?.doc;
|
|
24734
24980
|
const [state, setState] = useState99(EMPTY);
|
|
24735
|
-
|
|
24981
|
+
useEffect82(() => {
|
|
24736
24982
|
if (!yDoc) {
|
|
24737
24983
|
setState(EMPTY);
|
|
24738
24984
|
return;
|
|
@@ -24825,12 +25071,12 @@ registerActionTypeUI("qi/pod.domain-single-selection", {
|
|
|
24825
25071
|
});
|
|
24826
25072
|
|
|
24827
25073
|
// src/mantine/blocks/action/actionTypes/pod/entitySingleSelection/EntitySingleSelectionConfig.tsx
|
|
24828
|
-
import React247, { useCallback as useCallback80, useEffect as
|
|
25074
|
+
import React247, { useCallback as useCallback80, useEffect as useEffect83, useState as useState100 } from "react";
|
|
24829
25075
|
import { Stack as Stack166, Text as Text144 } from "@mantine/core";
|
|
24830
25076
|
var DEFAULT3 = { did: "", role: "controller" };
|
|
24831
25077
|
var EntitySingleSelectionConfig = ({ inputs, onInputsChange }) => {
|
|
24832
25078
|
const [local, setLocal] = useState100(() => parseJsonSafe(inputs, DEFAULT3));
|
|
24833
|
-
|
|
25079
|
+
useEffect83(() => {
|
|
24834
25080
|
setLocal(parseJsonSafe(inputs, DEFAULT3));
|
|
24835
25081
|
}, [inputs]);
|
|
24836
25082
|
const update = useCallback80(
|
|
@@ -24845,7 +25091,7 @@ var EntitySingleSelectionConfig = ({ inputs, onInputsChange }) => {
|
|
|
24845
25091
|
};
|
|
24846
25092
|
|
|
24847
25093
|
// src/mantine/blocks/action/actionTypes/pod/entitySingleSelection/EntitySingleSelectionFlowDetail.tsx
|
|
24848
|
-
import React248, { useCallback as useCallback81, useEffect as
|
|
25094
|
+
import React248, { useCallback as useCallback81, useEffect as useEffect84, useState as useState101 } from "react";
|
|
24849
25095
|
import { ActionIcon as ActionIcon36, Alert as Alert38, Badge as Badge44, Box as Box49, Button as Button45, Group as Group93, Loader as Loader37, Stack as Stack167, Text as Text145, Tooltip as Tooltip24 } from "@mantine/core";
|
|
24850
25096
|
import { IconRefresh as IconRefresh8 } from "@tabler/icons-react";
|
|
24851
25097
|
var ALLOWED_TYPES = ["dao", "dao/pod"];
|
|
@@ -24902,7 +25148,7 @@ var EntitySingleSelectionFlowDetail = ({ block, runtime, updateRuntime, isDisabl
|
|
|
24902
25148
|
setLoading(false);
|
|
24903
25149
|
}
|
|
24904
25150
|
}, [handlers]);
|
|
24905
|
-
|
|
25151
|
+
useEffect84(() => {
|
|
24906
25152
|
loadEntities();
|
|
24907
25153
|
}, [loadEntities]);
|
|
24908
25154
|
const handleSelect = useCallback81(
|
|
@@ -24960,12 +25206,12 @@ registerActionTypeUI("qi/pod.entity-single-selection", {
|
|
|
24960
25206
|
});
|
|
24961
25207
|
|
|
24962
25208
|
// src/mantine/blocks/action/actionTypes/pod/memberMultiSelect/MemberMultiSelectConfig.tsx
|
|
24963
|
-
import React249, { useCallback as useCallback82, useEffect as
|
|
25209
|
+
import React249, { useCallback as useCallback82, useEffect as useEffect85, useState as useState102 } from "react";
|
|
24964
25210
|
import { Stack as Stack168, Text as Text146 } from "@mantine/core";
|
|
24965
25211
|
var DEFAULT4 = { entity: "", group: "" };
|
|
24966
25212
|
var MemberMultiSelectConfig = ({ inputs, onInputsChange }) => {
|
|
24967
25213
|
const [local, setLocal] = useState102(() => parseJsonSafe(inputs, DEFAULT4));
|
|
24968
|
-
|
|
25214
|
+
useEffect85(() => {
|
|
24969
25215
|
setLocal(parseJsonSafe(inputs, DEFAULT4));
|
|
24970
25216
|
}, [inputs]);
|
|
24971
25217
|
const update = useCallback82(
|
|
@@ -25358,12 +25604,12 @@ registerActionTypeUI("qi/pod.member-multi-select", {
|
|
|
25358
25604
|
});
|
|
25359
25605
|
|
|
25360
25606
|
// src/mantine/blocks/action/actionTypes/pod/governanceConfig/GovernanceConfigConfig.tsx
|
|
25361
|
-
import React251, { useCallback as useCallback84, useEffect as
|
|
25607
|
+
import React251, { useCallback as useCallback84, useEffect as useEffect86, useState as useState104 } from "react";
|
|
25362
25608
|
import { Stack as Stack170, Text as Text148 } from "@mantine/core";
|
|
25363
25609
|
var DEFAULT5 = { kind: "" };
|
|
25364
25610
|
var GovernanceConfigConfig = ({ inputs, onInputsChange }) => {
|
|
25365
25611
|
const [local, setLocal] = useState104(() => parseJsonSafe(inputs, DEFAULT5));
|
|
25366
|
-
|
|
25612
|
+
useEffect86(() => {
|
|
25367
25613
|
setLocal(parseJsonSafe(inputs, DEFAULT5));
|
|
25368
25614
|
}, [inputs]);
|
|
25369
25615
|
const update = useCallback84(
|
|
@@ -25677,12 +25923,12 @@ registerActionTypeUI("qi/pod.governance-config", {
|
|
|
25677
25923
|
});
|
|
25678
25924
|
|
|
25679
25925
|
// src/mantine/blocks/action/actionTypes/pod/listDomainFlows/ListDomainFlowsConfig.tsx
|
|
25680
|
-
import React253, { useCallback as useCallback86, useEffect as
|
|
25926
|
+
import React253, { useCallback as useCallback86, useEffect as useEffect87, useState as useState106 } from "react";
|
|
25681
25927
|
import { Stack as Stack172, Text as Text150 } from "@mantine/core";
|
|
25682
25928
|
var DEFAULT6 = { entity: "" };
|
|
25683
25929
|
var ListDomainFlowsConfig = ({ inputs, onInputsChange }) => {
|
|
25684
25930
|
const [local, setLocal] = useState106(() => parseJsonSafe(inputs, DEFAULT6));
|
|
25685
|
-
|
|
25931
|
+
useEffect87(() => {
|
|
25686
25932
|
setLocal(parseJsonSafe(inputs, DEFAULT6));
|
|
25687
25933
|
}, [inputs]);
|
|
25688
25934
|
const update = useCallback86(
|
|
@@ -25697,7 +25943,7 @@ var ListDomainFlowsConfig = ({ inputs, onInputsChange }) => {
|
|
|
25697
25943
|
};
|
|
25698
25944
|
|
|
25699
25945
|
// src/mantine/blocks/action/actionTypes/pod/listDomainFlows/ListDomainFlowsFlowDetail.tsx
|
|
25700
|
-
import React254, { useCallback as useCallback87, useEffect as
|
|
25946
|
+
import React254, { useCallback as useCallback87, useEffect as useEffect88, useState as useState107 } from "react";
|
|
25701
25947
|
import { Alert as Alert41, Badge as Badge46, Box as Box51, Button as Button48, Checkbox as Checkbox12, Group as Group96, Loader as Loader39, Stack as Stack173, Text as Text151 } from "@mantine/core";
|
|
25702
25948
|
import { IconCheck as IconCheck18, IconLock } from "@tabler/icons-react";
|
|
25703
25949
|
var FLOW_TYPE = "Template";
|
|
@@ -25710,7 +25956,7 @@ var ListDomainFlowsFlowDetail = ({ inputs, block, runtime, updateRuntime, isDisa
|
|
|
25710
25956
|
const [loading, setLoading] = useState107(false);
|
|
25711
25957
|
const [error, setError] = useState107(null);
|
|
25712
25958
|
const confirmedIds = Array.isArray(runtime.output?.selectedFlowDids) ? runtime.output.selectedFlowDids : [];
|
|
25713
|
-
|
|
25959
|
+
useEffect88(() => {
|
|
25714
25960
|
if (!entityDid) return;
|
|
25715
25961
|
const loadFlows = async () => {
|
|
25716
25962
|
setLoading(true);
|
|
@@ -25793,12 +26039,12 @@ registerActionTypeUI("qi/pod.list-domain-flows", {
|
|
|
25793
26039
|
});
|
|
25794
26040
|
|
|
25795
26041
|
// src/mantine/blocks/action/actionTypes/httpRequest/HttpRequestConfig.tsx
|
|
25796
|
-
import React255, { useEffect as
|
|
26042
|
+
import React255, { useEffect as useEffect89, useState as useState108, useCallback as useCallback88 } from "react";
|
|
25797
26043
|
import { Stack as Stack174, Text as Text152, Button as Button49, Group as Group97, ActionIcon as ActionIcon38, Paper as Paper19, Alert as Alert42, Code as Code9 } from "@mantine/core";
|
|
25798
26044
|
import { IconTrash as IconTrash9, IconPlus as IconPlus8, IconInfoCircle as IconInfoCircle5 } from "@tabler/icons-react";
|
|
25799
26045
|
var HttpRequestConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
25800
26046
|
const [local, setLocal] = useState108(() => parseHttpRequestInputs(inputs));
|
|
25801
|
-
|
|
26047
|
+
useEffect89(() => {
|
|
25802
26048
|
setLocal(parseHttpRequestInputs(inputs));
|
|
25803
26049
|
}, [inputs]);
|
|
25804
26050
|
const update = useCallback88(
|
|
@@ -26086,7 +26332,7 @@ registerActionTypeUI("qi/http.request", {
|
|
|
26086
26332
|
});
|
|
26087
26333
|
|
|
26088
26334
|
// src/mantine/blocks/action/actionTypes/emailSend/EmailSendConfig.tsx
|
|
26089
|
-
import React257, { useCallback as useCallback89, useEffect as
|
|
26335
|
+
import React257, { useCallback as useCallback89, useEffect as useEffect90, useRef as useRef25, useState as useState110, useMemo as useMemo94 } from "react";
|
|
26090
26336
|
import { Alert as Alert44, Badge as Badge48, Group as Group99, Loader as Loader41, Stack as Stack176, Text as Text154 } from "@mantine/core";
|
|
26091
26337
|
import { IconCheck as IconCheck19, IconInfoCircle as IconInfoCircle6 } from "@tabler/icons-react";
|
|
26092
26338
|
|
|
@@ -26123,7 +26369,7 @@ function serializeEmailSendInputs(inputs) {
|
|
|
26123
26369
|
var EmailSendConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
26124
26370
|
const handlers = useBlocknoteHandlers();
|
|
26125
26371
|
const [local, setLocal] = useState110(() => parseEmailSendInputs(inputs));
|
|
26126
|
-
|
|
26372
|
+
useEffect90(() => {
|
|
26127
26373
|
setLocal(parseEmailSendInputs(inputs));
|
|
26128
26374
|
}, [inputs]);
|
|
26129
26375
|
const update = useCallback89(
|
|
@@ -26139,7 +26385,7 @@ var EmailSendConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
26139
26385
|
const [loadingContent, setLoadingContent] = useState110(false);
|
|
26140
26386
|
const [templateError, setTemplateError] = useState110(null);
|
|
26141
26387
|
const hasLoadedTemplates = useRef25(false);
|
|
26142
|
-
|
|
26388
|
+
useEffect90(() => {
|
|
26143
26389
|
if (hasLoadedTemplates.current) return;
|
|
26144
26390
|
async function loadTemplates() {
|
|
26145
26391
|
if (!handlers.listEmailTemplates) {
|
|
@@ -26268,7 +26514,7 @@ registerActionTypeUI("qi/email.send", {
|
|
|
26268
26514
|
});
|
|
26269
26515
|
|
|
26270
26516
|
// src/mantine/blocks/action/actionTypes/bid/BidConfig.tsx
|
|
26271
|
-
import React258, { useCallback as useCallback90, useEffect as
|
|
26517
|
+
import React258, { useCallback as useCallback90, useEffect as useEffect91, useMemo as useMemo95, useState as useState111 } from "react";
|
|
26272
26518
|
import { Alert as Alert45, Button as Button50, Loader as Loader42, Stack as Stack177, Text as Text155 } from "@mantine/core";
|
|
26273
26519
|
import { IconInfoCircle as IconInfoCircle7 } from "@tabler/icons-react";
|
|
26274
26520
|
|
|
@@ -26299,7 +26545,7 @@ var BidConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
26299
26545
|
const [collections, setCollections] = useState111([]);
|
|
26300
26546
|
const [loadingCollections, setLoadingCollections] = useState111(false);
|
|
26301
26547
|
const [error, setError] = useState111(null);
|
|
26302
|
-
|
|
26548
|
+
useEffect91(() => {
|
|
26303
26549
|
setLocal(parseBidActionInputs(inputs));
|
|
26304
26550
|
}, [inputs]);
|
|
26305
26551
|
const update = useCallback90(
|
|
@@ -26393,7 +26639,7 @@ var BidConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
26393
26639
|
};
|
|
26394
26640
|
|
|
26395
26641
|
// src/mantine/blocks/action/actionTypes/bid/BidFlowDetail.tsx
|
|
26396
|
-
import React260, { useCallback as useCallback91, useEffect as
|
|
26642
|
+
import React260, { useCallback as useCallback91, useEffect as useEffect92, useMemo as useMemo96, useRef as useRef26, useState as useState112 } from "react";
|
|
26397
26643
|
import { Alert as Alert46, Loader as Loader43, Stack as Stack178, Text as Text156 } from "@mantine/core";
|
|
26398
26644
|
import { IconPlayerPlay as IconPlayerPlay3 } from "@tabler/icons-react";
|
|
26399
26645
|
import { SurveyModel as SurveyModel9 } from "@ixo/surveys";
|
|
@@ -26417,7 +26663,7 @@ var BidFlowDetail = ({
|
|
|
26417
26663
|
const t = useTranslate();
|
|
26418
26664
|
const handlers = useBlocknoteHandlers();
|
|
26419
26665
|
const handlersRef = useRef26(handlers);
|
|
26420
|
-
|
|
26666
|
+
useEffect92(() => {
|
|
26421
26667
|
handlersRef.current = handlers;
|
|
26422
26668
|
}, [handlers]);
|
|
26423
26669
|
const services = useMemo96(() => buildServicesFromHandlers(handlers), [handlers]);
|
|
@@ -26470,7 +26716,7 @@ var BidFlowDetail = ({
|
|
|
26470
26716
|
}
|
|
26471
26717
|
return model;
|
|
26472
26718
|
}, [surveyJson, provideSigningHandler]);
|
|
26473
|
-
|
|
26719
|
+
useEffect92(() => {
|
|
26474
26720
|
if (!surveyModel) {
|
|
26475
26721
|
setSurveyReady(false);
|
|
26476
26722
|
return void 0;
|
|
@@ -26513,11 +26759,11 @@ var BidFlowDetail = ({
|
|
|
26513
26759
|
setLoadingSurvey(false);
|
|
26514
26760
|
}
|
|
26515
26761
|
}, [role, deedDid, collectionId]);
|
|
26516
|
-
|
|
26762
|
+
useEffect92(() => {
|
|
26517
26763
|
setSurveyJson(null);
|
|
26518
26764
|
setError(null);
|
|
26519
26765
|
}, [role, deedDid, collectionId]);
|
|
26520
|
-
|
|
26766
|
+
useEffect92(() => {
|
|
26521
26767
|
let mounted = true;
|
|
26522
26768
|
const fetchApplicationState = async () => {
|
|
26523
26769
|
if (!deedDid || !collectionId || !actorDid) {
|
|
@@ -26564,12 +26810,30 @@ var BidFlowDetail = ({
|
|
|
26564
26810
|
const isApproved = userRole === "SA" /* ServiceProvider */ || userRole === "EA" /* Evaluator */;
|
|
26565
26811
|
const isPending = !isApproved && !!userBid;
|
|
26566
26812
|
const canSubmit = !isPending && !isApproved;
|
|
26567
|
-
|
|
26813
|
+
useEffect92(() => {
|
|
26568
26814
|
unlockSigning?.(canSubmit && surveyReady);
|
|
26569
26815
|
}, [unlockSigning, canSubmit, surveyReady]);
|
|
26570
|
-
|
|
26816
|
+
useEffect92(() => {
|
|
26571
26817
|
registerRuntimeInputs?.({ role, surveyStarted: !!surveyJson });
|
|
26572
26818
|
}, [registerRuntimeInputs, role, surveyJson]);
|
|
26819
|
+
useRegisterOpenSurvey({
|
|
26820
|
+
id: `bid:${block.id}:${role}:new`,
|
|
26821
|
+
title: `Submit Bid${role === "service_agent" ? " \u2014 Service Agent" : " \u2014 Evaluation Agent"}`,
|
|
26822
|
+
source: "panel",
|
|
26823
|
+
schema: surveyJson,
|
|
26824
|
+
context: {
|
|
26825
|
+
flowType: "bid-submission",
|
|
26826
|
+
blockId: block.id,
|
|
26827
|
+
blockTitle: block?.props?.title,
|
|
26828
|
+
blockType: "action",
|
|
26829
|
+
deedId: deedDid,
|
|
26830
|
+
collectionId,
|
|
26831
|
+
role,
|
|
26832
|
+
...getFlowRoomContext(editor)
|
|
26833
|
+
},
|
|
26834
|
+
model: surveyModel,
|
|
26835
|
+
enabled: !!surveyModel && canSubmit
|
|
26836
|
+
});
|
|
26573
26837
|
const handleSurveyComplete = useCallback91(
|
|
26574
26838
|
async (sender) => {
|
|
26575
26839
|
if (!canSubmit) {
|
|
@@ -26684,14 +26948,14 @@ var BidFlowDetail = ({
|
|
|
26684
26948
|
updateRuntime
|
|
26685
26949
|
]
|
|
26686
26950
|
);
|
|
26687
|
-
|
|
26951
|
+
useEffect92(() => {
|
|
26688
26952
|
if (!surveyModel) return void 0;
|
|
26689
26953
|
surveyModel.onComplete.add(handleSurveyComplete);
|
|
26690
26954
|
return () => {
|
|
26691
26955
|
surveyModel.onComplete.remove(handleSurveyComplete);
|
|
26692
26956
|
};
|
|
26693
26957
|
}, [surveyModel, handleSurveyComplete]);
|
|
26694
|
-
|
|
26958
|
+
useEffect92(() => {
|
|
26695
26959
|
return attachSurveyAnalytics({
|
|
26696
26960
|
model: surveyModel,
|
|
26697
26961
|
handlers,
|
|
@@ -26709,7 +26973,7 @@ var BidFlowDetail = ({
|
|
|
26709
26973
|
}
|
|
26710
26974
|
});
|
|
26711
26975
|
}, [surveyModel, handlers, editor, deedDid, collectionId, role, block.id, block?.props?.title]);
|
|
26712
|
-
|
|
26976
|
+
useEffect92(() => {
|
|
26713
26977
|
if (!provideSigningHandler || !surveyModel) return;
|
|
26714
26978
|
provideSigningHandler(async () => {
|
|
26715
26979
|
surveyModel.tryComplete();
|
|
@@ -26750,7 +27014,7 @@ registerActionTypeUI("qi/bid.submit", {
|
|
|
26750
27014
|
});
|
|
26751
27015
|
|
|
26752
27016
|
// src/mantine/blocks/action/actionTypes/evaluateBid/EvaluateBidConfig.tsx
|
|
26753
|
-
import React261, { useCallback as useCallback92, useEffect as
|
|
27017
|
+
import React261, { useCallback as useCallback92, useEffect as useEffect93, useMemo as useMemo97, useState as useState113 } from "react";
|
|
26754
27018
|
import { Alert as Alert47, Button as Button51, Loader as Loader44, Stack as Stack179 } from "@mantine/core";
|
|
26755
27019
|
|
|
26756
27020
|
// src/mantine/blocks/action/actionTypes/evaluateBid/types.ts
|
|
@@ -26780,7 +27044,7 @@ var EvaluateBidConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
26780
27044
|
const [collections, setCollections] = useState113([]);
|
|
26781
27045
|
const [loadingCollections, setLoadingCollections] = useState113(false);
|
|
26782
27046
|
const [error, setError] = useState113(null);
|
|
26783
|
-
|
|
27047
|
+
useEffect93(() => {
|
|
26784
27048
|
setLocal(parseEvaluateBidActionInputs(inputs));
|
|
26785
27049
|
}, [inputs]);
|
|
26786
27050
|
const update = useCallback92(
|
|
@@ -26872,7 +27136,7 @@ var EvaluateBidConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
26872
27136
|
};
|
|
26873
27137
|
|
|
26874
27138
|
// src/mantine/blocks/action/actionTypes/evaluateBid/EvaluateBidFlowDetail.tsx
|
|
26875
|
-
import React263, { useCallback as useCallback93, useEffect as
|
|
27139
|
+
import React263, { useCallback as useCallback93, useEffect as useEffect94, useMemo as useMemo98, useRef as useRef27, useState as useState115 } from "react";
|
|
26876
27140
|
import { ActionIcon as ActionIcon40, Alert as Alert48, Badge as Badge49, Box as Box53, Button as Button52, Divider as Divider21, Group as Group101, JsonInput, Loader as Loader45, Stack as Stack180, Text as Text158, UnstyledButton as UnstyledButton4 } from "@mantine/core";
|
|
26877
27141
|
import { IconArrowLeft as IconArrowLeft7, IconCheck as IconCheck20, IconFilter } from "@tabler/icons-react";
|
|
26878
27142
|
|
|
@@ -26964,7 +27228,7 @@ var EvaluateBidFlowDetail = ({
|
|
|
26964
27228
|
const t = useTranslate();
|
|
26965
27229
|
const handlers = useBlocknoteHandlers();
|
|
26966
27230
|
const handlersRef = useRef27(handlers);
|
|
26967
|
-
|
|
27231
|
+
useEffect94(() => {
|
|
26968
27232
|
handlersRef.current = handlers;
|
|
26969
27233
|
}, [handlers]);
|
|
26970
27234
|
const services = useMemo98(() => buildServicesFromHandlers(handlers), [handlers]);
|
|
@@ -27029,21 +27293,21 @@ var EvaluateBidFlowDetail = ({
|
|
|
27029
27293
|
setLoadingBids(false);
|
|
27030
27294
|
}
|
|
27031
27295
|
}, [deedDid, collectionId, selectedBidId]);
|
|
27032
|
-
|
|
27296
|
+
useEffect94(() => {
|
|
27033
27297
|
setSelectedBidId("");
|
|
27034
27298
|
setRejectReason("");
|
|
27035
27299
|
setError(null);
|
|
27036
27300
|
}, [deedDid, collectionId]);
|
|
27037
|
-
|
|
27301
|
+
useEffect94(() => {
|
|
27038
27302
|
setDecision("");
|
|
27039
27303
|
setRejectReason("");
|
|
27040
27304
|
setPaymentRows([createPaymentRow()]);
|
|
27041
27305
|
}, [selectedBidId]);
|
|
27042
|
-
|
|
27306
|
+
useEffect94(() => {
|
|
27043
27307
|
if (!deedDid || !collectionId) return;
|
|
27044
27308
|
refreshBids();
|
|
27045
27309
|
}, [deedDid, collectionId, refreshBids]);
|
|
27046
|
-
|
|
27310
|
+
useEffect94(() => {
|
|
27047
27311
|
let mounted = true;
|
|
27048
27312
|
const dids = Array.from(new Set(bids.map((bid) => bid.did).filter(Boolean)));
|
|
27049
27313
|
const missing = dids.filter((did) => !profilesByDid[did]);
|
|
@@ -27096,7 +27360,7 @@ var EvaluateBidFlowDetail = ({
|
|
|
27096
27360
|
return { denom, amount: String(row.amount) };
|
|
27097
27361
|
}).filter((entry) => !!entry);
|
|
27098
27362
|
}, [paymentRows]);
|
|
27099
|
-
|
|
27363
|
+
useEffect94(() => {
|
|
27100
27364
|
if (!registerRuntimeInputs) return;
|
|
27101
27365
|
if (!selectedBid) {
|
|
27102
27366
|
registerRuntimeInputs({ bidId: "", decision: "", role: "", applicantDid: "", applicantAddress: "", adminAddress: "" });
|
|
@@ -27115,7 +27379,7 @@ var EvaluateBidFlowDetail = ({
|
|
|
27115
27379
|
maxAmounts: selectedBidIsEvaluator ? JSON.stringify(buildMaxAmounts()) : void 0
|
|
27116
27380
|
});
|
|
27117
27381
|
}, [registerRuntimeInputs, selectedBid, decision, adminAddress, rejectReason, buildMaxAmounts]);
|
|
27118
|
-
|
|
27382
|
+
useEffect94(() => {
|
|
27119
27383
|
if (!unlockSigning) return;
|
|
27120
27384
|
if (!selectedBid || !decision) {
|
|
27121
27385
|
unlockSigning(false);
|
|
@@ -27131,7 +27395,7 @@ var EvaluateBidFlowDetail = ({
|
|
|
27131
27395
|
unlockSigning(false);
|
|
27132
27396
|
}
|
|
27133
27397
|
}, [unlockSigning, selectedBid, decision, adminAddress, rejectReason]);
|
|
27134
|
-
|
|
27398
|
+
useEffect94(() => {
|
|
27135
27399
|
if (!provideSigningHandler || !selectedBid || !decision) return;
|
|
27136
27400
|
provideSigningHandler(async () => {
|
|
27137
27401
|
const selectedRole = String(selectedBid.role || "").toLowerCase();
|
|
@@ -27391,7 +27655,7 @@ registerActionTypeUI("qi/bid.evaluate", {
|
|
|
27391
27655
|
});
|
|
27392
27656
|
|
|
27393
27657
|
// src/mantine/blocks/action/actionTypes/claim/ClaimConfig.tsx
|
|
27394
|
-
import React264, { useCallback as useCallback94, useEffect as
|
|
27658
|
+
import React264, { useCallback as useCallback94, useEffect as useEffect95, useMemo as useMemo99, useRef as useRef28, useState as useState116 } from "react";
|
|
27395
27659
|
import { Alert as Alert49, Button as Button53, Loader as Loader46, Stack as Stack181, Text as Text159 } from "@mantine/core";
|
|
27396
27660
|
|
|
27397
27661
|
// src/mantine/blocks/action/actionTypes/claim/types.ts
|
|
@@ -27424,10 +27688,10 @@ var ClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
27424
27688
|
const [loadingCollections, setLoadingCollections] = useState116(false);
|
|
27425
27689
|
const [error, setError] = useState116(null);
|
|
27426
27690
|
const localRef = useRef28(local);
|
|
27427
|
-
|
|
27691
|
+
useEffect95(() => {
|
|
27428
27692
|
localRef.current = local;
|
|
27429
27693
|
}, [local]);
|
|
27430
|
-
|
|
27694
|
+
useEffect95(() => {
|
|
27431
27695
|
const parsed = parseClaimActionInputs(inputs);
|
|
27432
27696
|
setLocal(parsed);
|
|
27433
27697
|
localRef.current = parsed;
|
|
@@ -27470,7 +27734,7 @@ var ClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
27470
27734
|
},
|
|
27471
27735
|
[handlers, update]
|
|
27472
27736
|
);
|
|
27473
|
-
|
|
27737
|
+
useEffect95(() => {
|
|
27474
27738
|
if (local.deedDid.trim() && local.collectionId && local.surveyAnswersSchema.length === 0 && !schemaLoading) {
|
|
27475
27739
|
void materialiseSurveySchema(local.deedDid.trim(), local.collectionId);
|
|
27476
27740
|
}
|
|
@@ -27562,7 +27826,7 @@ var ClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
27562
27826
|
};
|
|
27563
27827
|
|
|
27564
27828
|
// src/mantine/blocks/action/actionTypes/claim/ClaimFlowDetail.tsx
|
|
27565
|
-
import React265, { useCallback as useCallback95, useEffect as
|
|
27829
|
+
import React265, { useCallback as useCallback95, useEffect as useEffect96, useMemo as useMemo100, useRef as useRef29, useState as useState117 } from "react";
|
|
27566
27830
|
import { ActionIcon as ActionIcon41, Alert as Alert50, Box as Box54, Group as Group102, Loader as Loader47, Stack as Stack182, Text as Text160 } from "@mantine/core";
|
|
27567
27831
|
import { IconArrowLeft as IconArrowLeft8, IconCheck as IconCheck21, IconPlayerPlay as IconPlayerPlay4 } from "@tabler/icons-react";
|
|
27568
27832
|
import { SurveyModel as SurveyModel10 } from "@ixo/surveys";
|
|
@@ -27608,7 +27872,7 @@ var ClaimFlowDetail = ({
|
|
|
27608
27872
|
const t = useTranslate();
|
|
27609
27873
|
const handlers = useBlocknoteHandlers();
|
|
27610
27874
|
const handlersRef = useRef29(handlers);
|
|
27611
|
-
|
|
27875
|
+
useEffect96(() => {
|
|
27612
27876
|
handlersRef.current = handlers;
|
|
27613
27877
|
}, [handlers]);
|
|
27614
27878
|
const services = useMemo100(() => buildServicesFromHandlers(handlers), [handlers]);
|
|
@@ -27690,15 +27954,32 @@ var ClaimFlowDetail = ({
|
|
|
27690
27954
|
model.data = selectedClaimData?.credentialSubject ?? selectedClaimData;
|
|
27691
27955
|
return model;
|
|
27692
27956
|
}, [surveyJson, selectedClaimData]);
|
|
27693
|
-
|
|
27957
|
+
useRegisterOpenSurvey({
|
|
27958
|
+
id: `claim-action:${block.id}:new`,
|
|
27959
|
+
title: `Submit Claim${block?.props?.title ? ` \u2014 ${block.props.title}` : ""}`,
|
|
27960
|
+
source: "panel",
|
|
27961
|
+
schema: surveyJson,
|
|
27962
|
+
context: {
|
|
27963
|
+
flowType: "claim-submission",
|
|
27964
|
+
blockId: block.id,
|
|
27965
|
+
blockTitle: block?.props?.title,
|
|
27966
|
+
blockType: "action",
|
|
27967
|
+
deedId: deedDid,
|
|
27968
|
+
collectionId,
|
|
27969
|
+
...getFlowRoomContext(editor)
|
|
27970
|
+
},
|
|
27971
|
+
model: surveyModel,
|
|
27972
|
+
enabled: !!surveyModel && !selectedClaimId
|
|
27973
|
+
});
|
|
27974
|
+
useEffect96(() => {
|
|
27694
27975
|
if (!registerRuntimeInputs) return;
|
|
27695
27976
|
registerRuntimeInputs({ adminAddress, claimStarted: !!surveyJson && !selectedClaimId });
|
|
27696
27977
|
}, [registerRuntimeInputs, adminAddress, surveyJson, selectedClaimId]);
|
|
27697
|
-
|
|
27978
|
+
useEffect96(() => {
|
|
27698
27979
|
if (!unlockSigning) return;
|
|
27699
27980
|
unlockSigning(isServiceAgentAuthorized && !!surveyModel && !!adminAddress && surveyComplete && !selectedClaimId);
|
|
27700
27981
|
}, [unlockSigning, isServiceAgentAuthorized, surveyModel, adminAddress, surveyComplete, selectedClaimId]);
|
|
27701
|
-
|
|
27982
|
+
useEffect96(() => {
|
|
27702
27983
|
if (!surveyModel) {
|
|
27703
27984
|
setSurveyComplete(false);
|
|
27704
27985
|
return;
|
|
@@ -27712,7 +27993,7 @@ var ClaimFlowDetail = ({
|
|
|
27712
27993
|
surveyModel.onCurrentPageChanged.remove(handler);
|
|
27713
27994
|
};
|
|
27714
27995
|
}, [surveyModel, checkSurveyCompleteness]);
|
|
27715
|
-
|
|
27996
|
+
useEffect96(() => {
|
|
27716
27997
|
if (!provideSigningHandler || !surveyModel) return;
|
|
27717
27998
|
provideSigningHandler(async () => {
|
|
27718
27999
|
surveyModel.tryComplete();
|
|
@@ -27749,17 +28030,17 @@ var ClaimFlowDetail = ({
|
|
|
27749
28030
|
setLoadingClaims(false);
|
|
27750
28031
|
}
|
|
27751
28032
|
}, [deedDid, collectionId, actorDid]);
|
|
27752
|
-
|
|
28033
|
+
useEffect96(() => {
|
|
27753
28034
|
setSurveyJson(null);
|
|
27754
28035
|
setPrefillData(null);
|
|
27755
28036
|
setSelectedClaimId("");
|
|
27756
28037
|
setError(null);
|
|
27757
28038
|
}, [deedDid, collectionId]);
|
|
27758
|
-
|
|
28039
|
+
useEffect96(() => {
|
|
27759
28040
|
if (!deedDid || !collectionId || !actorDid) return;
|
|
27760
28041
|
fetchClaimsAndAdmin();
|
|
27761
28042
|
}, [deedDid, collectionId, actorDid, fetchClaimsAndAdmin]);
|
|
27762
|
-
|
|
28043
|
+
useEffect96(() => {
|
|
27763
28044
|
let mounted = true;
|
|
27764
28045
|
const dids = Array.from(new Set(claims.map((claim) => claim.agentDid).filter(Boolean)));
|
|
27765
28046
|
const missing = dids.filter((did) => !profilesByDid[did]);
|
|
@@ -27795,7 +28076,7 @@ var ClaimFlowDetail = ({
|
|
|
27795
28076
|
mounted = false;
|
|
27796
28077
|
};
|
|
27797
28078
|
}, [claims, profilesByDid]);
|
|
27798
|
-
|
|
28079
|
+
useEffect96(() => {
|
|
27799
28080
|
let mounted = true;
|
|
27800
28081
|
const checkServiceAgentAuthorization = async () => {
|
|
27801
28082
|
const handlers2 = handlersRef.current;
|
|
@@ -27845,7 +28126,7 @@ var ClaimFlowDetail = ({
|
|
|
27845
28126
|
mounted = false;
|
|
27846
28127
|
};
|
|
27847
28128
|
}, [actorDid, adminAddress, deedDid, collectionId, authRetryKey]);
|
|
27848
|
-
|
|
28129
|
+
useEffect96(() => {
|
|
27849
28130
|
if (!selectedClaim) {
|
|
27850
28131
|
setSelectedClaimData(null);
|
|
27851
28132
|
setDisputeDetails(null);
|
|
@@ -28046,14 +28327,14 @@ var ClaimFlowDetail = ({
|
|
|
28046
28327
|
isServiceAgentAuthorized
|
|
28047
28328
|
]
|
|
28048
28329
|
);
|
|
28049
|
-
|
|
28330
|
+
useEffect96(() => {
|
|
28050
28331
|
if (!surveyModel) return void 0;
|
|
28051
28332
|
surveyModel.onComplete.add(handleSurveyComplete);
|
|
28052
28333
|
return () => {
|
|
28053
28334
|
surveyModel.onComplete.remove(handleSurveyComplete);
|
|
28054
28335
|
};
|
|
28055
28336
|
}, [surveyModel, handleSurveyComplete]);
|
|
28056
|
-
|
|
28337
|
+
useEffect96(() => {
|
|
28057
28338
|
return attachSurveyAnalytics({
|
|
28058
28339
|
model: surveyModel,
|
|
28059
28340
|
handlers,
|
|
@@ -28126,7 +28407,7 @@ registerActionTypeUI("qi/claim.submit", {
|
|
|
28126
28407
|
});
|
|
28127
28408
|
|
|
28128
28409
|
// src/mantine/blocks/action/actionTypes/evaluateClaim/EvaluateClaimConfig.tsx
|
|
28129
|
-
import React266, { useCallback as useCallback96, useEffect as
|
|
28410
|
+
import React266, { useCallback as useCallback96, useEffect as useEffect97, useMemo as useMemo101, useRef as useRef30, useState as useState118 } from "react";
|
|
28130
28411
|
import { Alert as Alert51, Button as Button54, Loader as Loader48, Stack as Stack183, Text as Text161 } from "@mantine/core";
|
|
28131
28412
|
|
|
28132
28413
|
// src/mantine/blocks/action/actionTypes/evaluateClaim/types.ts
|
|
@@ -28163,10 +28444,10 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
28163
28444
|
const [loadingCollections, setLoadingCollections] = useState118(false);
|
|
28164
28445
|
const [error, setError] = useState118(null);
|
|
28165
28446
|
const localRef = useRef30(local);
|
|
28166
|
-
|
|
28447
|
+
useEffect97(() => {
|
|
28167
28448
|
localRef.current = local;
|
|
28168
28449
|
}, [local]);
|
|
28169
|
-
|
|
28450
|
+
useEffect97(() => {
|
|
28170
28451
|
const parsed = parseEvaluateClaimActionInputs(inputs);
|
|
28171
28452
|
setLocal(parsed);
|
|
28172
28453
|
localRef.current = parsed;
|
|
@@ -28211,7 +28492,7 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
28211
28492
|
},
|
|
28212
28493
|
[handlers, update]
|
|
28213
28494
|
);
|
|
28214
|
-
|
|
28495
|
+
useEffect97(() => {
|
|
28215
28496
|
if (local.deedDid.trim() && local.collectionId && local.surveyAnswersSchema.length === 0 && !schemaLoading) {
|
|
28216
28497
|
void materialiseSurveySchema(local.deedDid.trim(), local.collectionId);
|
|
28217
28498
|
}
|
|
@@ -28343,13 +28624,13 @@ function buildBlockOptions(editorDocument, actionType, excludeBlockId) {
|
|
|
28343
28624
|
}
|
|
28344
28625
|
|
|
28345
28626
|
// src/mantine/blocks/action/actionTypes/evaluateClaim/EvaluateClaimFlowDetail.tsx
|
|
28346
|
-
import React269, { useCallback as useCallback98, useEffect as
|
|
28627
|
+
import React269, { useCallback as useCallback98, useEffect as useEffect99, useMemo as useMemo103, useRef as useRef32, useState as useState120 } from "react";
|
|
28347
28628
|
import { ActionIcon as ActionIcon42, Alert as Alert52, Box as Box57, Button as Button55, Checkbox as Checkbox13, Divider as Divider22, Group as Group105, Loader as Loader50, ScrollArea as ScrollArea8, Stack as Stack186, Text as Text164, UnstyledButton as UnstyledButton6 } from "@mantine/core";
|
|
28348
28629
|
import { IconArrowLeft as IconArrowLeft9, IconCheck as IconCheck22, IconFilter as IconFilter2 } from "@tabler/icons-react";
|
|
28349
28630
|
import { SurveyModel as SurveyModel11 } from "@ixo/surveys";
|
|
28350
28631
|
|
|
28351
28632
|
// src/mantine/blocks/action/actionTypes/evaluateClaim/ClaimAttachments.tsx
|
|
28352
|
-
import React268, { useCallback as useCallback97, useEffect as
|
|
28633
|
+
import React268, { useCallback as useCallback97, useEffect as useEffect98, useMemo as useMemo102, useRef as useRef31, useState as useState119 } from "react";
|
|
28353
28634
|
import { Box as Box56, Group as Group104, Loader as Loader49, SimpleGrid as SimpleGrid4, Stack as Stack185, Text as Text163, Tooltip as Tooltip25, UnstyledButton as UnstyledButton5 } from "@mantine/core";
|
|
28354
28635
|
import { IconFile as IconFile5, IconFileText as IconFileText6, IconMusic, IconPhoto as IconPhoto5, IconVideo } from "@tabler/icons-react";
|
|
28355
28636
|
|
|
@@ -28549,7 +28830,7 @@ var ClaimAttachments = ({ surveyModel, credentialSubject }) => {
|
|
|
28549
28830
|
const [openingKey, setOpeningKey] = useState119(null);
|
|
28550
28831
|
const cacheRef = useRef31(/* @__PURE__ */ new Map());
|
|
28551
28832
|
const inflightRef = useRef31(/* @__PURE__ */ new Map());
|
|
28552
|
-
|
|
28833
|
+
useEffect98(() => {
|
|
28553
28834
|
return () => {
|
|
28554
28835
|
for (const blobUrl of cacheRef.current.values()) URL.revokeObjectURL(blobUrl);
|
|
28555
28836
|
cacheRef.current.clear();
|
|
@@ -28619,7 +28900,7 @@ var ClaimAttachments = ({ surveyModel, credentialSubject }) => {
|
|
|
28619
28900
|
}
|
|
28620
28901
|
return result;
|
|
28621
28902
|
}, [surveyModel, credentialSubject]);
|
|
28622
|
-
|
|
28903
|
+
useEffect98(() => {
|
|
28623
28904
|
if (!fetchClaimMedia) return;
|
|
28624
28905
|
for (const item of items) {
|
|
28625
28906
|
if (isImage(item) && !cacheRef.current.has(item.content)) {
|
|
@@ -28745,7 +29026,7 @@ var EvaluateClaimFlowDetail = ({
|
|
|
28745
29026
|
const t = useTranslate();
|
|
28746
29027
|
const handlers = useBlocknoteHandlers();
|
|
28747
29028
|
const handlersRef = useRef32(handlers);
|
|
28748
|
-
|
|
29029
|
+
useEffect99(() => {
|
|
28749
29030
|
handlersRef.current = handlers;
|
|
28750
29031
|
}, [handlers]);
|
|
28751
29032
|
const services = useMemo103(() => buildServicesFromHandlers(handlers), [handlers]);
|
|
@@ -28815,7 +29096,7 @@ var EvaluateClaimFlowDetail = ({
|
|
|
28815
29096
|
const [settledPaymentId, setSettledPaymentId] = useState120("");
|
|
28816
29097
|
const [xeroOverride, setXeroOverride] = useState120(null);
|
|
28817
29098
|
const [overrideRev, setOverrideRev] = useState120(0);
|
|
28818
|
-
|
|
29099
|
+
useEffect99(() => {
|
|
28819
29100
|
if (!actorDid) {
|
|
28820
29101
|
setXeroOverride(null);
|
|
28821
29102
|
return;
|
|
@@ -28878,13 +29159,13 @@ var EvaluateClaimFlowDetail = ({
|
|
|
28878
29159
|
const [surveyActiveFile, setSurveyActiveFile] = useState120(null);
|
|
28879
29160
|
const openFileRef = React269.useRef(() => {
|
|
28880
29161
|
});
|
|
28881
|
-
|
|
29162
|
+
useEffect99(() => {
|
|
28882
29163
|
return () => {
|
|
28883
29164
|
for (const blobUrl of mediaBlobCacheRef.current.values()) URL.revokeObjectURL(blobUrl);
|
|
28884
29165
|
mediaBlobCacheRef.current.clear();
|
|
28885
29166
|
};
|
|
28886
29167
|
}, []);
|
|
28887
|
-
|
|
29168
|
+
useEffect99(() => {
|
|
28888
29169
|
const fetcher = handlers.fetchClaimMedia;
|
|
28889
29170
|
const cache = mediaBlobCacheRef.current;
|
|
28890
29171
|
openFileRef.current = async (file) => {
|
|
@@ -29001,7 +29282,7 @@ var EvaluateClaimFlowDetail = ({
|
|
|
29001
29282
|
});
|
|
29002
29283
|
return model;
|
|
29003
29284
|
}, [outcomeTemplateJson]);
|
|
29004
|
-
|
|
29285
|
+
useEffect99(() => {
|
|
29005
29286
|
if (!outcomeSurveyModel) return;
|
|
29006
29287
|
const evaluated = selectedClaim ? isClaimEvaluated(selectedClaim) : false;
|
|
29007
29288
|
if (evaluated) {
|
|
@@ -29099,7 +29380,7 @@ var EvaluateClaimFlowDetail = ({
|
|
|
29099
29380
|
},
|
|
29100
29381
|
[collectionId, deedDid]
|
|
29101
29382
|
);
|
|
29102
|
-
|
|
29383
|
+
useEffect99(() => {
|
|
29103
29384
|
setSelectedClaimId("");
|
|
29104
29385
|
setError(null);
|
|
29105
29386
|
setPaymentRows([createPaymentRow2()]);
|
|
@@ -29114,7 +29395,7 @@ var EvaluateClaimFlowDetail = ({
|
|
|
29114
29395
|
setSettledPaymentId("");
|
|
29115
29396
|
setSettlementError(null);
|
|
29116
29397
|
}, [deedDid, collectionId]);
|
|
29117
|
-
|
|
29398
|
+
useEffect99(() => {
|
|
29118
29399
|
let cancelled = false;
|
|
29119
29400
|
if (!parsed.xeroInvoiceBlockId || !selectedClaim || !claimData) {
|
|
29120
29401
|
setInvoicePreview(null);
|
|
@@ -29152,7 +29433,7 @@ var EvaluateClaimFlowDetail = ({
|
|
|
29152
29433
|
cancelled = true;
|
|
29153
29434
|
};
|
|
29154
29435
|
}, [parsed.xeroInvoiceBlockId, parsed.xeroPaymentBlockId, selectedClaim, claimData, editor, block.id, deedDid, collectionId, actorDid, runtimeManager, overrideRev]);
|
|
29155
|
-
|
|
29436
|
+
useEffect99(() => {
|
|
29156
29437
|
setCaptureError(null);
|
|
29157
29438
|
setSettlementError(null);
|
|
29158
29439
|
if (!selectedClaimId) {
|
|
@@ -29164,11 +29445,11 @@ var EvaluateClaimFlowDetail = ({
|
|
|
29164
29445
|
setCapturedInvoiceId(record?.invoiceId || "");
|
|
29165
29446
|
setSettledPaymentId(record?.settledPaymentId || "");
|
|
29166
29447
|
}, [selectedClaimId, runtimeManager, block.id]);
|
|
29167
|
-
|
|
29448
|
+
useEffect99(() => {
|
|
29168
29449
|
if (!deedDid || !collectionId) return;
|
|
29169
29450
|
refreshClaims();
|
|
29170
29451
|
}, [deedDid, collectionId, refreshClaims]);
|
|
29171
|
-
|
|
29452
|
+
useEffect99(() => {
|
|
29172
29453
|
let mounted = true;
|
|
29173
29454
|
const dids = Array.from(new Set(claims.map((claim) => claim.agentDid).filter(Boolean)));
|
|
29174
29455
|
const missing = dids.filter((did) => !profilesByDid[did]);
|
|
@@ -29204,7 +29485,7 @@ var EvaluateClaimFlowDetail = ({
|
|
|
29204
29485
|
mounted = false;
|
|
29205
29486
|
};
|
|
29206
29487
|
}, [claims, profilesByDid]);
|
|
29207
|
-
|
|
29488
|
+
useEffect99(() => {
|
|
29208
29489
|
let mounted = true;
|
|
29209
29490
|
const checkEvaluatorAuthorization = async () => {
|
|
29210
29491
|
const handlers2 = handlersRef.current;
|
|
@@ -29254,7 +29535,7 @@ var EvaluateClaimFlowDetail = ({
|
|
|
29254
29535
|
mounted = false;
|
|
29255
29536
|
};
|
|
29256
29537
|
}, [actorDid, adminAddress, deedDid, collectionId, authRetryKey]);
|
|
29257
|
-
|
|
29538
|
+
useEffect99(() => {
|
|
29258
29539
|
if (!selectedClaim) {
|
|
29259
29540
|
setClaimData(null);
|
|
29260
29541
|
setSurveyJson(null);
|
|
@@ -29490,7 +29771,7 @@ var EvaluateClaimFlowDetail = ({
|
|
|
29490
29771
|
parsed.xeroPaymentBlockId
|
|
29491
29772
|
]
|
|
29492
29773
|
);
|
|
29493
|
-
|
|
29774
|
+
useEffect99(() => {
|
|
29494
29775
|
if (!registerRuntimeInputs) return;
|
|
29495
29776
|
if (!selectedClaim) {
|
|
29496
29777
|
registerRuntimeInputs({ claimId: "", decision: "", adminAddress: "", createUdid: true });
|
|
@@ -29508,7 +29789,7 @@ var EvaluateClaimFlowDetail = ({
|
|
|
29508
29789
|
reason: decision === "dispute" ? disputeReason : void 0
|
|
29509
29790
|
});
|
|
29510
29791
|
}, [registerRuntimeInputs, selectedClaim, decision, adminAddress, createUdid, buildPaymentCoins, outcomeTemplateJson, outcomeComplete, isClaimAlreadyEvaluated, disputeReason]);
|
|
29511
|
-
|
|
29792
|
+
useEffect99(() => {
|
|
29512
29793
|
if (!unlockSigning) return;
|
|
29513
29794
|
if (!selectedClaim || !decision || !adminAddress || authChecking || !isEvaluatorAuthorized || isClaimAlreadyEvaluated || outcomeNotReady) {
|
|
29514
29795
|
unlockSigning(false);
|
|
@@ -29520,7 +29801,7 @@ var EvaluateClaimFlowDetail = ({
|
|
|
29520
29801
|
}
|
|
29521
29802
|
unlockSigning(true);
|
|
29522
29803
|
}, [unlockSigning, selectedClaim, decision, adminAddress, authChecking, isEvaluatorAuthorized, isClaimAlreadyEvaluated, outcomeNotReady, disputeReason]);
|
|
29523
|
-
|
|
29804
|
+
useEffect99(() => {
|
|
29524
29805
|
if (!provideSigningHandler || !selectedClaim || !decision) return;
|
|
29525
29806
|
provideSigningHandler(async () => {
|
|
29526
29807
|
const isDispute = decision === "dispute";
|
|
@@ -29887,7 +30168,7 @@ registerActionTypeUI("qi/claim.evaluate", {
|
|
|
29887
30168
|
});
|
|
29888
30169
|
|
|
29889
30170
|
// src/mantine/blocks/action/actionTypes/proposalCreate/ProposalCreateConfig.tsx
|
|
29890
|
-
import React270, { useCallback as useCallback99, useEffect as
|
|
30171
|
+
import React270, { useCallback as useCallback99, useEffect as useEffect100, useState as useState121 } from "react";
|
|
29891
30172
|
import { Divider as Divider23, Loader as Loader51, SegmentedControl as SegmentedControl6, Stack as Stack187, Text as Text165 } from "@mantine/core";
|
|
29892
30173
|
|
|
29893
30174
|
// src/mantine/blocks/action/actionTypes/proposalCreate/types.ts
|
|
@@ -29921,7 +30202,7 @@ var ProposalCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
29921
30202
|
const [loadingGroups, setLoadingGroups] = useState121(false);
|
|
29922
30203
|
const [inputMode, setInputMode] = useState121("select");
|
|
29923
30204
|
const [manualAddress, setManualAddress] = useState121("");
|
|
29924
|
-
|
|
30205
|
+
useEffect100(() => {
|
|
29925
30206
|
setLocal(parseProposalCreateInputs(inputs));
|
|
29926
30207
|
}, [inputs]);
|
|
29927
30208
|
const update = useCallback99(
|
|
@@ -29932,7 +30213,7 @@ var ProposalCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
29932
30213
|
},
|
|
29933
30214
|
[local, onInputsChange]
|
|
29934
30215
|
);
|
|
29935
|
-
|
|
30216
|
+
useEffect100(() => {
|
|
29936
30217
|
if (local.coreAddress) {
|
|
29937
30218
|
const matchesGroup = groups.some((g) => g.coreAddress === local.coreAddress);
|
|
29938
30219
|
if (matchesGroup) {
|
|
@@ -29943,7 +30224,7 @@ var ProposalCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
29943
30224
|
}
|
|
29944
30225
|
}
|
|
29945
30226
|
}, [local.coreAddress, groups]);
|
|
29946
|
-
|
|
30227
|
+
useEffect100(() => {
|
|
29947
30228
|
const fetchGroups = async () => {
|
|
29948
30229
|
if (!handlers?.getDAOGroups) return;
|
|
29949
30230
|
setLoadingGroups(true);
|
|
@@ -30032,7 +30313,7 @@ var ProposalCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
30032
30313
|
};
|
|
30033
30314
|
|
|
30034
30315
|
// src/mantine/blocks/action/actionTypes/proposalCreate/ProposalCreateFlowDetail.tsx
|
|
30035
|
-
import React271, { useCallback as useCallback100, useEffect as
|
|
30316
|
+
import React271, { useCallback as useCallback100, useEffect as useEffect101, useMemo as useMemo104, useState as useState122 } from "react";
|
|
30036
30317
|
import { Alert as Alert53, Badge as Badge51, Button as Button56, Card as Card25, Group as Group106, Loader as Loader52, Stack as Stack188, Text as Text166 } from "@mantine/core";
|
|
30037
30318
|
import { IconPlus as IconPlus9, IconPlayerPlay as IconPlayerPlay5 } from "@tabler/icons-react";
|
|
30038
30319
|
var CHAIN_STATUSES2 = ["open", "passed", "rejected", "executed", "closed", "execution_failed", "veto_timelock"];
|
|
@@ -30084,7 +30365,7 @@ var ProposalCreateFlowDetail = ({ inputs, editor, block, runtime, updateRuntime,
|
|
|
30084
30365
|
const proposalId = runtime.output?.proposalId || "";
|
|
30085
30366
|
const currentStatus = parseStatus2(runtime.output?.status);
|
|
30086
30367
|
const isProposalCreated = !!proposalId;
|
|
30087
|
-
|
|
30368
|
+
useEffect101(() => {
|
|
30088
30369
|
if (!handlers || !coreAddress || !proposalId) {
|
|
30089
30370
|
setProposalContractAddress(null);
|
|
30090
30371
|
return;
|
|
@@ -30116,7 +30397,7 @@ var ProposalCreateFlowDetail = ({ inputs, editor, block, runtime, updateRuntime,
|
|
|
30116
30397
|
contractAddress: proposalContractAddress || "",
|
|
30117
30398
|
autoFetch: shouldFetch
|
|
30118
30399
|
});
|
|
30119
|
-
|
|
30400
|
+
useEffect101(() => {
|
|
30120
30401
|
if (!proposal) return;
|
|
30121
30402
|
const chainStatus = proposal.proposal.status;
|
|
30122
30403
|
const parsedStatus = parseStatus2(chainStatus);
|
|
@@ -30256,7 +30537,7 @@ var ProposalCreateFlowDetail = ({ inputs, editor, block, runtime, updateRuntime,
|
|
|
30256
30537
|
setIsExecuting(false);
|
|
30257
30538
|
}
|
|
30258
30539
|
}, [handlers, proposalContractAddress, proposalId, invalidate, refetch]);
|
|
30259
|
-
|
|
30540
|
+
useEffect101(() => {
|
|
30260
30541
|
if (currentStatus === "executed" && runtime.state !== "completed") {
|
|
30261
30542
|
updateRuntime({ state: "completed" });
|
|
30262
30543
|
}
|
|
@@ -30304,7 +30585,7 @@ registerActionTypeUI("qi/proposal.create", {
|
|
|
30304
30585
|
});
|
|
30305
30586
|
|
|
30306
30587
|
// src/mantine/blocks/action/actionTypes/proposalVote/ProposalVoteConfig.tsx
|
|
30307
|
-
import React272, { useCallback as useCallback101, useEffect as
|
|
30588
|
+
import React272, { useCallback as useCallback101, useEffect as useEffect102, useState as useState123 } from "react";
|
|
30308
30589
|
import { Divider as Divider24, Loader as Loader53, SegmentedControl as SegmentedControl7, Stack as Stack189, Text as Text167 } from "@mantine/core";
|
|
30309
30590
|
|
|
30310
30591
|
// src/mantine/blocks/action/actionTypes/proposalVote/types.ts
|
|
@@ -30336,7 +30617,7 @@ var ProposalVoteConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
30336
30617
|
const [loadingGroups, setLoadingGroups] = useState123(false);
|
|
30337
30618
|
const [inputMode, setInputMode] = useState123("select");
|
|
30338
30619
|
const [manualAddress, setManualAddress] = useState123("");
|
|
30339
|
-
|
|
30620
|
+
useEffect102(() => {
|
|
30340
30621
|
setLocal(parseProposalVoteInputs(inputs));
|
|
30341
30622
|
}, [inputs]);
|
|
30342
30623
|
const update = useCallback101(
|
|
@@ -30347,7 +30628,7 @@ var ProposalVoteConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
30347
30628
|
},
|
|
30348
30629
|
[local, onInputsChange]
|
|
30349
30630
|
);
|
|
30350
|
-
|
|
30631
|
+
useEffect102(() => {
|
|
30351
30632
|
if (local.coreAddress) {
|
|
30352
30633
|
const matchesGroup = groups.some((g) => g.coreAddress === local.coreAddress);
|
|
30353
30634
|
if (matchesGroup) {
|
|
@@ -30358,7 +30639,7 @@ var ProposalVoteConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
30358
30639
|
}
|
|
30359
30640
|
}
|
|
30360
30641
|
}, [local.coreAddress, groups]);
|
|
30361
|
-
|
|
30642
|
+
useEffect102(() => {
|
|
30362
30643
|
const fetchGroups = async () => {
|
|
30363
30644
|
if (!handlers?.getDAOGroups) return;
|
|
30364
30645
|
setLoadingGroups(true);
|
|
@@ -30442,7 +30723,7 @@ var ProposalVoteConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
30442
30723
|
};
|
|
30443
30724
|
|
|
30444
30725
|
// src/mantine/blocks/action/actionTypes/proposalVote/ProposalVoteFlowDetail.tsx
|
|
30445
|
-
import React273, { useCallback as useCallback102, useEffect as
|
|
30726
|
+
import React273, { useCallback as useCallback102, useEffect as useEffect103, useMemo as useMemo105, useState as useState124 } from "react";
|
|
30446
30727
|
import { Alert as Alert54, Box as Box58, Button as Button57, Card as Card26, Group as Group107, Progress as Progress4, Stack as Stack190, Text as Text168, Tooltip as Tooltip26 } from "@mantine/core";
|
|
30447
30728
|
var getVoteIcon2 = (voteType) => {
|
|
30448
30729
|
switch (voteType) {
|
|
@@ -30492,7 +30773,7 @@ var ProposalVoteFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, i
|
|
|
30492
30773
|
const [proposalContractAddress, setProposalContractAddress] = useState124(inputContractAddress || null);
|
|
30493
30774
|
const hasSubmittedProposal = Boolean(proposalId);
|
|
30494
30775
|
const hasVoted = Boolean(userVote?.vote);
|
|
30495
|
-
|
|
30776
|
+
useEffect103(() => {
|
|
30496
30777
|
if (inputContractAddress) {
|
|
30497
30778
|
setProposalContractAddress(inputContractAddress);
|
|
30498
30779
|
return;
|
|
@@ -30516,7 +30797,7 @@ var ProposalVoteFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, i
|
|
|
30516
30797
|
isCancelled = true;
|
|
30517
30798
|
};
|
|
30518
30799
|
}, [handlers, coreAddress, proposalId, inputContractAddress]);
|
|
30519
|
-
|
|
30800
|
+
useEffect103(() => {
|
|
30520
30801
|
if (!handlers || !proposalContractAddress || !proposalId) return;
|
|
30521
30802
|
let isCancelled = false;
|
|
30522
30803
|
const loadUserVote = async () => {
|
|
@@ -30822,7 +31103,7 @@ var ProtocolSelectConfig = ({ inputs, onInputsChange }) => {
|
|
|
30822
31103
|
};
|
|
30823
31104
|
|
|
30824
31105
|
// src/mantine/blocks/action/actionTypes/protocolSelect/ProtocolSelectFlowDetail.tsx
|
|
30825
|
-
import React275, { useCallback as useCallback103, useEffect as
|
|
31106
|
+
import React275, { useCallback as useCallback103, useEffect as useEffect104, useMemo as useMemo107, useState as useState126 } from "react";
|
|
30826
31107
|
import { Box as Box60, Group as Group108, Loader as Loader54, Stack as Stack192, Text as Text170 } from "@mantine/core";
|
|
30827
31108
|
function parseInputs3(json) {
|
|
30828
31109
|
try {
|
|
@@ -30839,7 +31120,7 @@ var ProtocolSelectFlowDetail = ({ inputs, block, runtime, updateRuntime, isDisab
|
|
|
30839
31120
|
const { protocolDids } = useMemo107(() => parseInputs3(inputs), [inputs]);
|
|
30840
31121
|
const [protocols, setProtocols] = useState126([]);
|
|
30841
31122
|
const selectedDid = runtime.output?.selectedProtocolDid;
|
|
30842
|
-
|
|
31123
|
+
useEffect104(() => {
|
|
30843
31124
|
if (protocolDids.length === 0) {
|
|
30844
31125
|
setProtocols([]);
|
|
30845
31126
|
return;
|
|
@@ -30934,7 +31215,7 @@ registerActionTypeUI("qi/protocol.select", {
|
|
|
30934
31215
|
});
|
|
30935
31216
|
|
|
30936
31217
|
// src/mantine/blocks/action/actionTypes/domainSign/DomainSignConfig.tsx
|
|
30937
|
-
import React276, { useCallback as useCallback104, useEffect as
|
|
31218
|
+
import React276, { useCallback as useCallback104, useEffect as useEffect105, useState as useState127 } from "react";
|
|
30938
31219
|
import { Stack as Stack193, Text as Text171 } from "@mantine/core";
|
|
30939
31220
|
|
|
30940
31221
|
// src/mantine/blocks/action/actionTypes/domainSign/types.ts
|
|
@@ -30965,7 +31246,7 @@ var ENTITY_TYPE_OPTIONS = [
|
|
|
30965
31246
|
];
|
|
30966
31247
|
var DomainSignConfig = ({ inputs, onInputsChange }) => {
|
|
30967
31248
|
const [local, setLocal] = useState127(() => parseDomainSignInputs(inputs));
|
|
30968
|
-
|
|
31249
|
+
useEffect105(() => {
|
|
30969
31250
|
setLocal(parseDomainSignInputs(inputs));
|
|
30970
31251
|
}, [inputs]);
|
|
30971
31252
|
const update = useCallback104(
|
|
@@ -30989,7 +31270,7 @@ var DomainSignConfig = ({ inputs, onInputsChange }) => {
|
|
|
30989
31270
|
};
|
|
30990
31271
|
|
|
30991
31272
|
// src/mantine/blocks/action/actionTypes/domainSign/DomainSignFlowDetail.tsx
|
|
30992
|
-
import React277, { useCallback as useCallback105, useEffect as
|
|
31273
|
+
import React277, { useCallback as useCallback105, useEffect as useEffect106, useMemo as useMemo108, useState as useState128 } from "react";
|
|
30993
31274
|
import { Alert as Alert55, Button as Button58, Group as Group109, Loader as Loader55, Stack as Stack194, Text as Text172 } from "@mantine/core";
|
|
30994
31275
|
import { IconCheck as IconCheck23, IconAlertCircle as IconAlertCircle21, IconExternalLink as IconExternalLink2 } from "@tabler/icons-react";
|
|
30995
31276
|
var STEP_LABELS = {
|
|
@@ -31059,7 +31340,7 @@ var DomainSignFlowDetail = ({
|
|
|
31059
31340
|
});
|
|
31060
31341
|
const [activeStep, setActiveStep] = useState128("");
|
|
31061
31342
|
const [error, setError] = useState128(runtime.error?.message || null);
|
|
31062
|
-
|
|
31343
|
+
useEffect106(() => {
|
|
31063
31344
|
if (!activePendingInvocation?.id) return;
|
|
31064
31345
|
setFlowStep("idle");
|
|
31065
31346
|
setActiveStep("");
|
|
@@ -31238,7 +31519,7 @@ registerActionTypeUI("qi/domain.sign", {
|
|
|
31238
31519
|
});
|
|
31239
31520
|
|
|
31240
31521
|
// src/mantine/blocks/action/actionTypes/domainCardPreview/DomainCardPreviewConfig.tsx
|
|
31241
|
-
import React278, { useCallback as useCallback106, useEffect as
|
|
31522
|
+
import React278, { useCallback as useCallback106, useEffect as useEffect107, useState as useState129 } from "react";
|
|
31242
31523
|
import { Stack as Stack195, Text as Text173, Textarea as Textarea3 } from "@mantine/core";
|
|
31243
31524
|
|
|
31244
31525
|
// src/mantine/blocks/action/actionTypes/domainCardPreview/types.ts
|
|
@@ -31292,7 +31573,7 @@ function buildCardDataFromInputs(inputs) {
|
|
|
31292
31573
|
// src/mantine/blocks/action/actionTypes/domainCardPreview/DomainCardPreviewConfig.tsx
|
|
31293
31574
|
var DomainCardPreviewConfig = ({ inputs, onInputsChange }) => {
|
|
31294
31575
|
const [local, setLocal] = useState129(() => parseDomainCardPreviewInputs(inputs));
|
|
31295
|
-
|
|
31576
|
+
useEffect107(() => {
|
|
31296
31577
|
setLocal(parseDomainCardPreviewInputs(inputs));
|
|
31297
31578
|
}, [inputs]);
|
|
31298
31579
|
const update = useCallback106(
|
|
@@ -31418,7 +31699,7 @@ registerActionTypeUI("qi/domain.card-preview", {
|
|
|
31418
31699
|
});
|
|
31419
31700
|
|
|
31420
31701
|
// src/mantine/blocks/action/actionTypes/oracle/OracleConfig.tsx
|
|
31421
|
-
import React280, { useCallback as useCallback108, useEffect as
|
|
31702
|
+
import React280, { useCallback as useCallback108, useEffect as useEffect108, useState as useState131 } from "react";
|
|
31422
31703
|
import { Stack as Stack197 } from "@mantine/core";
|
|
31423
31704
|
|
|
31424
31705
|
// src/mantine/blocks/action/actionTypes/oracle/types.ts
|
|
@@ -31441,7 +31722,7 @@ function serializeOracleInputs(inputs) {
|
|
|
31441
31722
|
// src/mantine/blocks/action/actionTypes/oracle/OracleConfig.tsx
|
|
31442
31723
|
var OracleConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
31443
31724
|
const [local, setLocal] = useState131(() => parseOracleInputs(inputs));
|
|
31444
|
-
|
|
31725
|
+
useEffect108(() => {
|
|
31445
31726
|
setLocal(parseOracleInputs(inputs));
|
|
31446
31727
|
}, [inputs]);
|
|
31447
31728
|
const update = useCallback108(
|
|
@@ -31521,7 +31802,7 @@ registerActionTypeUI("oracle", {
|
|
|
31521
31802
|
});
|
|
31522
31803
|
|
|
31523
31804
|
// src/mantine/blocks/action/actionTypes/oraclePrompt/OraclePromptConfig.tsx
|
|
31524
|
-
import React282, { useCallback as useCallback110, useEffect as
|
|
31805
|
+
import React282, { useCallback as useCallback110, useEffect as useEffect109, useState as useState133 } from "react";
|
|
31525
31806
|
import { Stack as Stack199 } from "@mantine/core";
|
|
31526
31807
|
|
|
31527
31808
|
// src/mantine/blocks/action/actionTypes/oraclePrompt/types.ts
|
|
@@ -31542,7 +31823,7 @@ function serializeOraclePromptInputs(inputs) {
|
|
|
31542
31823
|
// src/mantine/blocks/action/actionTypes/oraclePrompt/OraclePromptConfig.tsx
|
|
31543
31824
|
var OraclePromptConfig = ({ inputs, onInputsChange }) => {
|
|
31544
31825
|
const [localPrompt, setLocalPrompt] = useState133(() => parseOraclePromptInputs(inputs).prompt);
|
|
31545
|
-
|
|
31826
|
+
useEffect109(() => {
|
|
31546
31827
|
setLocalPrompt(parseOraclePromptInputs(inputs).prompt);
|
|
31547
31828
|
}, [inputs]);
|
|
31548
31829
|
const handleChange = useCallback110(
|
|
@@ -31652,7 +31933,7 @@ registerActionTypeUI("oracle.prompt", {
|
|
|
31652
31933
|
});
|
|
31653
31934
|
|
|
31654
31935
|
// src/mantine/blocks/action/actionTypes/formSubmit/FormSubmitConfig.tsx
|
|
31655
|
-
import React284, { useCallback as useCallback112, useEffect as
|
|
31936
|
+
import React284, { useCallback as useCallback112, useEffect as useEffect110, useState as useState135 } from "react";
|
|
31656
31937
|
import { Stack as Stack201, Text as Text176 } from "@mantine/core";
|
|
31657
31938
|
|
|
31658
31939
|
// src/mantine/blocks/action/actionTypes/formSubmit/types.ts
|
|
@@ -31689,7 +31970,7 @@ function isValidSchemaJson(value) {
|
|
|
31689
31970
|
var FormSubmitConfig = ({ inputs, onInputsChange }) => {
|
|
31690
31971
|
const [localSchema, setLocalSchema] = useState135(() => parseFormSubmitActionInputs(inputs).surveySchema);
|
|
31691
31972
|
const [error, setError] = useState135(null);
|
|
31692
|
-
|
|
31973
|
+
useEffect110(() => {
|
|
31693
31974
|
setLocalSchema(parseFormSubmitActionInputs(inputs).surveySchema);
|
|
31694
31975
|
setError(null);
|
|
31695
31976
|
}, [inputs]);
|
|
@@ -31724,7 +32005,7 @@ var FormSubmitConfig = ({ inputs, onInputsChange }) => {
|
|
|
31724
32005
|
};
|
|
31725
32006
|
|
|
31726
32007
|
// src/mantine/blocks/action/actionTypes/formSubmit/FormSubmitFlowDetail.tsx
|
|
31727
|
-
import React285, { useCallback as useCallback113, useEffect as
|
|
32008
|
+
import React285, { useCallback as useCallback113, useEffect as useEffect111, useMemo as useMemo112, useState as useState136 } from "react";
|
|
31728
32009
|
import { Alert as Alert59, Loader as Loader58, Stack as Stack202, Text as Text177 } from "@mantine/core";
|
|
31729
32010
|
import { SurveyModel as SurveyModel12 } from "@ixo/surveys";
|
|
31730
32011
|
function parsePrimarySkill2(rawSkill) {
|
|
@@ -31911,7 +32192,7 @@ var FormSubmitFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isD
|
|
|
31911
32192
|
},
|
|
31912
32193
|
[actorDid, block, editor, flowId, flowNode, flowOwnerDid, flowUri, handlers, invocationStore, isDisabled, runtimeManager, services, submitting, ucanService, updateRuntime]
|
|
31913
32194
|
);
|
|
31914
|
-
|
|
32195
|
+
useEffect111(() => {
|
|
31915
32196
|
if (!surveyModel) return void 0;
|
|
31916
32197
|
surveyModel.onComplete.add(handleSurveyComplete);
|
|
31917
32198
|
return () => {
|
|
@@ -31933,7 +32214,7 @@ registerActionTypeUI("qi/human.form.submit", {
|
|
|
31933
32214
|
});
|
|
31934
32215
|
|
|
31935
32216
|
// src/mantine/blocks/action/actionTypes/credentialStore/CredentialStoreConfig.tsx
|
|
31936
|
-
import React286, { useCallback as useCallback114, useEffect as
|
|
32217
|
+
import React286, { useCallback as useCallback114, useEffect as useEffect112, useState as useState137 } from "react";
|
|
31937
32218
|
import { Stack as Stack203, Text as Text178 } from "@mantine/core";
|
|
31938
32219
|
|
|
31939
32220
|
// src/mantine/blocks/action/actionTypes/credentialStore/types.ts
|
|
@@ -31966,7 +32247,7 @@ function serializeCredentialStoreInputs(inputs) {
|
|
|
31966
32247
|
// src/mantine/blocks/action/actionTypes/credentialStore/CredentialStoreConfig.tsx
|
|
31967
32248
|
var CredentialStoreConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
31968
32249
|
const [local, setLocal] = useState137(() => parseCredentialStoreInputs(inputs));
|
|
31969
|
-
|
|
32250
|
+
useEffect112(() => {
|
|
31970
32251
|
setLocal(parseCredentialStoreInputs(inputs));
|
|
31971
32252
|
}, [inputs]);
|
|
31972
32253
|
const update = useCallback114(
|
|
@@ -32170,7 +32451,7 @@ registerActionTypeUI("qi/credential.store", {
|
|
|
32170
32451
|
});
|
|
32171
32452
|
|
|
32172
32453
|
// src/mantine/blocks/action/actionTypes/payment/PaymentConfig.tsx
|
|
32173
|
-
import React288, { useCallback as useCallback116, useEffect as
|
|
32454
|
+
import React288, { useCallback as useCallback116, useEffect as useEffect113, useState as useState139 } from "react";
|
|
32174
32455
|
import { Alert as Alert61, Divider as Divider25, Group as Group111, MultiSelect as MultiSelect2, Stack as Stack205, Text as Text180, TextInput as TextInput9 } from "@mantine/core";
|
|
32175
32456
|
|
|
32176
32457
|
// src/mantine/blocks/action/actionTypes/payment/types.ts
|
|
@@ -32179,6 +32460,7 @@ function emptyPaymentRowFields() {
|
|
|
32179
32460
|
accountName: "",
|
|
32180
32461
|
accountNumber: "",
|
|
32181
32462
|
accountType: "",
|
|
32463
|
+
bankName: "",
|
|
32182
32464
|
networkId: "",
|
|
32183
32465
|
country: "",
|
|
32184
32466
|
bvn: "",
|
|
@@ -32202,7 +32484,9 @@ function emptyPaymentSender() {
|
|
|
32202
32484
|
address: "",
|
|
32203
32485
|
dob: "",
|
|
32204
32486
|
idType: "",
|
|
32205
|
-
idNumber: ""
|
|
32487
|
+
idNumber: "",
|
|
32488
|
+
additionalIdType: "",
|
|
32489
|
+
additionalIdNumber: ""
|
|
32206
32490
|
};
|
|
32207
32491
|
}
|
|
32208
32492
|
function emptyPaymentFieldTemplate() {
|
|
@@ -32210,6 +32494,7 @@ function emptyPaymentFieldTemplate() {
|
|
|
32210
32494
|
accountName: "",
|
|
32211
32495
|
accountNumber: "",
|
|
32212
32496
|
accountType: "",
|
|
32497
|
+
bankName: "",
|
|
32213
32498
|
networkId: "",
|
|
32214
32499
|
country: "",
|
|
32215
32500
|
bvn: "",
|
|
@@ -32225,9 +32510,11 @@ var DEFAULT_REQUIRED_FIELDS = [
|
|
|
32225
32510
|
"accountName",
|
|
32226
32511
|
"accountNumber",
|
|
32227
32512
|
"accountType",
|
|
32513
|
+
"bankName",
|
|
32228
32514
|
"country",
|
|
32229
32515
|
"amount",
|
|
32230
|
-
"currency"
|
|
32516
|
+
"currency",
|
|
32517
|
+
"recipientDid"
|
|
32231
32518
|
];
|
|
32232
32519
|
function emptyPaymentInputs() {
|
|
32233
32520
|
return {
|
|
@@ -32271,7 +32558,9 @@ function parsePaymentInputs(json) {
|
|
|
32271
32558
|
address: asString(parsed.sender?.address),
|
|
32272
32559
|
dob: asString(parsed.sender?.dob),
|
|
32273
32560
|
idType: asString(parsed.sender?.idType),
|
|
32274
|
-
idNumber: asString(parsed.sender?.idNumber)
|
|
32561
|
+
idNumber: asString(parsed.sender?.idNumber),
|
|
32562
|
+
additionalIdType: asString(parsed.sender?.additionalIdType),
|
|
32563
|
+
additionalIdNumber: asString(parsed.sender?.additionalIdNumber)
|
|
32275
32564
|
},
|
|
32276
32565
|
defaultReason: asString(parsed.defaultReason, "other"),
|
|
32277
32566
|
customerType: asString(parsed.customerType, "retail"),
|
|
@@ -32279,6 +32568,7 @@ function parsePaymentInputs(json) {
|
|
|
32279
32568
|
accountName: asString(parsed.fieldTemplate?.accountName),
|
|
32280
32569
|
accountNumber: asString(parsed.fieldTemplate?.accountNumber),
|
|
32281
32570
|
accountType: asString(parsed.fieldTemplate?.accountType),
|
|
32571
|
+
bankName: asString(parsed.fieldTemplate?.bankName),
|
|
32282
32572
|
networkId: asString(parsed.fieldTemplate?.networkId),
|
|
32283
32573
|
country: asString(parsed.fieldTemplate?.country),
|
|
32284
32574
|
bvn: asString(parsed.fieldTemplate?.bvn),
|
|
@@ -32308,21 +32598,31 @@ function parsePaymentInputs(json) {
|
|
|
32308
32598
|
// intent. If a flow needs the old behaviour, surface it on the row UI
|
|
32309
32599
|
// (e.g. ban empty networkId at propose time inside the action def
|
|
32310
32600
|
// itself, not via requiredFields). For now no flow needs that.
|
|
32311
|
-
requiredFields:
|
|
32312
|
-
(
|
|
32313
|
-
|
|
32314
|
-
|
|
32315
|
-
|
|
32316
|
-
"
|
|
32317
|
-
"
|
|
32318
|
-
|
|
32319
|
-
|
|
32320
|
-
|
|
32321
|
-
|
|
32322
|
-
|
|
32323
|
-
|
|
32324
|
-
|
|
32325
|
-
|
|
32601
|
+
requiredFields: (() => {
|
|
32602
|
+
if (!Array.isArray(parsed.requiredFields)) {
|
|
32603
|
+
return [...DEFAULT_REQUIRED_FIELDS];
|
|
32604
|
+
}
|
|
32605
|
+
const cleaned = parsed.requiredFields.filter(
|
|
32606
|
+
(f) => typeof f === "string" && // Drop the oracle-resolved fields from any persisted list.
|
|
32607
|
+
f !== "networkId" && f !== "channelId" && [
|
|
32608
|
+
"accountName",
|
|
32609
|
+
"accountNumber",
|
|
32610
|
+
"accountType",
|
|
32611
|
+
"bankName",
|
|
32612
|
+
"country",
|
|
32613
|
+
"bvn",
|
|
32614
|
+
"amount",
|
|
32615
|
+
"currency",
|
|
32616
|
+
"reason",
|
|
32617
|
+
"recipientDid",
|
|
32618
|
+
"outcomeCurrency"
|
|
32619
|
+
].includes(f)
|
|
32620
|
+
);
|
|
32621
|
+
if (!cleaned.includes("recipientDid")) {
|
|
32622
|
+
cleaned.push("recipientDid");
|
|
32623
|
+
}
|
|
32624
|
+
return cleaned;
|
|
32625
|
+
})()
|
|
32326
32626
|
};
|
|
32327
32627
|
}
|
|
32328
32628
|
function serializePaymentInputs(inputs) {
|
|
@@ -32355,6 +32655,7 @@ function parsePaymentRows(raw) {
|
|
|
32355
32655
|
accountName: asString(entry.fields?.accountName),
|
|
32356
32656
|
accountNumber: asString(entry.fields?.accountNumber),
|
|
32357
32657
|
accountType: asString(entry.fields?.accountType),
|
|
32658
|
+
bankName: asString(entry.fields?.bankName),
|
|
32358
32659
|
networkId: asString(entry.fields?.networkId),
|
|
32359
32660
|
country: asString(entry.fields?.country),
|
|
32360
32661
|
bvn: asString(entry.fields?.bvn),
|
|
@@ -32411,6 +32712,10 @@ var FIELD_LABEL = {
|
|
|
32411
32712
|
label: "Account type",
|
|
32412
32713
|
hint: '"bank" or "momo" \u2014 usually fixed per flow, not from claim'
|
|
32413
32714
|
},
|
|
32715
|
+
bankName: {
|
|
32716
|
+
label: "Recipient bank name (required)",
|
|
32717
|
+
hint: "e.g. {{claim.surveyAnswers.umuzi:bankName}} \u2014 must match a YellowCard network name (Capitec Bank, FNB, MTN, \u2026). The oracle resolves this to a networkId at propose time. WRONG-bank routes funds to the wrong clearing system, so this MUST be accurate."
|
|
32718
|
+
},
|
|
32414
32719
|
networkId: {
|
|
32415
32720
|
label: "Network / bank UUID (optional)",
|
|
32416
32721
|
hint: "Leave empty \u2014 the oracle resolves the network UUID at propose time via the worker's `/channels` discovery. Only set this if you want to pin a specific bank."
|
|
@@ -32440,8 +32745,8 @@ var FIELD_LABEL = {
|
|
|
32440
32745
|
hint: "Falls back to block-level Default Reason when empty"
|
|
32441
32746
|
},
|
|
32442
32747
|
recipientDid: {
|
|
32443
|
-
label: "Recipient DID (
|
|
32444
|
-
hint: "e.g. {{claim.agentDid}} \u2014 falls back to invoker
|
|
32748
|
+
label: "Recipient DID (required)",
|
|
32749
|
+
hint: "e.g. {{claim.agentDid}} \u2014 DID of the person being paid out to. Worker uses this as YC customerUID for per-user KYC tracking. NEVER falls back to invoker \u2014 that would attribute the payout to the operator, not the actual recipient."
|
|
32445
32750
|
},
|
|
32446
32751
|
outcomeCurrency: {
|
|
32447
32752
|
label: "Outcome currency",
|
|
@@ -32452,6 +32757,7 @@ var REQUIRED_FIELD_OPTIONS = [
|
|
|
32452
32757
|
{ value: "accountName", label: "Recipient account name" },
|
|
32453
32758
|
{ value: "accountNumber", label: "Recipient account number" },
|
|
32454
32759
|
{ value: "accountType", label: "Account type" },
|
|
32760
|
+
{ value: "bankName", label: "Bank name" },
|
|
32455
32761
|
{ value: "country", label: "Country" },
|
|
32456
32762
|
{ value: "bvn", label: "BVN" },
|
|
32457
32763
|
{ value: "amount", label: "Amount" },
|
|
@@ -32467,7 +32773,7 @@ var PaymentConfig = ({
|
|
|
32467
32773
|
blockId
|
|
32468
32774
|
}) => {
|
|
32469
32775
|
const [local, setLocal] = useState139(() => parsePaymentInputs(inputs));
|
|
32470
|
-
|
|
32776
|
+
useEffect113(() => {
|
|
32471
32777
|
setLocal(parsePaymentInputs(inputs));
|
|
32472
32778
|
}, [inputs]);
|
|
32473
32779
|
const update = useCallback116(
|
|
@@ -32547,7 +32853,7 @@ var PaymentConfig = ({
|
|
|
32547
32853
|
};
|
|
32548
32854
|
|
|
32549
32855
|
// src/mantine/blocks/action/actionTypes/payment/PaymentFlowDetail.tsx
|
|
32550
|
-
import React289, { useCallback as useCallback117, useEffect as
|
|
32856
|
+
import React289, { useCallback as useCallback117, useEffect as useEffect114, useMemo as useMemo114, useState as useState140 } from "react";
|
|
32551
32857
|
import {
|
|
32552
32858
|
ActionIcon as ActionIcon43,
|
|
32553
32859
|
Alert as Alert62,
|
|
@@ -32647,6 +32953,7 @@ function resolvePaymentRowFields(fieldTemplate, editorDocument, scope) {
|
|
|
32647
32953
|
accountName: r(fieldTemplate.accountName),
|
|
32648
32954
|
accountNumber: r(fieldTemplate.accountNumber),
|
|
32649
32955
|
accountType: r(fieldTemplate.accountType),
|
|
32956
|
+
bankName: r(fieldTemplate.bankName),
|
|
32650
32957
|
networkId: r(fieldTemplate.networkId),
|
|
32651
32958
|
country: r(fieldTemplate.country),
|
|
32652
32959
|
bvn: r(fieldTemplate.bvn),
|
|
@@ -33022,7 +33329,7 @@ var PaymentFlowDetail = ({
|
|
|
33022
33329
|
}, [handlers]);
|
|
33023
33330
|
const [oracleDid, setOracleDid] = useState140("");
|
|
33024
33331
|
const [oracleResolving, setOracleResolving] = useState140(true);
|
|
33025
|
-
|
|
33332
|
+
useEffect114(() => {
|
|
33026
33333
|
let cancelled = false;
|
|
33027
33334
|
setOracleResolving(true);
|
|
33028
33335
|
const resolve = async () => {
|
|
@@ -33095,7 +33402,7 @@ var PaymentFlowDetail = ({
|
|
|
33095
33402
|
return true;
|
|
33096
33403
|
});
|
|
33097
33404
|
}, [allDelegations, oracleDid]);
|
|
33098
|
-
|
|
33405
|
+
useEffect114(() => {
|
|
33099
33406
|
if (!selectedDelegationCid) return;
|
|
33100
33407
|
const stillUsable = usableDelegations.some(
|
|
33101
33408
|
(d) => delegationKey(d) === selectedDelegationCid
|
|
@@ -33176,7 +33483,7 @@ var PaymentFlowDetail = ({
|
|
|
33176
33483
|
setClaimsLoading(false);
|
|
33177
33484
|
}
|
|
33178
33485
|
}, [handlers, parsed.collectionId]);
|
|
33179
|
-
|
|
33486
|
+
useEffect114(() => {
|
|
33180
33487
|
void refreshChainClaims();
|
|
33181
33488
|
}, [refreshChainClaims]);
|
|
33182
33489
|
const addedClaimIds = useMemo114(() => {
|
|
@@ -33249,7 +33556,8 @@ var PaymentFlowDetail = ({
|
|
|
33249
33556
|
}, [block, chainClaims, checkedClaimIds, editor, parsed.fieldTemplate]);
|
|
33250
33557
|
const [setupOpen, setSetupOpen] = useState140(() => {
|
|
33251
33558
|
const initial = parsePaymentInputs(inputs);
|
|
33252
|
-
|
|
33559
|
+
const initialIsNG = initial.sender.country.trim().toUpperCase() === "NG";
|
|
33560
|
+
return !initial.workerBaseUrl.trim() || !initial.sender.name.trim() || !initial.sender.country.trim() || initialIsNG && (!initial.sender.idNumber.trim() || !initial.sender.additionalIdNumber.trim());
|
|
33253
33561
|
});
|
|
33254
33562
|
const [submitting, setSubmitting] = useState140(false);
|
|
33255
33563
|
const [error, setError] = useState140(null);
|
|
@@ -33301,6 +33609,9 @@ var PaymentFlowDetail = ({
|
|
|
33301
33609
|
if (!parsed.sender.name.trim() || !parsed.sender.country.trim()) {
|
|
33302
33610
|
return "Sender name and country are required. Open Payout setup above and fill them in.";
|
|
33303
33611
|
}
|
|
33612
|
+
if (parsed.sender.country.trim().toUpperCase() === "NG" && (!parsed.sender.idNumber.trim() || !parsed.sender.additionalIdNumber.trim())) {
|
|
33613
|
+
return "NG senders must supply both NIN (idNumber) and BVN (additionalIdNumber). Open Payout setup above and fill them in \u2014 the worker auto-stamps the type fields.";
|
|
33614
|
+
}
|
|
33304
33615
|
if (oracleResolving) return "Resolving the oracle DID \u2014 try again in a moment.";
|
|
33305
33616
|
if (!oracleDid) return "Cannot determine the chat oracle DID.";
|
|
33306
33617
|
if (!selectedDelegationCid) return "Select a UCAN delegation (or create one).";
|
|
@@ -33321,6 +33632,8 @@ var PaymentFlowDetail = ({
|
|
|
33321
33632
|
effectiveWorkerBaseUrl,
|
|
33322
33633
|
parsed.sender.name,
|
|
33323
33634
|
parsed.sender.country,
|
|
33635
|
+
parsed.sender.idNumber,
|
|
33636
|
+
parsed.sender.additionalIdNumber,
|
|
33324
33637
|
oracleDid,
|
|
33325
33638
|
oracleResolving,
|
|
33326
33639
|
selectedDelegationCid,
|
|
@@ -33457,7 +33770,7 @@ var PaymentFlowDetail = ({
|
|
|
33457
33770
|
validateBeforeSend
|
|
33458
33771
|
]
|
|
33459
33772
|
);
|
|
33460
|
-
|
|
33773
|
+
useEffect114(() => {
|
|
33461
33774
|
if (rows.length === 0) return;
|
|
33462
33775
|
const allTerminal = rows.every(
|
|
33463
33776
|
(r) => r.status === "completed" || r.status === "failed"
|
|
@@ -33545,7 +33858,8 @@ var PaymentFlowDetail = ({
|
|
|
33545
33858
|
}
|
|
33546
33859
|
const oracleUnavailable = !oracleResolving && !oracleDid;
|
|
33547
33860
|
const workerUrlMissing = !effectiveWorkerBaseUrl;
|
|
33548
|
-
const
|
|
33861
|
+
const senderIsNG = parsed.sender.country.trim().toUpperCase() === "NG";
|
|
33862
|
+
const senderIncomplete = !parsed.sender.name.trim() || !parsed.sender.country.trim() || senderIsNG && (!parsed.sender.idNumber.trim() || !parsed.sender.additionalIdNumber.trim());
|
|
33549
33863
|
const setupIncomplete = workerUrlMissing || senderIncomplete;
|
|
33550
33864
|
const noUsableDelegation = usableDelegations.length === 0;
|
|
33551
33865
|
const delegationNotSelected = !selectedDelegationCid;
|
|
@@ -33604,7 +33918,7 @@ var PaymentFlowDetail = ({
|
|
|
33604
33918
|
onChange: (e) => patchInputs({ workerBaseUrl: e.currentTarget.value }),
|
|
33605
33919
|
error: workerUrlMissing ? "Required" : void 0
|
|
33606
33920
|
}
|
|
33607
|
-
), /* @__PURE__ */ React289.createElement(Divider26, { variant: "dashed", my: 4 }), /* @__PURE__ */ React289.createElement(Text181, { size: "xs", fw: 600, c: "dimmed" }, "Sender (organisation paying out)"), /* @__PURE__ */ React289.createElement(Text181, { size: "xs", c: "dimmed" }, "These details go with every row you propose. YellowCard requires full KYC (address, dob, idType, idNumber) once cumulative payments per recipient cross $200 USD \u2014 set them now to avoid mid-batch rejections."), /* @__PURE__ */ React289.createElement(Group112, { grow: true }, /* @__PURE__ */ React289.createElement(
|
|
33921
|
+
), /* @__PURE__ */ React289.createElement(Divider26, { variant: "dashed", my: 4 }), /* @__PURE__ */ React289.createElement(Text181, { size: "xs", fw: 600, c: "dimmed" }, "Sender (organisation paying out)"), /* @__PURE__ */ React289.createElement(Text181, { size: "xs", c: "dimmed" }, "These details go with every row you propose. YellowCard requires full KYC (address, dob, idType, idNumber) once cumulative payments per recipient cross $200 USD \u2014 set them now to avoid mid-batch rejections. NG senders additionally need NIN + BVN (extra fields appear when Country is set to NG)."), /* @__PURE__ */ React289.createElement(Group112, { grow: true }, /* @__PURE__ */ React289.createElement(
|
|
33608
33922
|
TextInput10,
|
|
33609
33923
|
{
|
|
33610
33924
|
size: "xs",
|
|
@@ -33656,7 +33970,16 @@ var PaymentFlowDetail = ({
|
|
|
33656
33970
|
value: parsed.sender.dob,
|
|
33657
33971
|
onChange: (e) => patchSender({ dob: e.currentTarget.value })
|
|
33658
33972
|
}
|
|
33659
|
-
), /* @__PURE__ */ React289.createElement(
|
|
33973
|
+
), parsed.sender.country.trim().toUpperCase() === "NG" ? /* @__PURE__ */ React289.createElement(
|
|
33974
|
+
TextInput10,
|
|
33975
|
+
{
|
|
33976
|
+
size: "xs",
|
|
33977
|
+
label: "ID type",
|
|
33978
|
+
value: "NIN",
|
|
33979
|
+
readOnly: true,
|
|
33980
|
+
description: "Auto-set for NG senders"
|
|
33981
|
+
}
|
|
33982
|
+
) : /* @__PURE__ */ React289.createElement(
|
|
33660
33983
|
TextInput10,
|
|
33661
33984
|
{
|
|
33662
33985
|
size: "xs",
|
|
@@ -33669,9 +33992,21 @@ var PaymentFlowDetail = ({
|
|
|
33669
33992
|
TextInput10,
|
|
33670
33993
|
{
|
|
33671
33994
|
size: "xs",
|
|
33672
|
-
label: "ID number",
|
|
33995
|
+
label: parsed.sender.country.trim().toUpperCase() === "NG" ? "NIN (National Identification Number)" : "ID number",
|
|
33673
33996
|
value: parsed.sender.idNumber,
|
|
33674
|
-
onChange: (e) => patchSender({ idNumber: e.currentTarget.value })
|
|
33997
|
+
onChange: (e) => patchSender({ idNumber: e.currentTarget.value }),
|
|
33998
|
+
error: parsed.sender.country.trim().toUpperCase() === "NG" && !parsed.sender.idNumber.trim() ? "Required for NG" : void 0
|
|
33999
|
+
}
|
|
34000
|
+
)), parsed.sender.country.trim().toUpperCase() === "NG" && /* @__PURE__ */ React289.createElement(React289.Fragment, null, /* @__PURE__ */ React289.createElement(Text181, { size: "xs", c: "dimmed" }, "YellowCard requires NG senders to supply both NIN and BVN. The ID type is fixed by regulation \u2014 only fill in the BVN number below."), /* @__PURE__ */ React289.createElement(
|
|
34001
|
+
TextInput10,
|
|
34002
|
+
{
|
|
34003
|
+
size: "xs",
|
|
34004
|
+
label: "BVN (Bank Verification Number)",
|
|
34005
|
+
value: parsed.sender.additionalIdNumber,
|
|
34006
|
+
onChange: (e) => patchSender({
|
|
34007
|
+
additionalIdNumber: e.currentTarget.value
|
|
34008
|
+
}),
|
|
34009
|
+
error: !parsed.sender.additionalIdNumber.trim() ? "Required for NG" : void 0
|
|
33675
34010
|
}
|
|
33676
34011
|
))))), /* @__PURE__ */ React289.createElement(Divider26, null), /* @__PURE__ */ React289.createElement(Stack206, { gap: "xs" }, /* @__PURE__ */ React289.createElement(Group112, { justify: "space-between", align: "flex-end" }, /* @__PURE__ */ React289.createElement(Stack206, { gap: 2, style: { flex: 1 } }, /* @__PURE__ */ React289.createElement(Text181, { size: "xs", fw: 600, c: "dimmed" }, "UCAN Authorization"), /* @__PURE__ */ React289.createElement(Text181, { size: "xs", c: "dimmed" }, "Sign once \u2014 the oracle mints per-call invocations against the worker for every row.")), /* @__PURE__ */ React289.createElement(
|
|
33677
34012
|
Button62,
|
|
@@ -33919,10 +34254,16 @@ var FIELD_DISPLAY = [
|
|
|
33919
34254
|
{ key: "accountName", label: "Recipient account name" },
|
|
33920
34255
|
{ key: "accountNumber", label: "Account number" },
|
|
33921
34256
|
{ key: "accountType", label: "Account type", placeholder: "bank or momo" },
|
|
34257
|
+
{
|
|
34258
|
+
key: "bankName",
|
|
34259
|
+
label: "Bank name (required)",
|
|
34260
|
+
placeholder: "e.g. Capitec Bank, FNB, MTN",
|
|
34261
|
+
description: "Must match a YellowCard network name for the recipient's country. The oracle resolves this to a networkId \u2014 a wrong bank routes funds to the wrong clearing system."
|
|
34262
|
+
},
|
|
33922
34263
|
{
|
|
33923
34264
|
key: "networkId",
|
|
33924
|
-
label: "Network / bank UUID (optional)",
|
|
33925
|
-
description: "Leave empty \u2014 oracle resolves via /channels discovery."
|
|
34265
|
+
label: "Network / bank UUID (optional override)",
|
|
34266
|
+
description: "Leave empty \u2014 oracle resolves via /channels discovery using Bank name. Only set to override resolution."
|
|
33926
34267
|
},
|
|
33927
34268
|
{ key: "country", label: "Country (ISO 3166-1 alpha-2)" },
|
|
33928
34269
|
{ key: "bvn", label: "BVN (NG, optional)" },
|
|
@@ -33944,7 +34285,11 @@ var FIELD_DISPLAY = [
|
|
|
33944
34285
|
description: "Local currency the recipient receives \u2014 never USD."
|
|
33945
34286
|
},
|
|
33946
34287
|
{ key: "reason", label: "Reason (optional)" },
|
|
33947
|
-
{
|
|
34288
|
+
{
|
|
34289
|
+
key: "recipientDid",
|
|
34290
|
+
label: "Recipient DID (required)",
|
|
34291
|
+
description: "DID of the person being paid out to \u2014 used as YC customerUID for per-user KYC tracking. NEVER inferred from the operator: a missing value fails the row at propose time."
|
|
34292
|
+
}
|
|
33948
34293
|
];
|
|
33949
34294
|
var PaymentRowDetail = ({
|
|
33950
34295
|
row,
|
|
@@ -34041,7 +34386,7 @@ registerActionTypeUI("qi/payment.execute", {
|
|
|
34041
34386
|
});
|
|
34042
34387
|
|
|
34043
34388
|
// src/mantine/blocks/action/actionTypes/matrixDm/MatrixDmConfig.tsx
|
|
34044
|
-
import React290, { useCallback as useCallback118, useEffect as
|
|
34389
|
+
import React290, { useCallback as useCallback118, useEffect as useEffect115, useMemo as useMemo115, useState as useState141 } from "react";
|
|
34045
34390
|
import { Flex as Flex35, Stack as Stack207, Text as Text182 } from "@mantine/core";
|
|
34046
34391
|
|
|
34047
34392
|
// src/mantine/blocks/action/actionTypes/matrixDm/types.ts
|
|
@@ -34071,10 +34416,10 @@ var MatrixDmConfig = ({ inputs, onInputsChange, editor }) => {
|
|
|
34071
34416
|
const [searchValue, setSearchValue] = useState141("");
|
|
34072
34417
|
const roomId = editor?.getRoomId?.() || null;
|
|
34073
34418
|
const mx = editor?.getMatrixClient?.() || null;
|
|
34074
|
-
|
|
34419
|
+
useEffect115(() => {
|
|
34075
34420
|
setLocal(parseMatrixDmInputs(inputs));
|
|
34076
34421
|
}, [inputs]);
|
|
34077
|
-
|
|
34422
|
+
useEffect115(() => {
|
|
34078
34423
|
(async () => {
|
|
34079
34424
|
if (!roomId || !mx) return;
|
|
34080
34425
|
try {
|
|
@@ -34148,11 +34493,11 @@ registerActionTypeUI("qi/matrix.dm", {
|
|
|
34148
34493
|
});
|
|
34149
34494
|
|
|
34150
34495
|
// src/mantine/blocks/action/actionTypes/calendar/eventCreate/CalendarEventCreateConfig.tsx
|
|
34151
|
-
import React291, { useCallback as useCallback119, useEffect as
|
|
34496
|
+
import React291, { useCallback as useCallback119, useEffect as useEffect116, useState as useState142 } from "react";
|
|
34152
34497
|
import { Divider as Divider27, Stack as Stack208, Text as Text183 } from "@mantine/core";
|
|
34153
34498
|
var CalendarEventCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
34154
34499
|
const [local, setLocal] = useState142(() => parseCalendarEventCreateInputs(inputs));
|
|
34155
|
-
|
|
34500
|
+
useEffect116(() => {
|
|
34156
34501
|
setLocal(parseCalendarEventCreateInputs(inputs));
|
|
34157
34502
|
}, [inputs]);
|
|
34158
34503
|
const update = useCallback119(
|
|
@@ -34269,7 +34614,7 @@ var CalendarEventCreateConfig = ({ inputs, onInputsChange, editor, blockId }) =>
|
|
|
34269
34614
|
};
|
|
34270
34615
|
|
|
34271
34616
|
// src/mantine/blocks/action/actionTypes/calendar/eventCreate/CalendarEventCreateFlowDetail.tsx
|
|
34272
|
-
import React292, { useCallback as useCallback120, useEffect as
|
|
34617
|
+
import React292, { useCallback as useCallback120, useEffect as useEffect117, useMemo as useMemo116, useState as useState143 } from "react";
|
|
34273
34618
|
import { Alert as Alert63, Anchor as Anchor2, Stack as Stack209, Text as Text184 } from "@mantine/core";
|
|
34274
34619
|
var CalendarEventCreateFlowDetail = ({
|
|
34275
34620
|
inputs,
|
|
@@ -34321,7 +34666,7 @@ var CalendarEventCreateFlowDetail = ({
|
|
|
34321
34666
|
description: resolve("description"),
|
|
34322
34667
|
calendar_id: resolve("calendar_id") || "primary"
|
|
34323
34668
|
}));
|
|
34324
|
-
|
|
34669
|
+
useEffect117(() => {
|
|
34325
34670
|
setLocal((prev) => ({
|
|
34326
34671
|
summary: prev.summary || resolve("summary"),
|
|
34327
34672
|
start_datetime: prev.start_datetime || resolve("start_datetime"),
|
|
@@ -34341,10 +34686,10 @@ var CalendarEventCreateFlowDetail = ({
|
|
|
34341
34686
|
const entityMismatch = hasConnection && entityDid && connection.entityDid && connection.entityDid !== entityDid;
|
|
34342
34687
|
const isCompleted = runtime.state === "completed";
|
|
34343
34688
|
const readyToSign = hasConnection && !entityMismatch && !!local.start_datetime.trim() && !isCompleted;
|
|
34344
|
-
|
|
34689
|
+
useEffect117(() => {
|
|
34345
34690
|
unlockSigning?.(readyToSign);
|
|
34346
34691
|
}, [unlockSigning, readyToSign]);
|
|
34347
|
-
|
|
34692
|
+
useEffect117(() => {
|
|
34348
34693
|
registerRuntimeInputs?.(local);
|
|
34349
34694
|
}, [registerRuntimeInputs, local]);
|
|
34350
34695
|
const [error, setError] = useState143(null);
|
|
@@ -34450,7 +34795,7 @@ var CalendarEventCreateFlowDetail = ({
|
|
|
34450
34795
|
ucanService,
|
|
34451
34796
|
updateRuntime
|
|
34452
34797
|
]);
|
|
34453
|
-
|
|
34798
|
+
useEffect117(() => {
|
|
34454
34799
|
if (!provideSigningHandler) return;
|
|
34455
34800
|
provideSigningHandler(execute);
|
|
34456
34801
|
}, [provideSigningHandler, execute]);
|
|
@@ -34508,7 +34853,7 @@ registerActionTypeUI("qi/calendar.event.create", {
|
|
|
34508
34853
|
});
|
|
34509
34854
|
|
|
34510
34855
|
// src/mantine/blocks/action/actionTypes/calendar/eventUpdate/CalendarEventUpdateConfig.tsx
|
|
34511
|
-
import React293, { useCallback as useCallback121, useEffect as
|
|
34856
|
+
import React293, { useCallback as useCallback121, useEffect as useEffect118, useState as useState144 } from "react";
|
|
34512
34857
|
import { Divider as Divider28, Stack as Stack210, Text as Text185 } from "@mantine/core";
|
|
34513
34858
|
|
|
34514
34859
|
// src/core/lib/actionRegistry/actions/calendar/eventUpdate.types.ts
|
|
@@ -34554,7 +34899,7 @@ function serializeCalendarEventUpdateInputs(inputs) {
|
|
|
34554
34899
|
// src/mantine/blocks/action/actionTypes/calendar/eventUpdate/CalendarEventUpdateConfig.tsx
|
|
34555
34900
|
var CalendarEventUpdateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
34556
34901
|
const [local, setLocal] = useState144(() => parseCalendarEventUpdateInputs(inputs));
|
|
34557
|
-
|
|
34902
|
+
useEffect118(() => {
|
|
34558
34903
|
setLocal(parseCalendarEventUpdateInputs(inputs));
|
|
34559
34904
|
}, [inputs]);
|
|
34560
34905
|
const update = useCallback121(
|
|
@@ -34648,7 +34993,7 @@ var CalendarEventUpdateConfig = ({ inputs, onInputsChange, editor, blockId }) =>
|
|
|
34648
34993
|
};
|
|
34649
34994
|
|
|
34650
34995
|
// src/mantine/blocks/action/actionTypes/calendar/eventUpdate/CalendarEventUpdateFlowDetail.tsx
|
|
34651
|
-
import React294, { useCallback as useCallback122, useEffect as
|
|
34996
|
+
import React294, { useCallback as useCallback122, useEffect as useEffect119, useMemo as useMemo117, useState as useState145 } from "react";
|
|
34652
34997
|
import { Alert as Alert64, Anchor as Anchor3, Stack as Stack211, Text as Text186 } from "@mantine/core";
|
|
34653
34998
|
var CalendarEventUpdateFlowDetail = ({
|
|
34654
34999
|
inputs,
|
|
@@ -34701,7 +35046,7 @@ var CalendarEventUpdateFlowDetail = ({
|
|
|
34701
35046
|
description: resolve("description"),
|
|
34702
35047
|
calendar_id: resolve("calendar_id") || "primary"
|
|
34703
35048
|
}));
|
|
34704
|
-
|
|
35049
|
+
useEffect119(() => {
|
|
34705
35050
|
setLocal((prev) => ({
|
|
34706
35051
|
event_id: prev.event_id || resolve("event_id"),
|
|
34707
35052
|
summary: prev.summary || resolve("summary"),
|
|
@@ -34722,10 +35067,10 @@ var CalendarEventUpdateFlowDetail = ({
|
|
|
34722
35067
|
const entityMismatch = hasConnection && entityDid && connection.entityDid && connection.entityDid !== entityDid;
|
|
34723
35068
|
const isCompleted = runtime.state === "completed";
|
|
34724
35069
|
const readyToSign = hasConnection && !entityMismatch && !!local.event_id.trim() && !!local.start_datetime.trim() && !isCompleted;
|
|
34725
|
-
|
|
35070
|
+
useEffect119(() => {
|
|
34726
35071
|
unlockSigning?.(readyToSign);
|
|
34727
35072
|
}, [unlockSigning, readyToSign]);
|
|
34728
|
-
|
|
35073
|
+
useEffect119(() => {
|
|
34729
35074
|
registerRuntimeInputs?.(local);
|
|
34730
35075
|
}, [registerRuntimeInputs, local]);
|
|
34731
35076
|
const [error, setError] = useState145(null);
|
|
@@ -34832,7 +35177,7 @@ var CalendarEventUpdateFlowDetail = ({
|
|
|
34832
35177
|
ucanService,
|
|
34833
35178
|
updateRuntime
|
|
34834
35179
|
]);
|
|
34835
|
-
|
|
35180
|
+
useEffect119(() => {
|
|
34836
35181
|
if (!provideSigningHandler) return;
|
|
34837
35182
|
provideSigningHandler(execute);
|
|
34838
35183
|
}, [provideSigningHandler, execute]);
|
|
@@ -34869,7 +35214,7 @@ registerActionTypeUI("qi/calendar.event.update", {
|
|
|
34869
35214
|
});
|
|
34870
35215
|
|
|
34871
35216
|
// src/mantine/blocks/action/actionTypes/calendar/eventList/CalendarEventListConfig.tsx
|
|
34872
|
-
import React295, { useCallback as useCallback123, useEffect as
|
|
35217
|
+
import React295, { useCallback as useCallback123, useEffect as useEffect120, useState as useState146 } from "react";
|
|
34873
35218
|
import { Divider as Divider29, Group as Group113, Stack as Stack212, Switch as Switch8, Text as Text187 } from "@mantine/core";
|
|
34874
35219
|
|
|
34875
35220
|
// src/core/lib/actionRegistry/actions/calendar/eventList.types.ts
|
|
@@ -34911,7 +35256,7 @@ function serializeCalendarEventListInputs(inputs) {
|
|
|
34911
35256
|
// src/mantine/blocks/action/actionTypes/calendar/eventList/CalendarEventListConfig.tsx
|
|
34912
35257
|
var CalendarEventListConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
34913
35258
|
const [local, setLocal] = useState146(() => parseCalendarEventListInputs(inputs));
|
|
34914
|
-
|
|
35259
|
+
useEffect120(() => {
|
|
34915
35260
|
setLocal(parseCalendarEventListInputs(inputs));
|
|
34916
35261
|
}, [inputs]);
|
|
34917
35262
|
const update = useCallback123(
|
|
@@ -35132,7 +35477,7 @@ registerActionTypeUI("qi/calendar.event.list", {
|
|
|
35132
35477
|
});
|
|
35133
35478
|
|
|
35134
35479
|
// src/mantine/blocks/action/actionTypes/xero/contactCreate/XeroContactCreateConfig.tsx
|
|
35135
|
-
import React297, { useCallback as useCallback125, useEffect as
|
|
35480
|
+
import React297, { useCallback as useCallback125, useEffect as useEffect121, useState as useState148 } from "react";
|
|
35136
35481
|
import { Divider as Divider30, Group as Group114, Stack as Stack214, Switch as Switch9, Text as Text188 } from "@mantine/core";
|
|
35137
35482
|
|
|
35138
35483
|
// src/core/lib/actionRegistry/actions/xero/contactCreate.types.ts
|
|
@@ -35186,7 +35531,7 @@ function serializeXeroContactCreateInputs(inputs) {
|
|
|
35186
35531
|
// src/mantine/blocks/action/actionTypes/xero/contactCreate/XeroContactCreateConfig.tsx
|
|
35187
35532
|
var XeroContactCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
35188
35533
|
const [local, setLocal] = useState148(() => parseXeroContactCreateInputs(inputs));
|
|
35189
|
-
|
|
35534
|
+
useEffect121(() => {
|
|
35190
35535
|
setLocal(parseXeroContactCreateInputs(inputs));
|
|
35191
35536
|
}, [inputs]);
|
|
35192
35537
|
const update = useCallback125(
|
|
@@ -35251,7 +35596,7 @@ var XeroContactCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
35251
35596
|
};
|
|
35252
35597
|
|
|
35253
35598
|
// src/mantine/blocks/action/actionTypes/xero/contactCreate/XeroContactCreateFlowDetail.tsx
|
|
35254
|
-
import React298, { useCallback as useCallback126, useEffect as
|
|
35599
|
+
import React298, { useCallback as useCallback126, useEffect as useEffect122, useMemo as useMemo119, useState as useState149 } from "react";
|
|
35255
35600
|
import { Alert as Alert66, Stack as Stack215, Text as Text189 } from "@mantine/core";
|
|
35256
35601
|
var XeroContactCreateFlowDetail = ({
|
|
35257
35602
|
inputs,
|
|
@@ -35301,7 +35646,7 @@ var XeroContactCreateFlowDetail = ({
|
|
|
35301
35646
|
phone_number: resolve("phone_number"),
|
|
35302
35647
|
mobile_number: resolve("mobile_number")
|
|
35303
35648
|
}));
|
|
35304
|
-
|
|
35649
|
+
useEffect122(() => {
|
|
35305
35650
|
setLocal((prev) => ({
|
|
35306
35651
|
Name: prev.Name || resolve("Name"),
|
|
35307
35652
|
EmailAddress: prev.EmailAddress || resolve("EmailAddress"),
|
|
@@ -35319,10 +35664,10 @@ var XeroContactCreateFlowDetail = ({
|
|
|
35319
35664
|
const entityMismatch = hasConnection && entityDid && connection.entityDid && connection.entityDid !== entityDid;
|
|
35320
35665
|
const isCompleted = runtime.state === "completed";
|
|
35321
35666
|
const readyToSign = hasConnection && !entityMismatch && !!local.Name.trim() && !isCompleted;
|
|
35322
|
-
|
|
35667
|
+
useEffect122(() => {
|
|
35323
35668
|
unlockSigning?.(readyToSign);
|
|
35324
35669
|
}, [unlockSigning, readyToSign]);
|
|
35325
|
-
|
|
35670
|
+
useEffect122(() => {
|
|
35326
35671
|
registerRuntimeInputs?.(local);
|
|
35327
35672
|
}, [registerRuntimeInputs, local]);
|
|
35328
35673
|
const [error, setError] = useState149(null);
|
|
@@ -35433,7 +35778,7 @@ var XeroContactCreateFlowDetail = ({
|
|
|
35433
35778
|
ucanService,
|
|
35434
35779
|
updateRuntime
|
|
35435
35780
|
]);
|
|
35436
|
-
|
|
35781
|
+
useEffect122(() => {
|
|
35437
35782
|
if (!provideSigningHandler) return;
|
|
35438
35783
|
provideSigningHandler(execute);
|
|
35439
35784
|
}, [provideSigningHandler, execute]);
|
|
@@ -35448,7 +35793,7 @@ registerActionTypeUI("qi/xero.contact.create", {
|
|
|
35448
35793
|
});
|
|
35449
35794
|
|
|
35450
35795
|
// src/mantine/blocks/action/actionTypes/xero/invoiceCreate/XeroInvoiceCreateConfig.tsx
|
|
35451
|
-
import React300, { useCallback as useCallback128, useEffect as
|
|
35796
|
+
import React300, { useCallback as useCallback128, useEffect as useEffect123, useState as useState150 } from "react";
|
|
35452
35797
|
import { Divider as Divider32, Group as Group116, Stack as Stack217, Text as Text191 } from "@mantine/core";
|
|
35453
35798
|
|
|
35454
35799
|
// src/mantine/blocks/action/actionTypes/xero/invoiceCreate/XeroLineItemsEditor.tsx
|
|
@@ -35701,7 +36046,7 @@ function IterativeMapEditor({
|
|
|
35701
36046
|
// src/mantine/blocks/action/actionTypes/xero/invoiceCreate/XeroInvoiceCreateConfig.tsx
|
|
35702
36047
|
var XeroInvoiceCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
35703
36048
|
const [local, setLocal] = useState150(() => parseXeroInvoiceCreateInputs(inputs));
|
|
35704
|
-
|
|
36049
|
+
useEffect123(() => {
|
|
35705
36050
|
setLocal(parseXeroInvoiceCreateInputs(inputs));
|
|
35706
36051
|
}, [inputs]);
|
|
35707
36052
|
const update = useCallback128(
|
|
@@ -35808,7 +36153,7 @@ var XeroInvoiceCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
35808
36153
|
};
|
|
35809
36154
|
|
|
35810
36155
|
// src/mantine/blocks/action/actionTypes/xero/invoiceCreate/XeroInvoiceCreateFlowDetail.tsx
|
|
35811
|
-
import React301, { useCallback as useCallback129, useEffect as
|
|
36156
|
+
import React301, { useCallback as useCallback129, useEffect as useEffect124, useMemo as useMemo121, useState as useState151 } from "react";
|
|
35812
36157
|
import { Alert as Alert68, Badge as Badge54, Stack as Stack218, Text as Text192 } from "@mantine/core";
|
|
35813
36158
|
function resolveIterativeSource(source, editorDocument, opts) {
|
|
35814
36159
|
const refs = parseReferences(source || "");
|
|
@@ -35889,7 +36234,7 @@ var XeroInvoiceCreateFlowDetail = ({
|
|
|
35889
36234
|
InvoiceNumber: seedFromTemplate("InvoiceNumber"),
|
|
35890
36235
|
Reference: seedFromTemplate("Reference")
|
|
35891
36236
|
}));
|
|
35892
|
-
|
|
36237
|
+
useEffect124(() => {
|
|
35893
36238
|
setLocal((prev) => {
|
|
35894
36239
|
const next = {
|
|
35895
36240
|
ContactID: prev.ContactID || seedFromTemplate("ContactID"),
|
|
@@ -35923,10 +36268,10 @@ var XeroInvoiceCreateFlowDetail = ({
|
|
|
35923
36268
|
}, [parsed.LineItems, editor, resolveOpts]);
|
|
35924
36269
|
const hasContact = !!(local.ContactID.trim() || local.ContactName.trim());
|
|
35925
36270
|
const readyToSign = hasConnection && !entityMismatch && lineItemsValidation.ok && hasContact && !isCompleted;
|
|
35926
|
-
|
|
36271
|
+
useEffect124(() => {
|
|
35927
36272
|
unlockSigning?.(readyToSign);
|
|
35928
36273
|
}, [unlockSigning, readyToSign]);
|
|
35929
|
-
|
|
36274
|
+
useEffect124(() => {
|
|
35930
36275
|
registerRuntimeInputs?.(local);
|
|
35931
36276
|
}, [registerRuntimeInputs, local]);
|
|
35932
36277
|
const [error, setError] = useState151(null);
|
|
@@ -36043,7 +36388,7 @@ var XeroInvoiceCreateFlowDetail = ({
|
|
|
36043
36388
|
ucanService,
|
|
36044
36389
|
updateRuntime
|
|
36045
36390
|
]);
|
|
36046
|
-
|
|
36391
|
+
useEffect124(() => {
|
|
36047
36392
|
if (!provideSigningHandler) return;
|
|
36048
36393
|
provideSigningHandler(execute);
|
|
36049
36394
|
}, [provideSigningHandler, execute]);
|
|
@@ -36067,7 +36412,7 @@ registerActionTypeUI("qi/xero.invoice.create", {
|
|
|
36067
36412
|
});
|
|
36068
36413
|
|
|
36069
36414
|
// src/mantine/blocks/action/actionTypes/xero/invoiceList/XeroInvoiceListConfig.tsx
|
|
36070
|
-
import React302, { useCallback as useCallback130, useEffect as
|
|
36415
|
+
import React302, { useCallback as useCallback130, useEffect as useEffect125, useState as useState152 } from "react";
|
|
36071
36416
|
import { Divider as Divider33, Group as Group117, Stack as Stack219, Switch as Switch10, Text as Text193 } from "@mantine/core";
|
|
36072
36417
|
|
|
36073
36418
|
// src/core/lib/actionRegistry/actions/xero/invoiceList.types.ts
|
|
@@ -36111,7 +36456,7 @@ function serializeXeroInvoiceListInputs(inputs) {
|
|
|
36111
36456
|
// src/mantine/blocks/action/actionTypes/xero/invoiceList/XeroInvoiceListConfig.tsx
|
|
36112
36457
|
var XeroInvoiceListConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
36113
36458
|
const [local, setLocal] = useState152(() => parseXeroInvoiceListInputs(inputs));
|
|
36114
|
-
|
|
36459
|
+
useEffect125(() => {
|
|
36115
36460
|
setLocal(parseXeroInvoiceListInputs(inputs));
|
|
36116
36461
|
}, [inputs]);
|
|
36117
36462
|
const update = useCallback130(
|
|
@@ -36333,11 +36678,11 @@ registerActionTypeUI("qi/xero.invoice.list", {
|
|
|
36333
36678
|
});
|
|
36334
36679
|
|
|
36335
36680
|
// src/mantine/blocks/action/actionTypes/xero/paymentCreate/XeroPaymentCreateConfig.tsx
|
|
36336
|
-
import React304, { useCallback as useCallback132, useEffect as
|
|
36681
|
+
import React304, { useCallback as useCallback132, useEffect as useEffect126, useState as useState154 } from "react";
|
|
36337
36682
|
import { Divider as Divider34, Group as Group118, Stack as Stack221, Text as Text194 } from "@mantine/core";
|
|
36338
36683
|
var XeroPaymentCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
36339
36684
|
const [local, setLocal] = useState154(() => parseXeroPaymentCreateInputs(inputs));
|
|
36340
|
-
|
|
36685
|
+
useEffect126(() => {
|
|
36341
36686
|
setLocal(parseXeroPaymentCreateInputs(inputs));
|
|
36342
36687
|
}, [inputs]);
|
|
36343
36688
|
const update = useCallback132(
|
|
@@ -36428,7 +36773,7 @@ var XeroPaymentCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
36428
36773
|
};
|
|
36429
36774
|
|
|
36430
36775
|
// src/mantine/blocks/action/actionTypes/xero/paymentCreate/XeroPaymentCreateFlowDetail.tsx
|
|
36431
|
-
import React305, { useCallback as useCallback133, useEffect as
|
|
36776
|
+
import React305, { useCallback as useCallback133, useEffect as useEffect127, useMemo as useMemo123, useState as useState155 } from "react";
|
|
36432
36777
|
import { Alert as Alert70, Stack as Stack222, Text as Text195 } from "@mantine/core";
|
|
36433
36778
|
var XeroPaymentCreateFlowDetail = ({
|
|
36434
36779
|
inputs,
|
|
@@ -36478,7 +36823,7 @@ var XeroPaymentCreateFlowDetail = ({
|
|
|
36478
36823
|
Date: seedFromTemplate("Date"),
|
|
36479
36824
|
Reference: seedFromTemplate("Reference")
|
|
36480
36825
|
}));
|
|
36481
|
-
|
|
36826
|
+
useEffect127(() => {
|
|
36482
36827
|
setLocal((prev) => {
|
|
36483
36828
|
const next = {
|
|
36484
36829
|
InvoiceID: prev.InvoiceID || seedFromTemplate("InvoiceID"),
|
|
@@ -36507,10 +36852,10 @@ var XeroPaymentCreateFlowDetail = ({
|
|
|
36507
36852
|
}, [local.Amount]);
|
|
36508
36853
|
const amountValid = Number.isFinite(amountNumber) && amountNumber > 0;
|
|
36509
36854
|
const readyToSign = hasConnection && !entityMismatch && !!local.InvoiceID.trim() && !!local.AccountID.trim() && amountValid && !isCompleted;
|
|
36510
|
-
|
|
36855
|
+
useEffect127(() => {
|
|
36511
36856
|
unlockSigning?.(readyToSign);
|
|
36512
36857
|
}, [unlockSigning, readyToSign]);
|
|
36513
|
-
|
|
36858
|
+
useEffect127(() => {
|
|
36514
36859
|
registerRuntimeInputs?.(local);
|
|
36515
36860
|
}, [registerRuntimeInputs, local]);
|
|
36516
36861
|
const [error, setError] = useState155(null);
|
|
@@ -36624,7 +36969,7 @@ var XeroPaymentCreateFlowDetail = ({
|
|
|
36624
36969
|
ucanService,
|
|
36625
36970
|
updateRuntime
|
|
36626
36971
|
]);
|
|
36627
|
-
|
|
36972
|
+
useEffect127(() => {
|
|
36628
36973
|
if (!provideSigningHandler) return;
|
|
36629
36974
|
provideSigningHandler(execute);
|
|
36630
36975
|
}, [provideSigningHandler, execute]);
|
|
@@ -36767,7 +37112,7 @@ registerActionTypeUI("qi/wallet.generate", {
|
|
|
36767
37112
|
});
|
|
36768
37113
|
|
|
36769
37114
|
// src/mantine/blocks/action/actionTypes/walletFund/WalletFundConfig.tsx
|
|
36770
|
-
import React308, { useCallback as useCallback135, useEffect as
|
|
37115
|
+
import React308, { useCallback as useCallback135, useEffect as useEffect128, useState as useState156 } from "react";
|
|
36771
37116
|
import { Stack as Stack225, Text as Text198, NumberInput as NumberInput6 } from "@mantine/core";
|
|
36772
37117
|
|
|
36773
37118
|
// src/mantine/blocks/action/actionTypes/walletFund/types.ts
|
|
@@ -36793,7 +37138,7 @@ function serializeWalletFundInputs(inputs) {
|
|
|
36793
37138
|
// src/mantine/blocks/action/actionTypes/walletFund/WalletFundConfig.tsx
|
|
36794
37139
|
var WalletFundConfig = ({ inputs, onInputsChange }) => {
|
|
36795
37140
|
const [local, setLocal] = useState156(() => parseWalletFundInputs(inputs));
|
|
36796
|
-
|
|
37141
|
+
useEffect128(() => {
|
|
36797
37142
|
setLocal(parseWalletFundInputs(inputs));
|
|
36798
37143
|
}, [inputs]);
|
|
36799
37144
|
const update = useCallback135(
|
|
@@ -36808,7 +37153,7 @@ var WalletFundConfig = ({ inputs, onInputsChange }) => {
|
|
|
36808
37153
|
};
|
|
36809
37154
|
|
|
36810
37155
|
// src/mantine/blocks/action/actionTypes/walletFund/WalletFundFlowDetail.tsx
|
|
36811
|
-
import React309, { useCallback as useCallback136, useEffect as
|
|
37156
|
+
import React309, { useCallback as useCallback136, useEffect as useEffect129, useMemo as useMemo125 } from "react";
|
|
36812
37157
|
import { Alert as Alert72, Group as Group120, Loader as Loader64, Stack as Stack226, Text as Text199 } from "@mantine/core";
|
|
36813
37158
|
import { IconCheck as IconCheck27, IconAlertCircle as IconAlertCircle25 } from "@tabler/icons-react";
|
|
36814
37159
|
var WalletFundFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled, provideSigningHandler, unlockSigning }) => {
|
|
@@ -36915,10 +37260,10 @@ var WalletFundFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isD
|
|
|
36915
37260
|
updateRuntime,
|
|
36916
37261
|
schemaVersion
|
|
36917
37262
|
]);
|
|
36918
|
-
|
|
37263
|
+
useEffect129(() => {
|
|
36919
37264
|
provideSigningHandler?.(handleExecute);
|
|
36920
37265
|
}, [provideSigningHandler, handleExecute]);
|
|
36921
|
-
|
|
37266
|
+
useEffect129(() => {
|
|
36922
37267
|
unlockSigning?.(!!resolvedAddress && !isCompleted && !isRunning);
|
|
36923
37268
|
}, [unlockSigning, resolvedAddress, isCompleted, isRunning]);
|
|
36924
37269
|
const handleRetry = useCallback136(() => {
|
|
@@ -37055,7 +37400,7 @@ registerActionTypeUI("qi/wallet.generateAndFund", {
|
|
|
37055
37400
|
});
|
|
37056
37401
|
|
|
37057
37402
|
// src/mantine/blocks/action/actionTypes/iidCreate/IidCreateConfig.tsx
|
|
37058
|
-
import React312, { useCallback as useCallback138, useEffect as
|
|
37403
|
+
import React312, { useCallback as useCallback138, useEffect as useEffect130, useState as useState157 } from "react";
|
|
37059
37404
|
import { Stack as Stack229, Text as Text202 } from "@mantine/core";
|
|
37060
37405
|
|
|
37061
37406
|
// src/mantine/blocks/action/actionTypes/iidCreate/types.ts
|
|
@@ -37084,7 +37429,7 @@ function serializeIidCreateInputs(inputs) {
|
|
|
37084
37429
|
// src/mantine/blocks/action/actionTypes/iidCreate/IidCreateConfig.tsx
|
|
37085
37430
|
var IidCreateConfig = ({ inputs, onInputsChange }) => {
|
|
37086
37431
|
const [local, setLocal] = useState157(() => parseIidCreateInputs(inputs));
|
|
37087
|
-
|
|
37432
|
+
useEffect130(() => {
|
|
37088
37433
|
setLocal(parseIidCreateInputs(inputs));
|
|
37089
37434
|
}, [inputs]);
|
|
37090
37435
|
const update = useCallback138(
|
|
@@ -37302,7 +37647,7 @@ registerActionTypeUI("qi/iid.create", {
|
|
|
37302
37647
|
});
|
|
37303
37648
|
|
|
37304
37649
|
// src/mantine/blocks/action/actionTypes/matrixRegister/MatrixRegisterConfig.tsx
|
|
37305
|
-
import React314, { useCallback as useCallback140, useEffect as
|
|
37650
|
+
import React314, { useCallback as useCallback140, useEffect as useEffect131, useState as useState158 } from "react";
|
|
37306
37651
|
import { Stack as Stack231, Text as Text204 } from "@mantine/core";
|
|
37307
37652
|
|
|
37308
37653
|
// src/mantine/blocks/action/actionTypes/matrixRegister/types.ts
|
|
@@ -37335,7 +37680,7 @@ function serializeMatrixRegisterInputs(inputs) {
|
|
|
37335
37680
|
// src/mantine/blocks/action/actionTypes/matrixRegister/MatrixRegisterConfig.tsx
|
|
37336
37681
|
var MatrixRegisterConfig = ({ inputs, onInputsChange }) => {
|
|
37337
37682
|
const [local, setLocal] = useState158(() => parseMatrixRegisterInputs(inputs));
|
|
37338
|
-
|
|
37683
|
+
useEffect131(() => {
|
|
37339
37684
|
setLocal(parseMatrixRegisterInputs(inputs));
|
|
37340
37685
|
}, [inputs]);
|
|
37341
37686
|
const update = useCallback140(
|
|
@@ -37513,7 +37858,7 @@ registerActionTypeUI("qi/matrix.register", {
|
|
|
37513
37858
|
});
|
|
37514
37859
|
|
|
37515
37860
|
// src/mantine/blocks/action/actionTypes/identityCreate/IdentityCreateConfig.tsx
|
|
37516
|
-
import React316, { useCallback as useCallback142, useEffect as
|
|
37861
|
+
import React316, { useCallback as useCallback142, useEffect as useEffect132, useState as useState159 } from "react";
|
|
37517
37862
|
import { Stack as Stack233, Text as Text206 } from "@mantine/core";
|
|
37518
37863
|
|
|
37519
37864
|
// src/mantine/blocks/action/actionTypes/identityCreate/types.ts
|
|
@@ -37545,7 +37890,7 @@ function serializeIdentityCreateInputs(inputs) {
|
|
|
37545
37890
|
// src/mantine/blocks/action/actionTypes/identityCreate/IdentityCreateConfig.tsx
|
|
37546
37891
|
var IdentityCreateConfig = ({ inputs, onInputsChange }) => {
|
|
37547
37892
|
const [local, setLocal] = useState159(() => parseIdentityCreateInputs(inputs));
|
|
37548
|
-
|
|
37893
|
+
useEffect132(() => {
|
|
37549
37894
|
setLocal(parseIdentityCreateInputs(inputs));
|
|
37550
37895
|
}, [inputs]);
|
|
37551
37896
|
const update = useCallback142(
|
|
@@ -37799,7 +38144,7 @@ registerActionTypeUI("qi/identity.create", {
|
|
|
37799
38144
|
});
|
|
37800
38145
|
|
|
37801
38146
|
// src/mantine/blocks/action/actionTypes/entityCreateOracle/EntityCreateOracleConfig.tsx
|
|
37802
|
-
import React318, { useCallback as useCallback144, useEffect as
|
|
38147
|
+
import React318, { useCallback as useCallback144, useEffect as useEffect133, useState as useState160 } from "react";
|
|
37803
38148
|
import { Divider as Divider35, Stack as Stack235, Text as Text208 } from "@mantine/core";
|
|
37804
38149
|
|
|
37805
38150
|
// src/mantine/blocks/action/actionTypes/entityCreateOracle/types.ts
|
|
@@ -37864,7 +38209,7 @@ function serializeEntityCreateOracleInputs(inputs) {
|
|
|
37864
38209
|
// src/mantine/blocks/action/actionTypes/entityCreateOracle/EntityCreateOracleConfig.tsx
|
|
37865
38210
|
var EntityCreateOracleConfig = ({ inputs, onInputsChange }) => {
|
|
37866
38211
|
const [local, setLocal] = useState160(() => parseEntityCreateOracleInputs(inputs));
|
|
37867
|
-
|
|
38212
|
+
useEffect133(() => {
|
|
37868
38213
|
setLocal(parseEntityCreateOracleInputs(inputs));
|
|
37869
38214
|
}, [inputs]);
|
|
37870
38215
|
const update = useCallback144(
|
|
@@ -38164,7 +38509,7 @@ registerActionTypeUI("qi/entity.createOracle", {
|
|
|
38164
38509
|
});
|
|
38165
38510
|
|
|
38166
38511
|
// src/mantine/blocks/action/actionTypes/sandboxProvision/SandboxProvisionConfig.tsx
|
|
38167
|
-
import React320, { useCallback as useCallback146, useEffect as
|
|
38512
|
+
import React320, { useCallback as useCallback146, useEffect as useEffect134, useState as useState161 } from "react";
|
|
38168
38513
|
import { Stack as Stack237, Text as Text210 } from "@mantine/core";
|
|
38169
38514
|
|
|
38170
38515
|
// src/mantine/blocks/action/actionTypes/sandboxProvision/types.ts
|
|
@@ -38189,7 +38534,7 @@ function serializeSandboxProvisionInputs(inputs) {
|
|
|
38189
38534
|
// src/mantine/blocks/action/actionTypes/sandboxProvision/SandboxProvisionConfig.tsx
|
|
38190
38535
|
var SandboxProvisionConfig = ({ inputs, onInputsChange }) => {
|
|
38191
38536
|
const [local, setLocal] = useState161(() => parseSandboxProvisionInputs(inputs));
|
|
38192
|
-
|
|
38537
|
+
useEffect134(() => {
|
|
38193
38538
|
setLocal(parseSandboxProvisionInputs(inputs));
|
|
38194
38539
|
}, [inputs]);
|
|
38195
38540
|
const update = useCallback146(
|
|
@@ -38336,7 +38681,7 @@ registerActionTypeUI("qi/sandbox.provision", {
|
|
|
38336
38681
|
});
|
|
38337
38682
|
|
|
38338
38683
|
// src/mantine/blocks/action/actionTypes/oracleContract/OracleContractConfig.tsx
|
|
38339
|
-
import React322, { useCallback as useCallback148, useEffect as
|
|
38684
|
+
import React322, { useCallback as useCallback148, useEffect as useEffect135, useState as useState162 } from "react";
|
|
38340
38685
|
import { Stack as Stack239, Text as Text212 } from "@mantine/core";
|
|
38341
38686
|
|
|
38342
38687
|
// src/mantine/blocks/action/actionTypes/oracleContract/types.ts
|
|
@@ -38359,7 +38704,7 @@ function serializeOracleContractInputs(inputs) {
|
|
|
38359
38704
|
// src/mantine/blocks/action/actionTypes/oracleContract/OracleContractConfig.tsx
|
|
38360
38705
|
var OracleContractConfig = ({ inputs, onInputsChange }) => {
|
|
38361
38706
|
const [local, setLocal] = useState162(() => parseOracleContractInputs(inputs));
|
|
38362
|
-
|
|
38707
|
+
useEffect135(() => {
|
|
38363
38708
|
setLocal(parseOracleContractInputs(inputs));
|
|
38364
38709
|
}, [inputs]);
|
|
38365
38710
|
const update = useCallback148(
|
|
@@ -38496,7 +38841,7 @@ registerActionTypeUI("qi/oracle.contract", {
|
|
|
38496
38841
|
});
|
|
38497
38842
|
|
|
38498
38843
|
// src/mantine/blocks/action/actionTypes/oracleStoreSecrets/OracleStoreSecretsConfig.tsx
|
|
38499
|
-
import React324, { useCallback as useCallback150, useEffect as
|
|
38844
|
+
import React324, { useCallback as useCallback150, useEffect as useEffect136, useState as useState163 } from "react";
|
|
38500
38845
|
import { Divider as Divider36, Stack as Stack241, Text as Text214 } from "@mantine/core";
|
|
38501
38846
|
|
|
38502
38847
|
// src/mantine/blocks/action/actionTypes/oracleStoreSecrets/types.ts
|
|
@@ -38545,7 +38890,7 @@ function serializeOracleStoreSecretsInputs(inputs) {
|
|
|
38545
38890
|
// src/mantine/blocks/action/actionTypes/oracleStoreSecrets/OracleStoreSecretsConfig.tsx
|
|
38546
38891
|
var OracleStoreSecretsConfig = ({ inputs, onInputsChange }) => {
|
|
38547
38892
|
const [local, setLocal] = useState163(() => parseOracleStoreSecretsInputs(inputs));
|
|
38548
|
-
|
|
38893
|
+
useEffect136(() => {
|
|
38549
38894
|
setLocal(parseOracleStoreSecretsInputs(inputs));
|
|
38550
38895
|
}, [inputs]);
|
|
38551
38896
|
const update = useCallback150(
|
|
@@ -38680,7 +39025,7 @@ var OracleStoreSecretsConfig = ({ inputs, onInputsChange }) => {
|
|
|
38680
39025
|
};
|
|
38681
39026
|
|
|
38682
39027
|
// src/mantine/blocks/action/actionTypes/oracleStoreSecrets/OracleStoreSecretsFlowDetail.tsx
|
|
38683
|
-
import React325, { useCallback as useCallback151, useEffect as
|
|
39028
|
+
import React325, { useCallback as useCallback151, useEffect as useEffect137, useMemo as useMemo133, useRef as useRef33, useState as useState164 } from "react";
|
|
38684
39029
|
import { Alert as Alert80, Button as Button74, Collapse as Collapse12, Divider as Divider37, Group as Group128, Loader as Loader72, Stack as Stack242, Text as Text215 } from "@mantine/core";
|
|
38685
39030
|
import { IconAlertCircle as IconAlertCircle33, IconCheck as IconCheck35, IconChevronDown as IconChevronDown12, IconChevronUp as IconChevronUp6, IconLock as IconLock2 } from "@tabler/icons-react";
|
|
38686
39031
|
var EXPECTED_SECRETS = ["SECP_MNEMONIC", "MATRIX_ORACLE_ADMIN_PASSWORD", "MATRIX_ORACLE_ADMIN_ACCESS_TOKEN", "MATRIX_RECOVERY_PHRASE", "MATRIX_VALUE_PIN", "OPEN_ROUTER_API_KEY"];
|
|
@@ -38876,7 +39221,7 @@ var OracleStoreSecretsFlowDetail = ({ inputs, editor, block, runtime, updateRunt
|
|
|
38876
39221
|
missingFields
|
|
38877
39222
|
]);
|
|
38878
39223
|
const idempotencyCheckRef = useRef33(false);
|
|
38879
|
-
|
|
39224
|
+
useEffect137(() => {
|
|
38880
39225
|
if (idempotencyCheckRef.current) return;
|
|
38881
39226
|
if (!inputsReady) return;
|
|
38882
39227
|
if (runtime.state === "completed") return;
|
|
@@ -38909,7 +39254,7 @@ var OracleStoreSecretsFlowDetail = ({ inputs, editor, block, runtime, updateRunt
|
|
|
38909
39254
|
}
|
|
38910
39255
|
})();
|
|
38911
39256
|
}, [inputsReady, runtime.state, isDisabled, services, resolvedInputs.matrixRoomId, updateRuntime]);
|
|
38912
|
-
|
|
39257
|
+
useEffect137(() => {
|
|
38913
39258
|
if (constantsFetchRef.current) return;
|
|
38914
39259
|
if (!inputsReady) return;
|
|
38915
39260
|
if (!resolvedInputs.oracleName) return;
|
|
@@ -38961,7 +39306,7 @@ registerActionTypeUI("qi/oracle.storeSecrets", {
|
|
|
38961
39306
|
});
|
|
38962
39307
|
|
|
38963
39308
|
// src/mantine/blocks/action/actionTypes/oracleStoreConfig/OracleStoreConfigConfig.tsx
|
|
38964
|
-
import React326, { useCallback as useCallback152, useEffect as
|
|
39309
|
+
import React326, { useCallback as useCallback152, useEffect as useEffect138, useState as useState165 } from "react";
|
|
38965
39310
|
import { Divider as Divider38, Stack as Stack243, Text as Text216 } from "@mantine/core";
|
|
38966
39311
|
|
|
38967
39312
|
// src/mantine/blocks/action/actionTypes/oracleStoreConfig/types.ts
|
|
@@ -39032,7 +39377,7 @@ function serializeOracleStoreConfigInputs(inputs) {
|
|
|
39032
39377
|
// src/mantine/blocks/action/actionTypes/oracleStoreConfig/OracleStoreConfigConfig.tsx
|
|
39033
39378
|
var OracleStoreConfigConfig = ({ inputs, onInputsChange }) => {
|
|
39034
39379
|
const [local, setLocal] = useState165(() => parseOracleStoreConfigInputs(inputs));
|
|
39035
|
-
|
|
39380
|
+
useEffect138(() => {
|
|
39036
39381
|
setLocal(parseOracleStoreConfigInputs(inputs));
|
|
39037
39382
|
}, [inputs]);
|
|
39038
39383
|
const update = useCallback152(
|
|
@@ -39295,7 +39640,7 @@ registerActionTypeUI("qi/oracle.storeConfig", {
|
|
|
39295
39640
|
});
|
|
39296
39641
|
|
|
39297
39642
|
// src/mantine/blocks/action/actionTypes/oracleStoreSecretsAndConfig/OracleStoreSecretsAndConfigConfig.tsx
|
|
39298
|
-
import React328, { useCallback as useCallback154, useEffect as
|
|
39643
|
+
import React328, { useCallback as useCallback154, useEffect as useEffect139, useState as useState166 } from "react";
|
|
39299
39644
|
import { Divider as Divider39, Stack as Stack245, Text as Text218 } from "@mantine/core";
|
|
39300
39645
|
|
|
39301
39646
|
// src/mantine/blocks/action/actionTypes/oracleStoreSecretsAndConfig/types.ts
|
|
@@ -39371,7 +39716,7 @@ function serializeOracleStoreSecretsAndConfigInputs(inputs) {
|
|
|
39371
39716
|
// src/mantine/blocks/action/actionTypes/oracleStoreSecretsAndConfig/OracleStoreSecretsAndConfigConfig.tsx
|
|
39372
39717
|
var OracleStoreSecretsAndConfigConfig = ({ inputs, onInputsChange }) => {
|
|
39373
39718
|
const [local, setLocal] = useState166(() => parseOracleStoreSecretsAndConfigInputs(inputs));
|
|
39374
|
-
|
|
39719
|
+
useEffect139(() => {
|
|
39375
39720
|
setLocal(parseOracleStoreSecretsAndConfigInputs(inputs));
|
|
39376
39721
|
}, [inputs]);
|
|
39377
39722
|
const update = useCallback154(
|
|
@@ -39554,7 +39899,7 @@ var OracleStoreSecretsAndConfigConfig = ({ inputs, onInputsChange }) => {
|
|
|
39554
39899
|
};
|
|
39555
39900
|
|
|
39556
39901
|
// src/mantine/blocks/action/actionTypes/oracleStoreSecretsAndConfig/OracleStoreSecretsAndConfigFlowDetail.tsx
|
|
39557
|
-
import React329, { useCallback as useCallback155, useEffect as
|
|
39902
|
+
import React329, { useCallback as useCallback155, useEffect as useEffect140, useMemo as useMemo135, useRef as useRef34, useState as useState167 } from "react";
|
|
39558
39903
|
import { Alert as Alert82, Button as Button76, Collapse as Collapse13, Divider as Divider40, Group as Group130, Loader as Loader74, Stack as Stack246, Text as Text219 } from "@mantine/core";
|
|
39559
39904
|
import { IconAlertCircle as IconAlertCircle35, IconCheck as IconCheck37, IconChevronDown as IconChevronDown13, IconChevronUp as IconChevronUp7, IconLock as IconLock3 } from "@tabler/icons-react";
|
|
39560
39905
|
var EXPECTED_SECRETS2 = ["SECP_MNEMONIC", "MATRIX_ORACLE_ADMIN_PASSWORD", "MATRIX_ORACLE_ADMIN_ACCESS_TOKEN", "MATRIX_RECOVERY_PHRASE", "MATRIX_VALUE_PIN", "OPEN_ROUTER_API_KEY"];
|
|
@@ -39762,7 +40107,7 @@ var OracleStoreSecretsAndConfigFlowDetail = ({ inputs, editor, block, runtime, u
|
|
|
39762
40107
|
missingFields
|
|
39763
40108
|
]);
|
|
39764
40109
|
const idempotencyCheckRef = useRef34(false);
|
|
39765
|
-
|
|
40110
|
+
useEffect140(() => {
|
|
39766
40111
|
if (idempotencyCheckRef.current) return;
|
|
39767
40112
|
if (!inputsReady) return;
|
|
39768
40113
|
if (runtime.state === "completed") return;
|
|
@@ -39793,7 +40138,7 @@ var OracleStoreSecretsAndConfigFlowDetail = ({ inputs, editor, block, runtime, u
|
|
|
39793
40138
|
}
|
|
39794
40139
|
})();
|
|
39795
40140
|
}, [inputsReady, runtime.state, isDisabled, services, resolvedInputs.matrixRoomId, updateRuntime]);
|
|
39796
|
-
|
|
40141
|
+
useEffect140(() => {
|
|
39797
40142
|
if (constantsFetchRef.current) return;
|
|
39798
40143
|
if (!inputsReady) return;
|
|
39799
40144
|
if (!resolvedInputs.oracleName) return;
|
|
@@ -39841,7 +40186,7 @@ registerActionTypeUI("qi/oracle.storeSecretsAndConfig", {
|
|
|
39841
40186
|
});
|
|
39842
40187
|
|
|
39843
40188
|
// src/mantine/blocks/action/actionTypes/oracleConfigureOracle/OracleConfigureOracleConfig.tsx
|
|
39844
|
-
import React330, { useCallback as useCallback156, useEffect as
|
|
40189
|
+
import React330, { useCallback as useCallback156, useEffect as useEffect141, useState as useState168 } from "react";
|
|
39845
40190
|
import { Divider as Divider41, Stack as Stack247, Text as Text220 } from "@mantine/core";
|
|
39846
40191
|
|
|
39847
40192
|
// src/mantine/blocks/action/actionTypes/oracleConfigureOracle/types.ts
|
|
@@ -39918,7 +40263,7 @@ function serializeOracleConfigureOracleInputs(inputs) {
|
|
|
39918
40263
|
// src/mantine/blocks/action/actionTypes/oracleConfigureOracle/OracleConfigureOracleConfig.tsx
|
|
39919
40264
|
var OracleConfigureOracleConfig = ({ inputs, onInputsChange }) => {
|
|
39920
40265
|
const [local, setLocal] = useState168(() => parseOracleConfigureOracleInputs(inputs));
|
|
39921
|
-
|
|
40266
|
+
useEffect141(() => {
|
|
39922
40267
|
setLocal(parseOracleConfigureOracleInputs(inputs));
|
|
39923
40268
|
}, [inputs]);
|
|
39924
40269
|
const update = useCallback156(
|
|
@@ -40101,7 +40446,7 @@ var OracleConfigureOracleConfig = ({ inputs, onInputsChange }) => {
|
|
|
40101
40446
|
};
|
|
40102
40447
|
|
|
40103
40448
|
// src/mantine/blocks/action/actionTypes/oracleConfigureOracle/OracleConfigureOracleFlowDetail.tsx
|
|
40104
|
-
import React331, { useCallback as useCallback157, useEffect as
|
|
40449
|
+
import React331, { useCallback as useCallback157, useEffect as useEffect142, useMemo as useMemo136, useRef as useRef35, useState as useState169 } from "react";
|
|
40105
40450
|
import { Alert as Alert83, Button as Button77, Collapse as Collapse14, Divider as Divider42, Group as Group131, Loader as Loader75, Stack as Stack248, Text as Text221 } from "@mantine/core";
|
|
40106
40451
|
import { IconAlertCircle as IconAlertCircle36, IconCheck as IconCheck38, IconChevronDown as IconChevronDown14, IconChevronUp as IconChevronUp8, IconLock as IconLock4 } from "@tabler/icons-react";
|
|
40107
40452
|
var EXPECTED_SECRETS3 = ["SECP_MNEMONIC", "MATRIX_ORACLE_ADMIN_PASSWORD", "MATRIX_ORACLE_ADMIN_ACCESS_TOKEN", "MATRIX_RECOVERY_PHRASE", "MATRIX_VALUE_PIN", "OPEN_ROUTER_API_KEY"];
|
|
@@ -40330,7 +40675,7 @@ var OracleConfigureOracleFlowDetail = ({ inputs, editor, block, runtime, updateR
|
|
|
40330
40675
|
missingFields
|
|
40331
40676
|
]);
|
|
40332
40677
|
const idempotencyCheckRef = useRef35(false);
|
|
40333
|
-
|
|
40678
|
+
useEffect142(() => {
|
|
40334
40679
|
if (idempotencyCheckRef.current) return;
|
|
40335
40680
|
if (!inputsReady) return;
|
|
40336
40681
|
if (runtime.state === "completed") return;
|
|
@@ -40362,7 +40707,7 @@ var OracleConfigureOracleFlowDetail = ({ inputs, editor, block, runtime, updateR
|
|
|
40362
40707
|
}
|
|
40363
40708
|
})();
|
|
40364
40709
|
}, [inputsReady, runtime.state, runtime.output?.userOracleRoomId, isDisabled, services, updateRuntime]);
|
|
40365
|
-
|
|
40710
|
+
useEffect142(() => {
|
|
40366
40711
|
if (constantsFetchRef.current) return;
|
|
40367
40712
|
if (!inputsReady) return;
|
|
40368
40713
|
if (!resolvedInputs.oracleName) return;
|
|
@@ -41155,14 +41500,14 @@ import React342, { useCallback as useCallback162 } from "react";
|
|
|
41155
41500
|
import { IconSettings as IconSettings19 } from "@tabler/icons-react";
|
|
41156
41501
|
|
|
41157
41502
|
// src/mantine/blocks/location/template/GeneralTab.tsx
|
|
41158
|
-
import React341, { useEffect as
|
|
41503
|
+
import React341, { useEffect as useEffect144, useRef as useRef36, useState as useState172 } from "react";
|
|
41159
41504
|
import { Box as Box64, Divider as Divider43, Stack as Stack255, Text as Text228 } from "@mantine/core";
|
|
41160
41505
|
|
|
41161
41506
|
// src/core/hooks/useUnlMap.ts
|
|
41162
|
-
import { useEffect as
|
|
41507
|
+
import { useEffect as useEffect143, useState as useState170 } from "react";
|
|
41163
41508
|
function useUnlMap() {
|
|
41164
41509
|
const [status, setStatus] = useState170("loading");
|
|
41165
|
-
|
|
41510
|
+
useEffect143(() => {
|
|
41166
41511
|
if (typeof window === "undefined") {
|
|
41167
41512
|
return;
|
|
41168
41513
|
}
|
|
@@ -41336,13 +41681,13 @@ var GeneralTab17 = ({ title, description, latitude, longitude, onTitleChange, on
|
|
|
41336
41681
|
const mapRef = useRef36(null);
|
|
41337
41682
|
const wrapperRef = useRef36(null);
|
|
41338
41683
|
const containerRef = useRef36(null);
|
|
41339
|
-
|
|
41684
|
+
useEffect144(() => {
|
|
41340
41685
|
setLocalTitle(title);
|
|
41341
41686
|
}, [title]);
|
|
41342
|
-
|
|
41687
|
+
useEffect144(() => {
|
|
41343
41688
|
setLocalDescription(description);
|
|
41344
41689
|
}, [description]);
|
|
41345
|
-
|
|
41690
|
+
useEffect144(() => {
|
|
41346
41691
|
if (status !== "ready" || !UnlSdk || mapRef.current || !mapConfig || !containerRef.current || !wrapperRef.current) return;
|
|
41347
41692
|
try {
|
|
41348
41693
|
const hasCoords = latitude && longitude;
|
|
@@ -41468,7 +41813,7 @@ var TemplateConfig17 = ({ editor, block }) => {
|
|
|
41468
41813
|
};
|
|
41469
41814
|
|
|
41470
41815
|
// src/mantine/blocks/location/components/LocationMap.tsx
|
|
41471
|
-
import React343, { useEffect as
|
|
41816
|
+
import React343, { useEffect as useEffect145, useRef as useRef37, useState as useState173 } from "react";
|
|
41472
41817
|
import { Box as Box65, Flex as Flex36, Loader as Loader79, Text as Text229 } from "@mantine/core";
|
|
41473
41818
|
var UnlMap = ({ w = "100%", h = 200, latitude, longitude, zoom = 5, showMarker = true, showTilesControl = false }) => {
|
|
41474
41819
|
const [mapError, setMapError] = useState173(null);
|
|
@@ -41478,7 +41823,7 @@ var UnlMap = ({ w = "100%", h = 200, latitude, longitude, zoom = 5, showMarker =
|
|
|
41478
41823
|
const mapRef = useRef37(null);
|
|
41479
41824
|
const markerRef = useRef37(null);
|
|
41480
41825
|
const { status, UnlSdk } = useUnlMap();
|
|
41481
|
-
|
|
41826
|
+
useEffect145(() => {
|
|
41482
41827
|
if (status !== "ready" || !UnlSdk || mapRef.current || !containerRef.current || !wrapperRef.current) return;
|
|
41483
41828
|
let ro;
|
|
41484
41829
|
let resizeTimer;
|
|
@@ -41509,7 +41854,7 @@ var UnlMap = ({ w = "100%", h = 200, latitude, longitude, zoom = 5, showMarker =
|
|
|
41509
41854
|
ro?.disconnect();
|
|
41510
41855
|
};
|
|
41511
41856
|
}, [status, UnlSdk, mapConfig]);
|
|
41512
|
-
|
|
41857
|
+
useEffect145(() => {
|
|
41513
41858
|
if (!mapRef.current || !latitude || !longitude) return;
|
|
41514
41859
|
const coords = [Number(longitude), Number(latitude)];
|
|
41515
41860
|
mapRef.current.setCenter(coords);
|
|
@@ -41649,7 +41994,7 @@ import React350, { useCallback as useCallback163 } from "react";
|
|
|
41649
41994
|
import { IconSettings as IconSettings20 } from "@tabler/icons-react";
|
|
41650
41995
|
|
|
41651
41996
|
// src/mantine/blocks/embed/template/GeneralTab.tsx
|
|
41652
|
-
import React349, { useEffect as
|
|
41997
|
+
import React349, { useEffect as useEffect146, useState as useState174 } from "react";
|
|
41653
41998
|
import { Stack as Stack258, Switch as Switch11, Text as Text232 } from "@mantine/core";
|
|
41654
41999
|
var GeneralTab18 = ({
|
|
41655
42000
|
url,
|
|
@@ -41671,10 +42016,10 @@ var GeneralTab18 = ({
|
|
|
41671
42016
|
value: key,
|
|
41672
42017
|
label: key.split("-").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ")
|
|
41673
42018
|
}));
|
|
41674
|
-
|
|
42019
|
+
useEffect146(() => {
|
|
41675
42020
|
setLocalUrl(url);
|
|
41676
42021
|
}, [url]);
|
|
41677
|
-
|
|
42022
|
+
useEffect146(() => {
|
|
41678
42023
|
setLocalHeight(height);
|
|
41679
42024
|
}, [height]);
|
|
41680
42025
|
return /* @__PURE__ */ React349.createElement(Stack258, { gap: "md" }, /* @__PURE__ */ React349.createElement(Stack258, { gap: "xs" }, /* @__PURE__ */ React349.createElement(Text232, { size: "sm", fw: 600 }, "URL"), /* @__PURE__ */ React349.createElement(
|
|
@@ -42089,7 +42434,7 @@ var SkillsTemplateView = ({ editor: _editor, block }) => {
|
|
|
42089
42434
|
// src/mantine/blocks/skills/flow/SkillsFlowView.tsx
|
|
42090
42435
|
import { ActionIcon as ActionIcon48, Badge as Badge57, Button as Button82, Collapse as Collapse16, Group as Group142, Loader as Loader80, Paper as Paper21, Stack as Stack263, Text as Text237, Tooltip as Tooltip31 } from "@mantine/core";
|
|
42091
42436
|
import { IconBrain as IconBrain3, IconCheck as IconCheck43, IconPencil, IconPlus as IconPlus12, IconTrash as IconTrash12, IconX as IconX15 } from "@tabler/icons-react";
|
|
42092
|
-
import React361, { useCallback as useCallback166, useEffect as
|
|
42437
|
+
import React361, { useCallback as useCallback166, useEffect as useEffect147, useMemo as useMemo146, useRef as useRef38, useState as useState176 } from "react";
|
|
42093
42438
|
function parseSkills2(raw) {
|
|
42094
42439
|
try {
|
|
42095
42440
|
const parsed = JSON.parse(raw || "[]");
|
|
@@ -42122,7 +42467,7 @@ var SkillsFlowView = ({ editor, block }) => {
|
|
|
42122
42467
|
const [capsules, setCapsules] = useState176([]);
|
|
42123
42468
|
const [loadingCapsules, setLoadingCapsules] = useState176(false);
|
|
42124
42469
|
const capsulesFetchedRef = useRef38(false);
|
|
42125
|
-
|
|
42470
|
+
useEffect147(() => {
|
|
42126
42471
|
if (capsulesFetchedRef.current || !handlers.getSkills) return;
|
|
42127
42472
|
capsulesFetchedRef.current = true;
|
|
42128
42473
|
setLoadingCapsules(true);
|
|
@@ -42130,7 +42475,7 @@ var SkillsFlowView = ({ editor, block }) => {
|
|
|
42130
42475
|
}, [handlers.getSkills]);
|
|
42131
42476
|
const [network, setNetwork] = useState176("");
|
|
42132
42477
|
const networkFetchedRef = useRef38(false);
|
|
42133
|
-
|
|
42478
|
+
useEffect147(() => {
|
|
42134
42479
|
if (networkFetchedRef.current || !handlers.getNetwork) return;
|
|
42135
42480
|
networkFetchedRef.current = true;
|
|
42136
42481
|
handlers.getNetwork().then(setNetwork).catch(() => setNetwork("mainnet"));
|
|
@@ -42666,7 +43011,7 @@ blockRegistry.register({
|
|
|
42666
43011
|
});
|
|
42667
43012
|
|
|
42668
43013
|
// src/mantine/blocks/hooks/useBlockDependencies.ts
|
|
42669
|
-
import { useMemo as useMemo147, useEffect as
|
|
43014
|
+
import { useMemo as useMemo147, useEffect as useEffect148, useState as useState177, useCallback as useCallback167 } from "react";
|
|
42670
43015
|
|
|
42671
43016
|
// src/mantine/blocks/hooks/useDependsOn.ts
|
|
42672
43017
|
import { useMemo as useMemo148 } from "react";
|
|
@@ -43237,7 +43582,7 @@ import { useCreateBlockNote as useCreateBlockNote2 } from "@blocknote/react";
|
|
|
43237
43582
|
import { BlockNoteSchema as BlockNoteSchema2, defaultBlockSpecs as defaultBlockSpecs2, defaultInlineContentSpecs as defaultInlineContentSpecs2 } from "@blocknote/core";
|
|
43238
43583
|
|
|
43239
43584
|
// src/core/hooks/useMatrixProvider.ts
|
|
43240
|
-
import { useEffect as
|
|
43585
|
+
import { useEffect as useEffect149, useState as useState178, useRef as useRef39, useCallback as useCallback168, useMemo as useMemo149 } from "react";
|
|
43241
43586
|
import { MatrixProvider } from "@ixo/matrix-crdt";
|
|
43242
43587
|
function useMatrixProvider({ matrixClient, roomId, yDoc }) {
|
|
43243
43588
|
const [matrixProvider, setProvider] = useState178(null);
|
|
@@ -43306,7 +43651,7 @@ function useMatrixProvider({ matrixClient, roomId, yDoc }) {
|
|
|
43306
43651
|
}
|
|
43307
43652
|
}
|
|
43308
43653
|
}, [matrixClient, providerOptions, handleDocumentAvailable, handleDocumentUnavailable, handleCanWriteChanged]);
|
|
43309
|
-
|
|
43654
|
+
useEffect149(() => {
|
|
43310
43655
|
isMountedRef.current = true;
|
|
43311
43656
|
initProvider();
|
|
43312
43657
|
return () => {
|
|
@@ -43323,7 +43668,7 @@ function useMatrixProvider({ matrixClient, roomId, yDoc }) {
|
|
|
43323
43668
|
setStatus("disconnected");
|
|
43324
43669
|
};
|
|
43325
43670
|
}, [initProvider]);
|
|
43326
|
-
|
|
43671
|
+
useEffect149(() => {
|
|
43327
43672
|
return () => {
|
|
43328
43673
|
isMountedRef.current = false;
|
|
43329
43674
|
};
|
|
@@ -43342,7 +43687,7 @@ function useCollaborativeYDoc(_options) {
|
|
|
43342
43687
|
}
|
|
43343
43688
|
|
|
43344
43689
|
// src/mantine/hooks/useCollaborativeIxoEditor.ts
|
|
43345
|
-
import { useMemo as useMemo151, useEffect as
|
|
43690
|
+
import { useMemo as useMemo151, useEffect as useEffect151, useState as useState179, useRef as useRef41 } from "react";
|
|
43346
43691
|
|
|
43347
43692
|
// src/core/lib/matrixMetadata.ts
|
|
43348
43693
|
var COVER_IMAGE_EVENT_TYPE = "ixo.page.cover_image";
|
|
@@ -43611,7 +43956,7 @@ function logInvocation(matrixClient, roomId, invocation) {
|
|
|
43611
43956
|
}
|
|
43612
43957
|
|
|
43613
43958
|
// src/mantine/hooks/useFlowLifecycle.ts
|
|
43614
|
-
import { useEffect as
|
|
43959
|
+
import { useEffect as useEffect150, useCallback as useCallback169, useRef as useRef40 } from "react";
|
|
43615
43960
|
|
|
43616
43961
|
// src/mantine/hooks/useFlowTTLCleanup.ts
|
|
43617
43962
|
function performTTLCleanup(editor) {
|
|
@@ -43862,19 +44207,19 @@ function useFlowLifecycle({ editor, connectionStatus, enabled = true }) {
|
|
|
43862
44207
|
runningRef.current = false;
|
|
43863
44208
|
}
|
|
43864
44209
|
}, [editor]);
|
|
43865
|
-
|
|
44210
|
+
useEffect150(() => {
|
|
43866
44211
|
if (!enabled || !editor || connectionStatus !== "connected" || hasRunInitialRef.current) return;
|
|
43867
44212
|
if (editor.docType !== "flow") return;
|
|
43868
44213
|
hasRunInitialRef.current = true;
|
|
43869
44214
|
runPipeline();
|
|
43870
44215
|
}, [editor, connectionStatus, enabled, runPipeline]);
|
|
43871
|
-
|
|
44216
|
+
useEffect150(() => {
|
|
43872
44217
|
if (!enabled || !editor || connectionStatus !== "connected") return;
|
|
43873
44218
|
if (editor.docType !== "flow") return;
|
|
43874
44219
|
const id = setInterval(runPipeline, DEFAULT_INTERVAL_MS);
|
|
43875
44220
|
return () => clearInterval(id);
|
|
43876
44221
|
}, [editor, connectionStatus, enabled, runPipeline]);
|
|
43877
|
-
|
|
44222
|
+
useEffect150(() => {
|
|
43878
44223
|
if (!enabled || !editor || connectionStatus !== "connected") return;
|
|
43879
44224
|
if (editor.docType !== "flow") return;
|
|
43880
44225
|
const runtimeMap = editor._yRuntime;
|
|
@@ -43987,7 +44332,7 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
43987
44332
|
roomId: options.roomId
|
|
43988
44333
|
});
|
|
43989
44334
|
const metadataManager = useMemo151(() => new MatrixMetadataManager(matrixClient, options.roomId), [matrixClient, options.roomId]);
|
|
43990
|
-
|
|
44335
|
+
useEffect151(() => {
|
|
43991
44336
|
return () => {
|
|
43992
44337
|
metadataManager.dispose();
|
|
43993
44338
|
};
|
|
@@ -44072,7 +44417,7 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
44072
44417
|
[theme, editable, sideMenu, slashMenu, formattingToolbar, linkToolbar, filePanel, tableHandles]
|
|
44073
44418
|
);
|
|
44074
44419
|
const [providerReady, setProviderReady] = useState179(false);
|
|
44075
|
-
|
|
44420
|
+
useEffect151(() => {
|
|
44076
44421
|
if (matrixProvider && !providerReady) setProviderReady(true);
|
|
44077
44422
|
}, [matrixProvider, providerReady]);
|
|
44078
44423
|
const editor = useCreateBlockNote2(
|
|
@@ -44284,12 +44629,12 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
44284
44629
|
return void 0;
|
|
44285
44630
|
};
|
|
44286
44631
|
}
|
|
44287
|
-
|
|
44632
|
+
useEffect151(() => {
|
|
44288
44633
|
if (ixoEditor) {
|
|
44289
44634
|
ixoEditor.isEditable = editable;
|
|
44290
44635
|
}
|
|
44291
44636
|
}, [ixoEditor, editable]);
|
|
44292
|
-
|
|
44637
|
+
useEffect151(() => {
|
|
44293
44638
|
if (connectionStatus !== "connected") {
|
|
44294
44639
|
return;
|
|
44295
44640
|
}
|
|
@@ -44314,7 +44659,7 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
44314
44659
|
const [connectedUsers, setConnectedUsers] = useState179([]);
|
|
44315
44660
|
const activeBlockIdRef = useRef41(null);
|
|
44316
44661
|
const awarenessInstance = matrixProvider?.awarenessInstance ?? null;
|
|
44317
|
-
|
|
44662
|
+
useEffect151(() => {
|
|
44318
44663
|
if (!awarenessInstance || connectionStatus !== "connected") {
|
|
44319
44664
|
return;
|
|
44320
44665
|
}
|
|
@@ -44332,7 +44677,7 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
44332
44677
|
awarenessInstance.off("change", updateUsers);
|
|
44333
44678
|
};
|
|
44334
44679
|
}, [awarenessInstance, connectionStatus]);
|
|
44335
|
-
|
|
44680
|
+
useEffect151(() => {
|
|
44336
44681
|
if (!awarenessInstance || connectionStatus !== "connected") {
|
|
44337
44682
|
return;
|
|
44338
44683
|
}
|
|
@@ -44361,7 +44706,7 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
44361
44706
|
};
|
|
44362
44707
|
}, [awarenessInstance, connectionStatus, memoizedUser.id, memoizedUser.name, memoizedUser.color, memoizedUser.avatar]);
|
|
44363
44708
|
useFlowLifecycle({ editor: ixoEditor, connectionStatus, enabled: permissions.write });
|
|
44364
|
-
|
|
44709
|
+
useEffect151(() => {
|
|
44365
44710
|
if (!ixoEditor) return;
|
|
44366
44711
|
setActiveEditor(ixoEditor);
|
|
44367
44712
|
return () => {
|
|
@@ -44428,7 +44773,7 @@ function sanitizeThemeForMantine7(theme) {
|
|
|
44428
44773
|
}
|
|
44429
44774
|
|
|
44430
44775
|
// src/mantine/components/CommandPalette.tsx
|
|
44431
|
-
import React364, { useEffect as
|
|
44776
|
+
import React364, { useEffect as useEffect152, useRef as useRef42, useState as useState180, useMemo as useMemo152, useCallback as useCallback170 } from "react";
|
|
44432
44777
|
import { Box as Box68, Text as Text238, Stack as Stack264 } from "@mantine/core";
|
|
44433
44778
|
var GROUP_ORDER = {
|
|
44434
44779
|
Headings: 0,
|
|
@@ -44460,7 +44805,7 @@ function translateGroupLabel(groupKey, t) {
|
|
|
44460
44805
|
function PaletteItem({ item, isSelected, onClick, id }) {
|
|
44461
44806
|
const ref = useRef42(null);
|
|
44462
44807
|
const [hovered, setHovered] = useState180(false);
|
|
44463
|
-
|
|
44808
|
+
useEffect152(() => {
|
|
44464
44809
|
if (isSelected && ref.current) {
|
|
44465
44810
|
ref.current.scrollIntoView({ block: "nearest" });
|
|
44466
44811
|
}
|
|
@@ -44687,7 +45032,7 @@ function PanelContent({ theme: _theme }) {
|
|
|
44687
45032
|
}
|
|
44688
45033
|
|
|
44689
45034
|
// src/mantine/components/CoverImage.tsx
|
|
44690
|
-
import React370, { useState as useState184, useRef as useRef43, useEffect as
|
|
45035
|
+
import React370, { useState as useState184, useRef as useRef43, useEffect as useEffect155, useMemo as useMemo155 } from "react";
|
|
44691
45036
|
import { Box as Box73, Group as Group146 } from "@mantine/core";
|
|
44692
45037
|
import { IconMoodSmile, IconPhoto as IconPhoto6, IconSettings as IconSettings22, IconArrowsMove, IconTrash as IconTrash14, IconRefresh as IconRefresh12 } from "@tabler/icons-react";
|
|
44693
45038
|
|
|
@@ -44867,7 +45212,7 @@ var CoverImageButton = forwardRef(function CoverImageButton2({ isActive = false,
|
|
|
44867
45212
|
});
|
|
44868
45213
|
|
|
44869
45214
|
// src/mantine/components/Base/BaseIconPicker.tsx
|
|
44870
|
-
import React367, { useState as useState182, useMemo as useMemo153, useEffect as
|
|
45215
|
+
import React367, { useState as useState182, useMemo as useMemo153, useEffect as useEffect153 } from "react";
|
|
44871
45216
|
import { TextInput as TextInput11, Tabs as Tabs4, Box as Box70, Stack as Stack265, UnstyledButton as UnstyledButton9, Text as Text240, Center as Center15, ScrollArea as ScrollArea10, Group as Group144, Popover as Popover6 } from "@mantine/core";
|
|
44872
45217
|
import * as TablerIcons2 from "@tabler/icons-react";
|
|
44873
45218
|
import { IconSearch as IconSearch9, IconX as IconX16, IconChevronLeft, IconChevronRight as IconChevronRight13 } from "@tabler/icons-react";
|
|
@@ -44912,7 +45257,7 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, onRemove
|
|
|
44912
45257
|
const query = searchQuery.toLowerCase();
|
|
44913
45258
|
return allIcons.filter(([name]) => name.toLowerCase().includes(query));
|
|
44914
45259
|
}, [allIcons, searchQuery]);
|
|
44915
|
-
|
|
45260
|
+
useEffect153(() => {
|
|
44916
45261
|
setCurrentPage(1);
|
|
44917
45262
|
}, [searchQuery]);
|
|
44918
45263
|
const paginatedIcons = useMemo153(() => {
|
|
@@ -45098,7 +45443,7 @@ function PageIcon({ src, iconSize = 64, useCenter = false, style }) {
|
|
|
45098
45443
|
import { useDisclosure as useDisclosure8 } from "@mantine/hooks";
|
|
45099
45444
|
|
|
45100
45445
|
// src/mantine/components/FlowSettingsPanel.tsx
|
|
45101
|
-
import React369, { useState as useState183, useEffect as
|
|
45446
|
+
import React369, { useState as useState183, useEffect as useEffect154, useCallback as useCallback171 } from "react";
|
|
45102
45447
|
import { Stack as Stack266, Group as Group145, Button as Button83, ActionIcon as ActionIcon49, Text as Text241, Box as Box72 } from "@mantine/core";
|
|
45103
45448
|
import { IconPlus as IconPlus13, IconTrash as IconTrash13 } from "@tabler/icons-react";
|
|
45104
45449
|
var SYSTEM_KEYS = /* @__PURE__ */ new Set(["@context", "_type", "schema_version", "doc_id", "title", "createdAt", "createdBy", "flowOwnerDid"]);
|
|
@@ -45116,7 +45461,7 @@ var FlowSettingsPanel = ({ editor }) => {
|
|
|
45116
45461
|
}
|
|
45117
45462
|
setRows(customRows);
|
|
45118
45463
|
}, [editor]);
|
|
45119
|
-
|
|
45464
|
+
useEffect154(() => {
|
|
45120
45465
|
loadSettings();
|
|
45121
45466
|
}, [loadSettings]);
|
|
45122
45467
|
const handleKeyChange = useCallback171(
|
|
@@ -45181,7 +45526,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
45181
45526
|
const [metadata, setMetadata] = useState184(() => editor?.getPageMetadata?.() || null);
|
|
45182
45527
|
const settingsPanelContent = useMemo155(() => editor ? /* @__PURE__ */ React370.createElement(FlowSettingsPanel, { editor }) : null, [editor]);
|
|
45183
45528
|
const { open: openSettings } = usePanel("flow-settings-panel", settingsPanelContent);
|
|
45184
|
-
|
|
45529
|
+
useEffect155(() => {
|
|
45185
45530
|
if (!editor?._metadataManager) {
|
|
45186
45531
|
return;
|
|
45187
45532
|
}
|
|
@@ -45471,7 +45816,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
45471
45816
|
}
|
|
45472
45817
|
|
|
45473
45818
|
// src/mantine/components/PageTitle.tsx
|
|
45474
|
-
import React371, { useState as useState185, useEffect as
|
|
45819
|
+
import React371, { useState as useState185, useEffect as useEffect156, useRef as useRef44, useCallback as useCallback172 } from "react";
|
|
45475
45820
|
import { Box as Box74 } from "@mantine/core";
|
|
45476
45821
|
var DEFAULT_TITLE = "New page";
|
|
45477
45822
|
function isUserTitle(name) {
|
|
@@ -45520,7 +45865,7 @@ function PageTitle({ editor, editable }) {
|
|
|
45520
45865
|
const [hasIcon, setHasIcon] = useState185(false);
|
|
45521
45866
|
const titleRef = useRef44(null);
|
|
45522
45867
|
const isComposing = useRef44(false);
|
|
45523
|
-
|
|
45868
|
+
useEffect156(() => {
|
|
45524
45869
|
if (!editor?._metadataManager) return;
|
|
45525
45870
|
const metadata = editor._metadataManager.getMetadata();
|
|
45526
45871
|
const initial = isUserTitle(metadata?.title);
|
|
@@ -45540,7 +45885,7 @@ function PageTitle({ editor, editable }) {
|
|
|
45540
45885
|
});
|
|
45541
45886
|
return unsubscribe;
|
|
45542
45887
|
}, [editor]);
|
|
45543
|
-
|
|
45888
|
+
useEffect156(() => {
|
|
45544
45889
|
if (titleRef.current && title && !titleRef.current.textContent) {
|
|
45545
45890
|
titleRef.current.textContent = title;
|
|
45546
45891
|
}
|
|
@@ -45584,7 +45929,7 @@ function PageTitle({ editor, editable }) {
|
|
|
45584
45929
|
},
|
|
45585
45930
|
[editor, saveTitle]
|
|
45586
45931
|
);
|
|
45587
|
-
|
|
45932
|
+
useEffect156(() => {
|
|
45588
45933
|
const handleEditorKeyDown = (e) => {
|
|
45589
45934
|
if (e.key !== "ArrowUp" || !titleRef.current) return;
|
|
45590
45935
|
if (document.getElementById("bn-suggestion-menu")) return;
|
|
@@ -45674,7 +46019,7 @@ if (typeof document !== "undefined") {
|
|
|
45674
46019
|
}
|
|
45675
46020
|
|
|
45676
46021
|
// src/mantine/components/ExternalDropZone.tsx
|
|
45677
|
-
import React372, { useCallback as useCallback173, useEffect as
|
|
46022
|
+
import React372, { useCallback as useCallback173, useEffect as useEffect157, useRef as useRef45, useState as useState186 } from "react";
|
|
45678
46023
|
import { Box as Box75 } from "@mantine/core";
|
|
45679
46024
|
var SCROLL_ZONE_SIZE = 80;
|
|
45680
46025
|
var SCROLL_SPEED = 12;
|
|
@@ -45850,7 +46195,7 @@ var ExternalDropZone = ({
|
|
|
45850
46195
|
},
|
|
45851
46196
|
[onDrop, stopAutoScroll]
|
|
45852
46197
|
);
|
|
45853
|
-
|
|
46198
|
+
useEffect157(() => {
|
|
45854
46199
|
const handleGlobalDragEnd = () => {
|
|
45855
46200
|
setIsValidDrag(false);
|
|
45856
46201
|
dropPositionRef.current = null;
|
|
@@ -45908,7 +46253,7 @@ var ExternalDropZone = ({
|
|
|
45908
46253
|
},
|
|
45909
46254
|
[getScrollContainer]
|
|
45910
46255
|
);
|
|
45911
|
-
|
|
46256
|
+
useEffect157(() => {
|
|
45912
46257
|
if (!isPlacementMode) return;
|
|
45913
46258
|
const handleKeyDown = (e) => {
|
|
45914
46259
|
if (e.key === "Escape") {
|
|
@@ -45931,13 +46276,13 @@ var ExternalDropZone = ({
|
|
|
45931
46276
|
document.removeEventListener("click", handleGlobalClick, true);
|
|
45932
46277
|
};
|
|
45933
46278
|
}, [isPlacementMode, onPlacementCancel]);
|
|
45934
|
-
|
|
46279
|
+
useEffect157(() => {
|
|
45935
46280
|
if (!isPlacementMode) {
|
|
45936
46281
|
setIsHoveringInPlacementMode(false);
|
|
45937
46282
|
dropPositionRef.current = null;
|
|
45938
46283
|
}
|
|
45939
46284
|
}, [isPlacementMode]);
|
|
45940
|
-
|
|
46285
|
+
useEffect157(() => {
|
|
45941
46286
|
const isActive = isValidDrag || isPlacementMode && isHoveringInPlacementMode;
|
|
45942
46287
|
if (isActive) {
|
|
45943
46288
|
document.body.classList.add("external-artifact-drag-active");
|
|
@@ -45948,7 +46293,7 @@ var ExternalDropZone = ({
|
|
|
45948
46293
|
document.body.classList.remove("external-artifact-drag-active");
|
|
45949
46294
|
};
|
|
45950
46295
|
}, [isValidDrag, isPlacementMode, isHoveringInPlacementMode]);
|
|
45951
|
-
|
|
46296
|
+
useEffect157(() => {
|
|
45952
46297
|
return () => {
|
|
45953
46298
|
if (scrollAnimationRef.current) {
|
|
45954
46299
|
cancelAnimationFrame(scrollAnimationRef.current);
|
|
@@ -46220,7 +46565,7 @@ function IxoEditor({
|
|
|
46220
46565
|
import React375 from "react";
|
|
46221
46566
|
|
|
46222
46567
|
// src/mantine/components/DevUcanGrantButton.tsx
|
|
46223
|
-
import React374, { useEffect as
|
|
46568
|
+
import React374, { useEffect as useEffect158, useMemo as useMemo157, useState as useState187 } from "react";
|
|
46224
46569
|
import { Alert as Alert87, Badge as Badge58, Button as Button84, Checkbox as Checkbox14, Divider as Divider44, Group as Group147, Loader as Loader81, Modal as Modal4, Paper as Paper22, Select as Select9, Stack as Stack267, Text as Text242 } from "@mantine/core";
|
|
46225
46570
|
import { IconKey as IconKey4, IconShieldPlus as IconShieldPlus5 } from "@tabler/icons-react";
|
|
46226
46571
|
var FLOW_AGENT_COMMAND_TYPES = [
|
|
@@ -46330,7 +46675,7 @@ function DevUcanGrantButton({ editor, handlers: propHandlers }) {
|
|
|
46330
46675
|
hasSigningHandler
|
|
46331
46676
|
});
|
|
46332
46677
|
};
|
|
46333
|
-
|
|
46678
|
+
useEffect158(() => {
|
|
46334
46679
|
if (!opened || !roomId || !matrixClient) return;
|
|
46335
46680
|
let cancelled = false;
|
|
46336
46681
|
setLoadingMembers(true);
|
|
@@ -46584,7 +46929,7 @@ function DebugButton({ editor, handlers }) {
|
|
|
46584
46929
|
}
|
|
46585
46930
|
|
|
46586
46931
|
// src/mantine/components/PageHeader.tsx
|
|
46587
|
-
import React376, { useState as useState188, useRef as useRef46, useEffect as
|
|
46932
|
+
import React376, { useState as useState188, useRef as useRef46, useEffect as useEffect159 } from "react";
|
|
46588
46933
|
function PageHeader({
|
|
46589
46934
|
title = "New page",
|
|
46590
46935
|
icon: icon2,
|
|
@@ -46600,7 +46945,7 @@ function PageHeader({
|
|
|
46600
46945
|
const [isPrivacyOpen, setIsPrivacyOpen] = useState188(false);
|
|
46601
46946
|
const menuRef = useRef46(null);
|
|
46602
46947
|
const privacyRef = useRef46(null);
|
|
46603
|
-
|
|
46948
|
+
useEffect159(() => {
|
|
46604
46949
|
function handleClickOutside(event) {
|
|
46605
46950
|
if (menuRef.current && !menuRef.current.contains(event.target)) {
|
|
46606
46951
|
setIsMenuOpen(false);
|
|
@@ -46870,7 +47215,7 @@ var EntitySigningSetup = ({ opened, onClose, entityDid, entityName, onSetup }) =
|
|
|
46870
47215
|
};
|
|
46871
47216
|
|
|
46872
47217
|
// src/mantine/components/FlowPermissionsPanel.tsx
|
|
46873
|
-
import React378, { useState as useState190, useEffect as
|
|
47218
|
+
import React378, { useState as useState190, useEffect as useEffect160, useMemo as useMemo158 } from "react";
|
|
46874
47219
|
import { Stack as Stack269, Text as Text244, Paper as Paper23, Group as Group149, Badge as Badge59, Button as Button86, ActionIcon as ActionIcon50, Loader as Loader82, Alert as Alert89, Divider as Divider45 } from "@mantine/core";
|
|
46875
47220
|
import { IconPlus as IconPlus14, IconTrash as IconTrash15, IconShieldCheck as IconShieldCheck16, IconUser as IconUser14, IconRobot as IconRobot4, IconBuilding as IconBuilding2 } from "@tabler/icons-react";
|
|
46876
47221
|
var FlowPermissionsPanel = ({ editor, entityDid, entityName, onGrantPermission, onRevokePermission, getUserDisplayName }) => {
|
|
@@ -46883,7 +47228,7 @@ var FlowPermissionsPanel = ({ editor, entityDid, entityName, onGrantPermission,
|
|
|
46883
47228
|
}
|
|
46884
47229
|
return null;
|
|
46885
47230
|
}, [editor]);
|
|
46886
|
-
|
|
47231
|
+
useEffect160(() => {
|
|
46887
47232
|
const loadDelegations = async () => {
|
|
46888
47233
|
setLoading(true);
|
|
46889
47234
|
let allDelegations = [];
|
|
@@ -47225,6 +47570,10 @@ export {
|
|
|
47225
47570
|
EntitySigningSetup,
|
|
47226
47571
|
FlowPermissionsPanel,
|
|
47227
47572
|
GrantPermissionModal,
|
|
47573
|
+
useOpenSurveyStore,
|
|
47574
|
+
snapshotOpenSurvey,
|
|
47575
|
+
fillOpenSurvey,
|
|
47576
|
+
useRegisterOpenSurvey,
|
|
47228
47577
|
GraphQLClient,
|
|
47229
47578
|
ixoGraphQLClient,
|
|
47230
47579
|
getEntity,
|
|
@@ -47238,4 +47587,4 @@ export {
|
|
|
47238
47587
|
getExtraSlashMenuItems,
|
|
47239
47588
|
useCreateIxoEditor
|
|
47240
47589
|
};
|
|
47241
|
-
//# sourceMappingURL=chunk-
|
|
47590
|
+
//# sourceMappingURL=chunk-HDQKWNUR.mjs.map
|