@ixo/editor 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1563,13 +1563,13 @@ var CheckboxBlockSpec = createReactBlockSpec(
|
|
|
1563
1563
|
);
|
|
1564
1564
|
|
|
1565
1565
|
// src/mantine/blocks/list/ListBlock.tsx
|
|
1566
|
-
import
|
|
1566
|
+
import React37, { useState as useState6, useEffect as useEffect6, useMemo as useMemo6, useCallback as useCallback8 } from "react";
|
|
1567
1567
|
import { createReactBlockSpec as createReactBlockSpec2 } from "@blocknote/react";
|
|
1568
|
-
import { Group as Group8, Stack as
|
|
1568
|
+
import { Group as Group8, Stack as Stack24, Text as Text24, Button as Button8, ActionIcon as ActionIcon3, Alert as Alert4, Loader as Loader2, Center as Center2, Flex as Flex14 } from "@mantine/core";
|
|
1569
1569
|
|
|
1570
1570
|
// src/mantine/blocks/list/modal/ListConfigModal.tsx
|
|
1571
|
-
import
|
|
1572
|
-
import { Modal, Group as Group7, Box as
|
|
1571
|
+
import React34, { useState as useState5 } from "react";
|
|
1572
|
+
import { Modal, Group as Group7, Box as Box14 } from "@mantine/core";
|
|
1573
1573
|
|
|
1574
1574
|
// src/mantine/blocks/list/modal/ListTypeSelectionStep.tsx
|
|
1575
1575
|
import React14 from "react";
|
|
@@ -1589,7 +1589,7 @@ var linkedResourcesConfigFields = [
|
|
|
1589
1589
|
description: "The DID identifier to fetch linked resources from",
|
|
1590
1590
|
type: "text",
|
|
1591
1591
|
placeholder: "did:ixo:entity:example123",
|
|
1592
|
-
required:
|
|
1592
|
+
required: false
|
|
1593
1593
|
}
|
|
1594
1594
|
];
|
|
1595
1595
|
var linkedResourcesHandlerKey = "getEntity";
|
|
@@ -1906,6 +1906,43 @@ var validatorsFilterFields = [
|
|
|
1906
1906
|
];
|
|
1907
1907
|
var validatorsHandlerKey = "getValidators";
|
|
1908
1908
|
|
|
1909
|
+
// src/mantine/blocks/list/dao_members/config.ts
|
|
1910
|
+
var daoMembersMetadata = {
|
|
1911
|
+
id: "dao_members",
|
|
1912
|
+
name: "Dao Members",
|
|
1913
|
+
description: "Display Dao members",
|
|
1914
|
+
icon: "\u{1F464}"
|
|
1915
|
+
};
|
|
1916
|
+
var daoMembersConfigFields = [
|
|
1917
|
+
{
|
|
1918
|
+
key: "address",
|
|
1919
|
+
label: "Wallet Address",
|
|
1920
|
+
description: "Your wallet address to determine your membership",
|
|
1921
|
+
type: "text",
|
|
1922
|
+
required: false
|
|
1923
|
+
},
|
|
1924
|
+
{
|
|
1925
|
+
key: "groupIds",
|
|
1926
|
+
label: "Group IDs",
|
|
1927
|
+
description: "The IDs of the DAO groups to fetch members from",
|
|
1928
|
+
type: "select",
|
|
1929
|
+
required: false
|
|
1930
|
+
},
|
|
1931
|
+
{
|
|
1932
|
+
key: "withBalance",
|
|
1933
|
+
label: "With Balance",
|
|
1934
|
+
description: "Whether to include the balance of the members",
|
|
1935
|
+
type: "switch",
|
|
1936
|
+
required: false
|
|
1937
|
+
}
|
|
1938
|
+
];
|
|
1939
|
+
var daoMembersSortFields = [
|
|
1940
|
+
{ key: "username", label: "Username", type: "string" },
|
|
1941
|
+
{ key: "percentage", label: "Share %", type: "string" },
|
|
1942
|
+
{ key: "role", label: "Role", type: "string" }
|
|
1943
|
+
];
|
|
1944
|
+
var daoMembersHandlerKey = "getDaoMembers";
|
|
1945
|
+
|
|
1909
1946
|
// src/mantine/blocks/list/registry.ts
|
|
1910
1947
|
var listTypeRegistry = {
|
|
1911
1948
|
linked_resources: {
|
|
@@ -1984,6 +2021,13 @@ var listTypeRegistry = {
|
|
|
1984
2021
|
sortFields: validatorsSortFields,
|
|
1985
2022
|
filterFields: validatorsFilterFields,
|
|
1986
2023
|
handlerKey: validatorsHandlerKey
|
|
2024
|
+
},
|
|
2025
|
+
dao_members: {
|
|
2026
|
+
metadata: daoMembersMetadata,
|
|
2027
|
+
configFields: daoMembersConfigFields,
|
|
2028
|
+
sortFields: daoMembersSortFields,
|
|
2029
|
+
filterFields: [],
|
|
2030
|
+
handlerKey: daoMembersHandlerKey
|
|
1987
2031
|
}
|
|
1988
2032
|
};
|
|
1989
2033
|
var getAllListTypes = () => {
|
|
@@ -2041,7 +2085,7 @@ var ListConfigurationStep = ({ listType, config, onConfigChange, onPrev, onNext,
|
|
|
2041
2085
|
const handleAutoFill = async () => {
|
|
2042
2086
|
if (listType === "transactions" && handlers?.getCurrentUser) {
|
|
2043
2087
|
try {
|
|
2044
|
-
const user =
|
|
2088
|
+
const user = handlers.getCurrentUser();
|
|
2045
2089
|
onConfigChange("address", user.address);
|
|
2046
2090
|
} catch (error) {
|
|
2047
2091
|
console.error("Failed to get current user:", error);
|
|
@@ -2090,8 +2134,8 @@ var ListConfigurationStep = ({ listType, config, onConfigChange, onPrev, onNext,
|
|
|
2090
2134
|
};
|
|
2091
2135
|
|
|
2092
2136
|
// src/mantine/blocks/list/modal/ListPreviewStep.tsx
|
|
2093
|
-
import
|
|
2094
|
-
import { Stack as
|
|
2137
|
+
import React32, { useState as useState4, useEffect as useEffect5 } from "react";
|
|
2138
|
+
import { Stack as Stack22, Text as Text20, Button as Button6, Alert as Alert3, Loader, Center, Group as Group6 } from "@mantine/core";
|
|
2095
2139
|
|
|
2096
2140
|
// src/mantine/blocks/list/linked_resources/LinkedResourcesList.tsx
|
|
2097
2141
|
import React19 from "react";
|
|
@@ -2370,6 +2414,24 @@ function ListPagination({ page, setPage, totalPages }) {
|
|
|
2370
2414
|
// src/core/constants.ts
|
|
2371
2415
|
var DEFAULT_PAGE_SIZE = 5;
|
|
2372
2416
|
|
|
2417
|
+
// src/mantine/blocks/list/dao_members/MembersList.tsx
|
|
2418
|
+
import React31 from "react";
|
|
2419
|
+
import { Text as Text19, Box as Box13, Image as Image10, Stack as Stack21, Flex as Flex13 } from "@mantine/core";
|
|
2420
|
+
var DaoMembersList = ({ items, mods, isItemChecked, onItemCheck }) => {
|
|
2421
|
+
if (!items || items.length === 0) {
|
|
2422
|
+
return /* @__PURE__ */ React31.createElement(Text19, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No members found");
|
|
2423
|
+
}
|
|
2424
|
+
const rows = items.map((member) => /* @__PURE__ */ React31.createElement(ListItemContainer, { key: member.did }, /* @__PURE__ */ React31.createElement(Flex13, { align: "center", gap: "sm" }, /* @__PURE__ */ React31.createElement(Image10, { radius: 16, w: 32, h: 32, src: member.icon }), /* @__PURE__ */ React31.createElement(Stack21, { gap: 0 }, /* @__PURE__ */ React31.createElement(Text19, { size: "sm", fw: 500 }, member.username || "Unknown User"), /* @__PURE__ */ React31.createElement(Text19, { size: "xs", c: "dimmed", lineClamp: 1 }, member.address || "No address"))), /* @__PURE__ */ React31.createElement(Flex13, { align: "center", gap: "md" }, /* @__PURE__ */ React31.createElement(Stack21, { ta: "right", gap: 0 }, /* @__PURE__ */ React31.createElement(Text19, { size: "sm", fw: 500, c: "blue" }, member.percentage || "0%"), /* @__PURE__ */ React31.createElement(Text19, { size: "xs", c: "dimmed", tt: "capitalize" }, member.role || "member")), mods && /* @__PURE__ */ React31.createElement(
|
|
2425
|
+
ListItemCheckbox,
|
|
2426
|
+
{
|
|
2427
|
+
ariaLabel: `Select member ${member.username || member.did}`,
|
|
2428
|
+
checked: isItemChecked?.(member.did) || false,
|
|
2429
|
+
onCheck: (checked) => onItemCheck?.(member.did, checked)
|
|
2430
|
+
}
|
|
2431
|
+
))));
|
|
2432
|
+
return /* @__PURE__ */ React31.createElement(Box13, { flex: 1 }, /* @__PURE__ */ React31.createElement(Stack21, { gap: "xs" }, rows));
|
|
2433
|
+
};
|
|
2434
|
+
|
|
2373
2435
|
// src/mantine/blocks/list/modal/ListPreviewStep.tsx
|
|
2374
2436
|
var ListPreviewStep = ({ listType, config, onAddToBlock, onPrev }) => {
|
|
2375
2437
|
const [data, setData] = useState4(null);
|
|
@@ -2385,15 +2447,20 @@ var ListPreviewStep = ({ listType, config, onAddToBlock, onPrev }) => {
|
|
|
2385
2447
|
setError(null);
|
|
2386
2448
|
try {
|
|
2387
2449
|
let result;
|
|
2450
|
+
let did;
|
|
2451
|
+
let userAddress;
|
|
2452
|
+
let groupIds;
|
|
2388
2453
|
switch (listType) {
|
|
2389
2454
|
case "linked_resources":
|
|
2390
|
-
|
|
2391
|
-
|
|
2455
|
+
did = handlers.getEntityDid();
|
|
2456
|
+
if (!did && !config.did) throw new Error("DID is required");
|
|
2457
|
+
result = await handlers.getEntity(did || config.did);
|
|
2392
2458
|
setData({ items: result.linkedResource });
|
|
2393
2459
|
break;
|
|
2394
2460
|
case "assets":
|
|
2395
|
-
|
|
2396
|
-
|
|
2461
|
+
did = handlers.getEntityDid();
|
|
2462
|
+
if (!did && !config.collectionDid) throw new Error("Collection DID is required");
|
|
2463
|
+
result = await handlers.getAssets(did || config.collectionDid, page);
|
|
2397
2464
|
setData({ items: result.data });
|
|
2398
2465
|
break;
|
|
2399
2466
|
case "transactions":
|
|
@@ -2403,33 +2470,39 @@ var ListPreviewStep = ({ listType, config, onAddToBlock, onPrev }) => {
|
|
|
2403
2470
|
setData({ items: result.data });
|
|
2404
2471
|
break;
|
|
2405
2472
|
case "collections":
|
|
2406
|
-
|
|
2407
|
-
|
|
2473
|
+
did = handlers.getEntityDid();
|
|
2474
|
+
if (!did && !config.relayedNodeDid) throw new Error("Relayer is required");
|
|
2475
|
+
result = await handlers.getCollections(did || config.relayedNodeDid, page);
|
|
2408
2476
|
setData({ items: result.data });
|
|
2409
2477
|
break;
|
|
2410
2478
|
case "investments":
|
|
2411
|
-
|
|
2412
|
-
|
|
2479
|
+
did = handlers.getEntityDid();
|
|
2480
|
+
if (!did && !config.relayedNodeDid) throw new Error("Relayer is required");
|
|
2481
|
+
result = await handlers.getInvestments(did || config.relayedNodeDid, page);
|
|
2413
2482
|
setData({ items: result.data });
|
|
2414
2483
|
break;
|
|
2415
2484
|
case "oracles":
|
|
2416
|
-
|
|
2417
|
-
|
|
2485
|
+
did = handlers.getEntityDid();
|
|
2486
|
+
if (!did && !config.relayedNodeDid) throw new Error("Relayer is required");
|
|
2487
|
+
result = await handlers.getOracles(did || config.relayedNodeDid, page);
|
|
2418
2488
|
setData({ items: result.data });
|
|
2419
2489
|
break;
|
|
2420
2490
|
case "pods":
|
|
2421
|
-
|
|
2422
|
-
|
|
2491
|
+
did = handlers.getEntityDid();
|
|
2492
|
+
if (!did && !config.relayedNodeDid) throw new Error("Relayer is required");
|
|
2493
|
+
result = await handlers.getPODs(did || config.relayedNodeDid, page);
|
|
2423
2494
|
setData({ items: result.data });
|
|
2424
2495
|
break;
|
|
2425
2496
|
case "proposals":
|
|
2426
|
-
|
|
2427
|
-
|
|
2497
|
+
did = handlers.getEntityDid();
|
|
2498
|
+
if (!did && !config.relayedNodeDid) throw new Error("Relayer is required");
|
|
2499
|
+
result = await handlers.getProposals(did || config.relayedNodeDid, page);
|
|
2428
2500
|
setData({ items: result.data });
|
|
2429
2501
|
break;
|
|
2430
2502
|
case "requests":
|
|
2431
|
-
|
|
2432
|
-
|
|
2503
|
+
did = handlers.getEntityDid();
|
|
2504
|
+
if (!did && !config.relayedNodeDid) throw new Error("Relayer is required");
|
|
2505
|
+
result = await handlers.getRequests(did || config.relayedNodeDid, page);
|
|
2433
2506
|
setData({ items: result.data });
|
|
2434
2507
|
break;
|
|
2435
2508
|
case "group_members":
|
|
@@ -2439,8 +2512,17 @@ var ListPreviewStep = ({ listType, config, onAddToBlock, onPrev }) => {
|
|
|
2439
2512
|
setData({ items: result.data });
|
|
2440
2513
|
break;
|
|
2441
2514
|
case "validators":
|
|
2442
|
-
|
|
2443
|
-
|
|
2515
|
+
did = handlers.getEntityDid();
|
|
2516
|
+
if (!did && !config.relayedNodeDid) throw new Error("Relayer is required");
|
|
2517
|
+
result = await handlers.getValidators(did || config.relayedNodeDid, page);
|
|
2518
|
+
setData({ items: result.data });
|
|
2519
|
+
break;
|
|
2520
|
+
case "dao_members":
|
|
2521
|
+
userAddress = handlers.getCurrentUser();
|
|
2522
|
+
groupIds = handlers.getDaoGroupsIds();
|
|
2523
|
+
if (!userAddress.address && !config.address) throw new Error("Address is required");
|
|
2524
|
+
if (!groupIds && !config.groupIds) throw new Error("Group Ids are required");
|
|
2525
|
+
result = await handlers.getDaoMembers(userAddress.address || config.address, groupIds || config.groupIds, config.withBalance, page);
|
|
2444
2526
|
setData({ items: result.data });
|
|
2445
2527
|
break;
|
|
2446
2528
|
default:
|
|
@@ -2459,37 +2541,39 @@ var ListPreviewStep = ({ listType, config, onAddToBlock, onPrev }) => {
|
|
|
2459
2541
|
if (!data) return null;
|
|
2460
2542
|
switch (listType) {
|
|
2461
2543
|
case "linked_resources":
|
|
2462
|
-
return /* @__PURE__ */
|
|
2544
|
+
return /* @__PURE__ */ React32.createElement(LinkedResourcesList, { items: data.items, config });
|
|
2463
2545
|
case "assets":
|
|
2464
|
-
return /* @__PURE__ */
|
|
2546
|
+
return /* @__PURE__ */ React32.createElement(AssetsList, { items: data.items, config });
|
|
2465
2547
|
case "transactions":
|
|
2466
|
-
return /* @__PURE__ */
|
|
2548
|
+
return /* @__PURE__ */ React32.createElement(TransactionsList, { items: data.items, config });
|
|
2467
2549
|
case "collections":
|
|
2468
|
-
return /* @__PURE__ */
|
|
2550
|
+
return /* @__PURE__ */ React32.createElement(CollectionsList, { items: data.items });
|
|
2469
2551
|
case "investments":
|
|
2470
|
-
return /* @__PURE__ */
|
|
2552
|
+
return /* @__PURE__ */ React32.createElement(InvestmentsList, { items: data.items });
|
|
2471
2553
|
case "oracles":
|
|
2472
|
-
return /* @__PURE__ */
|
|
2554
|
+
return /* @__PURE__ */ React32.createElement(OraclesList, { items: data.items });
|
|
2473
2555
|
case "pods":
|
|
2474
|
-
return /* @__PURE__ */
|
|
2556
|
+
return /* @__PURE__ */ React32.createElement(PodsList, { items: data.items });
|
|
2475
2557
|
case "proposals":
|
|
2476
|
-
return /* @__PURE__ */
|
|
2558
|
+
return /* @__PURE__ */ React32.createElement(ProposalsList, { items: data.items });
|
|
2477
2559
|
case "requests":
|
|
2478
|
-
return /* @__PURE__ */
|
|
2560
|
+
return /* @__PURE__ */ React32.createElement(RequestsList, { items: data.items });
|
|
2479
2561
|
case "group_members":
|
|
2480
|
-
return /* @__PURE__ */
|
|
2562
|
+
return /* @__PURE__ */ React32.createElement(MembersList, { items: data.items });
|
|
2563
|
+
case "dao_members":
|
|
2564
|
+
return /* @__PURE__ */ React32.createElement(DaoMembersList, { items: data.items });
|
|
2481
2565
|
case "validators":
|
|
2482
|
-
return /* @__PURE__ */
|
|
2566
|
+
return /* @__PURE__ */ React32.createElement(ValidatorsList, { items: data.items });
|
|
2483
2567
|
default:
|
|
2484
2568
|
return null;
|
|
2485
2569
|
}
|
|
2486
2570
|
};
|
|
2487
|
-
return /* @__PURE__ */
|
|
2571
|
+
return /* @__PURE__ */ React32.createElement(Stack22, { gap: "md" }, /* @__PURE__ */ React32.createElement("div", null, /* @__PURE__ */ React32.createElement(Text20, { size: "lg", fw: 600, mb: "xs" }, "Preview ", typeConfig.metadata.name), /* @__PURE__ */ React32.createElement(Text20, { size: "sm", c: "dimmed" }, "Preview how your list will look with the current configuration")), loading && /* @__PURE__ */ React32.createElement(Center, { py: "xl" }, /* @__PURE__ */ React32.createElement(Stack22, { align: "center", gap: "sm" }, /* @__PURE__ */ React32.createElement(Loader, { size: "md" }), /* @__PURE__ */ React32.createElement(Text20, { size: "sm", c: "dimmed" }, "Loading preview..."))), error && /* @__PURE__ */ React32.createElement(Alert3, { color: "red", title: "Failed to load preview" }, /* @__PURE__ */ React32.createElement(Stack22, { gap: "xs" }, /* @__PURE__ */ React32.createElement(Text20, { size: "sm" }, error), /* @__PURE__ */ React32.createElement(Button6, { size: "xs", variant: "subtle", onClick: fetchData }, "Retry"))), !loading && !error && data && /* @__PURE__ */ React32.createElement(React32.Fragment, null, /* @__PURE__ */ React32.createElement("div", { style: { maxHeight: "400px", overflow: "auto" } }, renderListComponent()), /* @__PURE__ */ React32.createElement(ListPagination, { page, setPage, totalPages })), /* @__PURE__ */ React32.createElement(Group6, { justify: "space-between", mt: "md" }, /* @__PURE__ */ React32.createElement(Button6, { variant: "subtle", onClick: onPrev }, "Previous"), /* @__PURE__ */ React32.createElement(Button6, { onClick: onAddToBlock }, "Add to Block")));
|
|
2488
2572
|
};
|
|
2489
2573
|
|
|
2490
2574
|
// src/mantine/blocks/list/modal/ModalNavigation.tsx
|
|
2491
|
-
import
|
|
2492
|
-
import { Stack as
|
|
2575
|
+
import React33 from "react";
|
|
2576
|
+
import { Stack as Stack23, Button as Button7, Text as Text21 } from "@mantine/core";
|
|
2493
2577
|
var ModalNavigation = ({
|
|
2494
2578
|
steps,
|
|
2495
2579
|
activeStep,
|
|
@@ -2497,7 +2581,7 @@ var ModalNavigation = ({
|
|
|
2497
2581
|
showUpdateButton = false,
|
|
2498
2582
|
onUpdateBlock
|
|
2499
2583
|
}) => {
|
|
2500
|
-
return /* @__PURE__ */
|
|
2584
|
+
return /* @__PURE__ */ React33.createElement(Stack23, { gap: "xs", style: { height: "100%" } }, /* @__PURE__ */ React33.createElement(Stack23, { gap: "xs", style: { flex: 1 } }, steps.map((step) => /* @__PURE__ */ React33.createElement(
|
|
2501
2585
|
Button7,
|
|
2502
2586
|
{
|
|
2503
2587
|
key: step.id,
|
|
@@ -2515,8 +2599,8 @@ var ModalNavigation = ({
|
|
|
2515
2599
|
}
|
|
2516
2600
|
}
|
|
2517
2601
|
},
|
|
2518
|
-
/* @__PURE__ */
|
|
2519
|
-
))), showUpdateButton && /* @__PURE__ */
|
|
2602
|
+
/* @__PURE__ */ React33.createElement(Stack23, { gap: 2, align: "flex-start" }, /* @__PURE__ */ React33.createElement(Text21, { size: "sm", fw: 500 }, step.label), /* @__PURE__ */ React33.createElement(Text21, { size: "xs", opacity: 0.7 }, step.description))
|
|
2603
|
+
))), showUpdateButton && /* @__PURE__ */ React33.createElement(Button7, { variant: "filled", color: "blue", onClick: onUpdateBlock, style: { marginTop: "auto" } }, "Update Block"));
|
|
2520
2604
|
};
|
|
2521
2605
|
|
|
2522
2606
|
// src/mantine/blocks/list/modal/ListConfigModal.tsx
|
|
@@ -2589,9 +2673,9 @@ var ListConfigModal = ({ opened, onClose, onSave, initialConfig }) => {
|
|
|
2589
2673
|
const renderStepContent = () => {
|
|
2590
2674
|
switch (activeStep) {
|
|
2591
2675
|
case "type":
|
|
2592
|
-
return /* @__PURE__ */
|
|
2676
|
+
return /* @__PURE__ */ React34.createElement(ListTypeSelectionStep, { selectedType, onTypeSelect: handleTypeSelect, onNext: () => setActiveStep("configure") });
|
|
2593
2677
|
case "configure":
|
|
2594
|
-
return selectedType ? /* @__PURE__ */
|
|
2678
|
+
return selectedType ? /* @__PURE__ */ React34.createElement(
|
|
2595
2679
|
ListConfigurationStep,
|
|
2596
2680
|
{
|
|
2597
2681
|
listType: selectedType,
|
|
@@ -2603,12 +2687,12 @@ var ListConfigModal = ({ opened, onClose, onSave, initialConfig }) => {
|
|
|
2603
2687
|
}
|
|
2604
2688
|
) : null;
|
|
2605
2689
|
case "preview":
|
|
2606
|
-
return selectedType ? /* @__PURE__ */
|
|
2690
|
+
return selectedType ? /* @__PURE__ */ React34.createElement(ListPreviewStep, { listSortConfig: null, listType: selectedType, config, onAddToBlock: handleAddToBlock, onPrev: () => setActiveStep("configure") }) : null;
|
|
2607
2691
|
default:
|
|
2608
2692
|
return null;
|
|
2609
2693
|
}
|
|
2610
2694
|
};
|
|
2611
|
-
return /* @__PURE__ */
|
|
2695
|
+
return /* @__PURE__ */ React34.createElement(Modal, { opened, onClose: handleClose, title: "Configure List Block", size: "xl" }, /* @__PURE__ */ React34.createElement(Group7, { align: "flex-start", gap: "lg", style: { minHeight: "400px" } }, /* @__PURE__ */ React34.createElement(Box14, { style: { width: "200px", flexShrink: 0, height: "400px", display: "flex" } }, /* @__PURE__ */ React34.createElement(
|
|
2612
2696
|
ModalNavigation,
|
|
2613
2697
|
{
|
|
2614
2698
|
steps,
|
|
@@ -2617,22 +2701,22 @@ var ListConfigModal = ({ opened, onClose, onSave, initialConfig }) => {
|
|
|
2617
2701
|
showUpdateButton: selectedType !== null && isConfigValid(),
|
|
2618
2702
|
onUpdateBlock: handleAddToBlock
|
|
2619
2703
|
}
|
|
2620
|
-
)), /* @__PURE__ */
|
|
2704
|
+
)), /* @__PURE__ */ React34.createElement(Box14, { style: { flex: 1 } }, renderStepContent())));
|
|
2621
2705
|
};
|
|
2622
2706
|
|
|
2623
2707
|
// src/mantine/blocks/list/ListActionsMenu.tsx
|
|
2624
|
-
import
|
|
2625
|
-
import { Menu, Text as
|
|
2708
|
+
import React35 from "react";
|
|
2709
|
+
import { Menu, Text as Text22 } from "@mantine/core";
|
|
2626
2710
|
import { IconArrowDown, IconArrowUp, IconAdjustments, IconCheckbox as IconCheckbox2, IconAdjustmentsHorizontal } from "@tabler/icons-react";
|
|
2627
2711
|
var ListActionsMenu = ({ options, selectionMode, onSelectActionClick, value, onChange }) => {
|
|
2628
2712
|
const renderItem = (opt, direction) => {
|
|
2629
2713
|
const isActive = value?.key === opt.key && value?.direction === direction;
|
|
2630
2714
|
const Icon = direction === "asc" ? IconArrowUp : IconArrowDown;
|
|
2631
|
-
return /* @__PURE__ */
|
|
2715
|
+
return /* @__PURE__ */ React35.createElement(
|
|
2632
2716
|
Menu.Item,
|
|
2633
2717
|
{
|
|
2634
2718
|
key: `${opt.key}-${direction}`,
|
|
2635
|
-
leftSection: /* @__PURE__ */
|
|
2719
|
+
leftSection: /* @__PURE__ */ React35.createElement(Icon, { size: 16 }),
|
|
2636
2720
|
onClick: () => {
|
|
2637
2721
|
console.log("Changing sort: ", direction);
|
|
2638
2722
|
onChange({ key: opt.key, direction });
|
|
@@ -2642,7 +2726,7 @@ var ListActionsMenu = ({ options, selectionMode, onSelectActionClick, value, onC
|
|
|
2642
2726
|
opt.label
|
|
2643
2727
|
);
|
|
2644
2728
|
};
|
|
2645
|
-
return /* @__PURE__ */
|
|
2729
|
+
return /* @__PURE__ */ React35.createElement(Menu, { shadow: "md", width: 220 }, /* @__PURE__ */ React35.createElement(Menu.Target, null, /* @__PURE__ */ React35.createElement(Text22, { style: { cursor: "pointer" } }, /* @__PURE__ */ React35.createElement(IconAdjustmentsHorizontal, { size: 20 }))), /* @__PURE__ */ React35.createElement(Menu.Dropdown, null, /* @__PURE__ */ React35.createElement(Menu.Label, null, /* @__PURE__ */ React35.createElement(Text22, { c: "dimmed" }, "Order By")), options.map((opt) => /* @__PURE__ */ React35.createElement(React35.Fragment, { key: opt.key }, renderItem(opt, "desc"), renderItem(opt, "asc"))), /* @__PURE__ */ React35.createElement(Menu.Divider, null), /* @__PURE__ */ React35.createElement(Menu.Item, { leftSection: /* @__PURE__ */ React35.createElement(IconAdjustments, { size: 16 }) }, "Smart Filter"), /* @__PURE__ */ React35.createElement(Menu.Divider, null), /* @__PURE__ */ React35.createElement(Menu.Item, { onClick: () => onSelectActionClick(selectionMode === "single" ? null : "single"), leftSection: /* @__PURE__ */ React35.createElement(IconCheckbox2, { size: 16 }) }, "Single Select"), /* @__PURE__ */ React35.createElement(Menu.Item, { onClick: () => onSelectActionClick(selectionMode === "multi" ? null : "multi"), leftSection: /* @__PURE__ */ React35.createElement(IconCheckbox2, { size: 16 }) }, "Multi Select")));
|
|
2646
2730
|
};
|
|
2647
2731
|
|
|
2648
2732
|
// src/core/lib/sortListItems.ts
|
|
@@ -2665,10 +2749,10 @@ function sortListItems(data, sortOption) {
|
|
|
2665
2749
|
}
|
|
2666
2750
|
|
|
2667
2751
|
// src/mantine/blocks/list/FilterTab.tsx
|
|
2668
|
-
import
|
|
2669
|
-
import { UnstyledButton, Text as
|
|
2752
|
+
import React36 from "react";
|
|
2753
|
+
import { UnstyledButton, Text as Text23 } from "@mantine/core";
|
|
2670
2754
|
function FilterTab({ onClick, label, isActive }) {
|
|
2671
|
-
return /* @__PURE__ */
|
|
2755
|
+
return /* @__PURE__ */ React36.createElement(
|
|
2672
2756
|
UnstyledButton,
|
|
2673
2757
|
{
|
|
2674
2758
|
onClick,
|
|
@@ -2699,7 +2783,7 @@ function FilterTab({ onClick, label, isActive }) {
|
|
|
2699
2783
|
if (!isActive) e.currentTarget.style.background = "transparent";
|
|
2700
2784
|
}
|
|
2701
2785
|
},
|
|
2702
|
-
/* @__PURE__ */
|
|
2786
|
+
/* @__PURE__ */ React36.createElement(Text23, { size: "sm", fw: 500 }, label)
|
|
2703
2787
|
);
|
|
2704
2788
|
}
|
|
2705
2789
|
|
|
@@ -2717,9 +2801,9 @@ function filterListItems(items, filterOption) {
|
|
|
2717
2801
|
|
|
2718
2802
|
// src/mantine/blocks/list/ListBlock.tsx
|
|
2719
2803
|
import { IconArrowDown as IconArrowDown2, IconArrowUp as IconArrowUp2 } from "@tabler/icons-react";
|
|
2720
|
-
var IconSettings = () => /* @__PURE__ */
|
|
2721
|
-
var IconRefresh = () => /* @__PURE__ */
|
|
2722
|
-
var IconAlertCircle = () => /* @__PURE__ */
|
|
2804
|
+
var IconSettings = () => /* @__PURE__ */ React37.createElement("span", null, "\u2699\uFE0F");
|
|
2805
|
+
var IconRefresh = () => /* @__PURE__ */ React37.createElement("span", null, "\u{1F504}");
|
|
2806
|
+
var IconAlertCircle = () => /* @__PURE__ */ React37.createElement("span", null, "\u26A0\uFE0F");
|
|
2723
2807
|
var ListBlockContent = ({ block, editor }) => {
|
|
2724
2808
|
const [modalOpened, setModalOpened] = useState6(false);
|
|
2725
2809
|
const [data, setData] = useState6(null);
|
|
@@ -2836,15 +2920,20 @@ var ListBlockContent = ({ block, editor }) => {
|
|
|
2836
2920
|
setError(null);
|
|
2837
2921
|
try {
|
|
2838
2922
|
let result;
|
|
2923
|
+
let did;
|
|
2924
|
+
let groupIds;
|
|
2925
|
+
let userAddress;
|
|
2839
2926
|
switch (listType) {
|
|
2840
2927
|
case "linked_resources":
|
|
2841
|
-
|
|
2842
|
-
|
|
2928
|
+
did = handlers.getEntityDid();
|
|
2929
|
+
if (!did && !listConfig.did) throw new Error("DID is required");
|
|
2930
|
+
result = await handlers.getEntity(did || listConfig.did);
|
|
2843
2931
|
setData({ items: result.linkedResource });
|
|
2844
2932
|
break;
|
|
2845
2933
|
case "assets":
|
|
2846
|
-
|
|
2847
|
-
|
|
2934
|
+
did = handlers.getEntityDid();
|
|
2935
|
+
if (!did && !listConfig.collectionDid) throw new Error("Collection DID is required");
|
|
2936
|
+
result = await handlers.getAssets(did || listConfig.collectionDid, page);
|
|
2848
2937
|
setData({ items: result.data });
|
|
2849
2938
|
break;
|
|
2850
2939
|
case "transactions":
|
|
@@ -2854,33 +2943,39 @@ var ListBlockContent = ({ block, editor }) => {
|
|
|
2854
2943
|
setData({ items: result.data });
|
|
2855
2944
|
break;
|
|
2856
2945
|
case "collections":
|
|
2857
|
-
|
|
2858
|
-
|
|
2946
|
+
did = handlers.getEntityDid();
|
|
2947
|
+
if (!did && !listConfig.relayedNodeDid) throw new Error("Relayer is required");
|
|
2948
|
+
result = await handlers.getCollections(did || listConfig.relayedNodeDid, page);
|
|
2859
2949
|
setData({ items: result.data });
|
|
2860
2950
|
break;
|
|
2861
2951
|
case "investments":
|
|
2862
|
-
|
|
2863
|
-
|
|
2952
|
+
did = handlers.getEntityDid();
|
|
2953
|
+
if (!did && !listConfig.relayedNodeDid) throw new Error("Relayer is required");
|
|
2954
|
+
result = await handlers.getInvestments(did || listConfig.relayedNodeDid, page);
|
|
2864
2955
|
setData({ items: result.data });
|
|
2865
2956
|
break;
|
|
2866
2957
|
case "oracles":
|
|
2867
|
-
|
|
2868
|
-
|
|
2958
|
+
did = handlers.getEntityDid();
|
|
2959
|
+
if (!did && !listConfig.relayedNodeDid) throw new Error("Relayer is required");
|
|
2960
|
+
result = await handlers.getOracles(did || listConfig.relayedNodeDid, page);
|
|
2869
2961
|
setData({ items: result.data });
|
|
2870
2962
|
break;
|
|
2871
2963
|
case "pods":
|
|
2872
|
-
|
|
2873
|
-
|
|
2964
|
+
did = handlers.getEntityDid();
|
|
2965
|
+
if (!did && !listConfig.relayedNodeDid) throw new Error("Relayer is required");
|
|
2966
|
+
result = await handlers.getPODs(did || listConfig.relayedNodeDid, page);
|
|
2874
2967
|
setData({ items: result.data });
|
|
2875
2968
|
break;
|
|
2876
2969
|
case "proposals":
|
|
2877
|
-
|
|
2878
|
-
|
|
2970
|
+
did = handlers.getEntityDid();
|
|
2971
|
+
if (!did && !listConfig.relayedNodeDid) throw new Error("Relayer is required");
|
|
2972
|
+
result = await handlers.getProposals(did || listConfig.relayedNodeDid, page);
|
|
2879
2973
|
setData({ items: result.data });
|
|
2880
2974
|
break;
|
|
2881
2975
|
case "requests":
|
|
2882
|
-
|
|
2883
|
-
|
|
2976
|
+
did = handlers.getEntityDid();
|
|
2977
|
+
if (!did && !listConfig.relayedNodeDid) throw new Error("Relayer is required");
|
|
2978
|
+
result = await handlers.getRequests(did || listConfig.relayedNodeDid, page);
|
|
2884
2979
|
setData({ items: result.data });
|
|
2885
2980
|
break;
|
|
2886
2981
|
case "group_members":
|
|
@@ -2890,8 +2985,17 @@ var ListBlockContent = ({ block, editor }) => {
|
|
|
2890
2985
|
setData({ items: result.data });
|
|
2891
2986
|
break;
|
|
2892
2987
|
case "validators":
|
|
2893
|
-
|
|
2894
|
-
|
|
2988
|
+
did = handlers.getEntityDid();
|
|
2989
|
+
if (!did && !listConfig.relayedNodeDid) throw new Error("Relayer is required");
|
|
2990
|
+
result = await handlers.getValidators(did || listConfig.relayedNodeDid, page);
|
|
2991
|
+
setData({ items: result.data });
|
|
2992
|
+
break;
|
|
2993
|
+
case "dao_members":
|
|
2994
|
+
userAddress = handlers.getCurrentUser();
|
|
2995
|
+
groupIds = handlers.getDaoGroupsIds();
|
|
2996
|
+
if (!userAddress.address && !listConfig.address) throw new Error("Address is required");
|
|
2997
|
+
if (!groupIds && !listConfig.groupIds) throw new Error("Group Ids are required");
|
|
2998
|
+
result = await handlers.getDaoMembers(userAddress.address || listConfig.address, groupIds || listConfig.groupIds, listConfig.withBalance, page);
|
|
2895
2999
|
setData({ items: result.data });
|
|
2896
3000
|
break;
|
|
2897
3001
|
default:
|
|
@@ -2947,35 +3051,37 @@ var ListBlockContent = ({ block, editor }) => {
|
|
|
2947
3051
|
console.log("[ListBlockContent] renderListComponent", data, listType);
|
|
2948
3052
|
switch (listType) {
|
|
2949
3053
|
case "linked_resources":
|
|
2950
|
-
return /* @__PURE__ */
|
|
3054
|
+
return /* @__PURE__ */ React37.createElement(LinkedResourcesList, { items: filteredData, config: listConfig, mods: selectionMode, isItemChecked, onItemCheck });
|
|
2951
3055
|
case "assets":
|
|
2952
|
-
return /* @__PURE__ */
|
|
3056
|
+
return /* @__PURE__ */ React37.createElement(AssetsList, { items: filteredData, config: listConfig, mods: selectionMode, isItemChecked, onItemCheck });
|
|
2953
3057
|
case "transactions":
|
|
2954
|
-
return /* @__PURE__ */
|
|
3058
|
+
return /* @__PURE__ */ React37.createElement(TransactionsList, { items: filteredData, config: listConfig, mods: selectionMode, isItemChecked, onItemCheck });
|
|
2955
3059
|
case "collections":
|
|
2956
|
-
return /* @__PURE__ */
|
|
3060
|
+
return /* @__PURE__ */ React37.createElement(CollectionsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
|
|
2957
3061
|
case "investments":
|
|
2958
|
-
return /* @__PURE__ */
|
|
3062
|
+
return /* @__PURE__ */ React37.createElement(InvestmentsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
|
|
2959
3063
|
case "oracles":
|
|
2960
|
-
return /* @__PURE__ */
|
|
3064
|
+
return /* @__PURE__ */ React37.createElement(OraclesList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
|
|
2961
3065
|
case "pods":
|
|
2962
|
-
return /* @__PURE__ */
|
|
3066
|
+
return /* @__PURE__ */ React37.createElement(PodsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
|
|
2963
3067
|
case "proposals":
|
|
2964
|
-
return /* @__PURE__ */
|
|
3068
|
+
return /* @__PURE__ */ React37.createElement(ProposalsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
|
|
2965
3069
|
case "requests":
|
|
2966
|
-
return /* @__PURE__ */
|
|
3070
|
+
return /* @__PURE__ */ React37.createElement(RequestsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
|
|
2967
3071
|
case "group_members":
|
|
2968
|
-
return /* @__PURE__ */
|
|
3072
|
+
return /* @__PURE__ */ React37.createElement(MembersList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
|
|
3073
|
+
case "dao_members":
|
|
3074
|
+
return /* @__PURE__ */ React37.createElement(DaoMembersList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
|
|
2969
3075
|
case "validators":
|
|
2970
|
-
return /* @__PURE__ */
|
|
3076
|
+
return /* @__PURE__ */ React37.createElement(ValidatorsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
|
|
2971
3077
|
default:
|
|
2972
3078
|
return null;
|
|
2973
3079
|
}
|
|
2974
3080
|
};
|
|
2975
|
-
return /* @__PURE__ */
|
|
3081
|
+
return /* @__PURE__ */ React37.createElement(Stack24, { mih: listType && totalPages !== 0 ? 700 : void 0, w: "100%" }, listType && /* @__PURE__ */ React37.createElement(Flex14, { align: "center", gap: "xs" }, /* @__PURE__ */ React37.createElement(Text24, null, getListNameByType(listType)), listSortConfig?.key && /* @__PURE__ */ React37.createElement(Flex14, { align: "center" }, /* @__PURE__ */ React37.createElement(Text24, { size: "xs", c: "dimmed" }, listSortConfig.key?.replace(/([A-Z])/g, " $1").replace(
|
|
2976
3082
|
/^./,
|
|
2977
3083
|
(str) => str.toUpperCase()
|
|
2978
|
-
), " "), /* @__PURE__ */
|
|
3084
|
+
), " "), /* @__PURE__ */ React37.createElement(Text24, { lh: 0.5, c: "dimmed" }, listSortConfig.direction === "asc" && /* @__PURE__ */ React37.createElement(IconArrowUp2, { size: 18 }), listSortConfig.direction === "desc" && /* @__PURE__ */ React37.createElement(IconArrowDown2, { size: 18 }))), selectionMode && /* @__PURE__ */ React37.createElement(Text24, { lh: 0.5, c: "dimmed" }, selectionMode === "single" ? "Single Selection" : "Multi Selection")), /* @__PURE__ */ React37.createElement(Flex14, { justify: listType ? "space-between" : "flex-end" }, /* @__PURE__ */ React37.createElement(Flex14, { gap: "xs", align: "center" }, listType && /* @__PURE__ */ React37.createElement(FilterTab, { key: "All", label: "All", isActive: !listFilterConfig?.key, onClick: () => handleFilterChange(null) }), Array.isArray(listFilterConfigOptions) && listFilterConfigOptions.length > 0 && listFilterConfigOptions.map(({ key, label, type }) => /* @__PURE__ */ React37.createElement(
|
|
2979
3085
|
FilterTab,
|
|
2980
3086
|
{
|
|
2981
3087
|
key: label,
|
|
@@ -2983,7 +3089,7 @@ var ListBlockContent = ({ block, editor }) => {
|
|
|
2983
3089
|
isActive: listFilterConfig?.key === key && listFilterConfig?.value === type,
|
|
2984
3090
|
onClick: () => handleFilterChange({ key, value: type })
|
|
2985
3091
|
}
|
|
2986
|
-
))), /* @__PURE__ */
|
|
3092
|
+
))), /* @__PURE__ */ React37.createElement(Flex14, { gap: "xs" }, listType && editable && /* @__PURE__ */ React37.createElement(ActionIcon3, { variant: "subtle", size: "sm", onClick: fetchData, loading }, /* @__PURE__ */ React37.createElement(IconRefresh, null)), editable && /* @__PURE__ */ React37.createElement(ActionIcon3, { variant: "subtle", size: "sm", onClick: () => setModalOpened(true) }, /* @__PURE__ */ React37.createElement(IconSettings, null)), listType && listConfig && listSortConfigOptions && listSortConfigOptions?.length > 0 && /* @__PURE__ */ React37.createElement(
|
|
2987
3093
|
ListActionsMenu,
|
|
2988
3094
|
{
|
|
2989
3095
|
onSelectActionClick: (mode) => setSelectionMode(mode),
|
|
@@ -2992,7 +3098,7 @@ var ListBlockContent = ({ block, editor }) => {
|
|
|
2992
3098
|
value: listSortConfig,
|
|
2993
3099
|
onChange: (sortOption) => handleSortChange(sortOption)
|
|
2994
3100
|
}
|
|
2995
|
-
))), /* @__PURE__ */
|
|
3101
|
+
))), /* @__PURE__ */ React37.createElement(Flex14, { flex: 1 }, !listType ? /* @__PURE__ */ React37.createElement(Center2, { py: "xl" }, /* @__PURE__ */ React37.createElement(Stack24, { align: "center", gap: "sm" }, /* @__PURE__ */ React37.createElement(Text24, { size: "sm", c: "dimmed", ta: "center" }, "No list type configured"), /* @__PURE__ */ React37.createElement(Button8, { size: "sm", variant: "light", onClick: () => setModalOpened(true) }, "Configure List"))) : loading ? /* @__PURE__ */ React37.createElement(Center2, { py: "xl", w: "100%" }, /* @__PURE__ */ React37.createElement(Loader2, { size: "md", mx: "auto" })) : error ? /* @__PURE__ */ React37.createElement(Alert4, { color: "red", title: "Failed to load data", icon: /* @__PURE__ */ React37.createElement(IconAlertCircle, null) }, /* @__PURE__ */ React37.createElement(Stack24, { gap: "xs" }, /* @__PURE__ */ React37.createElement(Text24, { size: "sm" }, showErrorDetails ? error : "Unable to fetch list data"), /* @__PURE__ */ React37.createElement(Group8, { gap: "xs" }, /* @__PURE__ */ React37.createElement(Button8, { size: "xs", variant: "subtle", onClick: fetchData }, "Retry"), /* @__PURE__ */ React37.createElement(Button8, { size: "xs", variant: "subtle", onClick: () => setShowErrorDetails(!showErrorDetails) }, showErrorDetails ? "Hide" : "Show", " Details")))) : /* @__PURE__ */ React37.createElement(Stack24, { gap: "md", flex: 1 }, renderListComponent(), /* @__PURE__ */ React37.createElement(
|
|
2996
3102
|
ListPagination,
|
|
2997
3103
|
{
|
|
2998
3104
|
page,
|
|
@@ -3001,7 +3107,7 @@ var ListBlockContent = ({ block, editor }) => {
|
|
|
3001
3107
|
},
|
|
3002
3108
|
totalPages
|
|
3003
3109
|
}
|
|
3004
|
-
))), /* @__PURE__ */
|
|
3110
|
+
))), /* @__PURE__ */ React37.createElement(
|
|
3005
3111
|
ListConfigModal,
|
|
3006
3112
|
{
|
|
3007
3113
|
opened: modalOpened,
|
|
@@ -3037,15 +3143,15 @@ var ListBlock = createReactBlockSpec2(
|
|
|
3037
3143
|
content: "none"
|
|
3038
3144
|
},
|
|
3039
3145
|
{
|
|
3040
|
-
render: (props) => /* @__PURE__ */
|
|
3146
|
+
render: (props) => /* @__PURE__ */ React37.createElement(ListBlockContent, { ...props })
|
|
3041
3147
|
}
|
|
3042
3148
|
);
|
|
3043
3149
|
|
|
3044
3150
|
// src/mantine/blocks/overview/OverviewBlock.tsx
|
|
3045
|
-
import
|
|
3151
|
+
import React38 from "react";
|
|
3046
3152
|
import { createReactBlockSpec as createReactBlockSpec3 } from "@blocknote/react";
|
|
3047
3153
|
var OverviewBlockContent = ({ block, editor }) => {
|
|
3048
|
-
return /* @__PURE__ */
|
|
3154
|
+
return /* @__PURE__ */ React38.createElement(
|
|
3049
3155
|
"div",
|
|
3050
3156
|
{
|
|
3051
3157
|
style: {
|
|
@@ -3057,7 +3163,7 @@ var OverviewBlockContent = ({ block, editor }) => {
|
|
|
3057
3163
|
border: "1px solid #e5e7eb"
|
|
3058
3164
|
}
|
|
3059
3165
|
},
|
|
3060
|
-
/* @__PURE__ */
|
|
3166
|
+
/* @__PURE__ */ React38.createElement("div", { style: { marginBottom: "12px" } }, /* @__PURE__ */ React38.createElement(
|
|
3061
3167
|
"input",
|
|
3062
3168
|
{
|
|
3063
3169
|
type: "text",
|
|
@@ -3083,7 +3189,7 @@ var OverviewBlockContent = ({ block, editor }) => {
|
|
|
3083
3189
|
}
|
|
3084
3190
|
}
|
|
3085
3191
|
)),
|
|
3086
|
-
/* @__PURE__ */
|
|
3192
|
+
/* @__PURE__ */ React38.createElement("div", { style: { minHeight: "40px", color: "#6b7280" } }, block.props.did ? /* @__PURE__ */ React38.createElement("p", null, "Loading overview for DID: ", block.props.did) : /* @__PURE__ */ React38.createElement("p", null, "Enter a DID to load overview data"))
|
|
3087
3193
|
);
|
|
3088
3194
|
};
|
|
3089
3195
|
var OverviewBlock = createReactBlockSpec3(
|
|
@@ -3097,7 +3203,7 @@ var OverviewBlock = createReactBlockSpec3(
|
|
|
3097
3203
|
content: "none"
|
|
3098
3204
|
},
|
|
3099
3205
|
{
|
|
3100
|
-
render: (props) => /* @__PURE__ */
|
|
3206
|
+
render: (props) => /* @__PURE__ */ React38.createElement(OverviewBlockContent, { ...props })
|
|
3101
3207
|
}
|
|
3102
3208
|
);
|
|
3103
3209
|
|
|
@@ -3153,22 +3259,22 @@ var useSharedProposal = ({ proposalId, contractAddress, autoFetch = true }) => {
|
|
|
3153
3259
|
};
|
|
3154
3260
|
|
|
3155
3261
|
// src/mantine/blocks/proposalVote/ProposalVoteBlockSpec.tsx
|
|
3156
|
-
import
|
|
3262
|
+
import React46 from "react";
|
|
3157
3263
|
import { createReactBlockSpec as createReactBlockSpec4 } from "@blocknote/react";
|
|
3158
3264
|
|
|
3159
3265
|
// src/mantine/blocks/proposalVote/ProposalVoteBlock.tsx
|
|
3160
|
-
import
|
|
3266
|
+
import React45 from "react";
|
|
3161
3267
|
|
|
3162
3268
|
// src/mantine/blocks/proposalVote/template/TemplateView.tsx
|
|
3163
|
-
import
|
|
3269
|
+
import React41, { useMemo as useMemo8 } from "react";
|
|
3164
3270
|
|
|
3165
3271
|
// src/mantine/blocks/proposalVote/template/TemplateConfig.tsx
|
|
3166
|
-
import
|
|
3272
|
+
import React40, { useCallback as useCallback10, useState as useState9 } from "react";
|
|
3167
3273
|
import { Paper as Paper2, CloseButton as CloseButton2, Title as Title2 } from "@mantine/core";
|
|
3168
3274
|
|
|
3169
3275
|
// src/mantine/blocks/proposalVote/template/GeneralTab.tsx
|
|
3170
|
-
import
|
|
3171
|
-
import { Stack as
|
|
3276
|
+
import React39, { useState as useState8, useEffect as useEffect8, useMemo as useMemo7 } from "react";
|
|
3277
|
+
import { Stack as Stack25, Text as Text25, Group as Group9, Card as Card5, Button as Button9, Select as Select3 } from "@mantine/core";
|
|
3172
3278
|
|
|
3173
3279
|
// src/mantine/blocks/stores/dependencyHelpers.ts
|
|
3174
3280
|
function getDependencies(block) {
|
|
@@ -3303,7 +3409,7 @@ var GeneralTab2 = ({ block, editor, proposal }) => {
|
|
|
3303
3409
|
});
|
|
3304
3410
|
}
|
|
3305
3411
|
};
|
|
3306
|
-
return /* @__PURE__ */
|
|
3412
|
+
return /* @__PURE__ */ React39.createElement(Stack25, { gap: "lg" }, blockSupportsDependencies && showDependencyDropdown && /* @__PURE__ */ React39.createElement(Stack25, { gap: "md" }, /* @__PURE__ */ React39.createElement(
|
|
3307
3413
|
Card5,
|
|
3308
3414
|
{
|
|
3309
3415
|
padding: "md",
|
|
@@ -3314,9 +3420,9 @@ var GeneralTab2 = ({ block, editor, proposal }) => {
|
|
|
3314
3420
|
color: "#f1f3f5"
|
|
3315
3421
|
}
|
|
3316
3422
|
},
|
|
3317
|
-
/* @__PURE__ */
|
|
3318
|
-
/* @__PURE__ */
|
|
3319
|
-
), /* @__PURE__ */
|
|
3423
|
+
/* @__PURE__ */ React39.createElement(Text25, { size: "sm", fw: 500, style: { color: "#ffd43b" } }, "\u26A0\uFE0F No Proposal Connected"),
|
|
3424
|
+
/* @__PURE__ */ React39.createElement(Text25, { size: "xs", style: { color: "#adb5bd", marginTop: 4 } }, "Please select a proposal block to connect this vote to.")
|
|
3425
|
+
), /* @__PURE__ */ React39.createElement(Text25, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Select Proposal to Vote On"), /* @__PURE__ */ React39.createElement(
|
|
3320
3426
|
Select3,
|
|
3321
3427
|
{
|
|
3322
3428
|
value: selectedDependency,
|
|
@@ -3351,7 +3457,7 @@ var GeneralTab2 = ({ block, editor, proposal }) => {
|
|
|
3351
3457
|
}
|
|
3352
3458
|
}
|
|
3353
3459
|
}
|
|
3354
|
-
), availableBlocks.length === 0 && /* @__PURE__ */
|
|
3460
|
+
), availableBlocks.length === 0 && /* @__PURE__ */ React39.createElement(Text25, { size: "xs", style: { color: "#868e96" } }, "No proposals available. Create a proposal first.")), blockSupportsDependencies && hasDependency && /* @__PURE__ */ React39.createElement(Stack25, { gap: "md" }, /* @__PURE__ */ React39.createElement(Group9, { justify: "space-between", align: "center" }, /* @__PURE__ */ React39.createElement(Text25, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Connected Proposal"), /* @__PURE__ */ React39.createElement(
|
|
3355
3461
|
Button9,
|
|
3356
3462
|
{
|
|
3357
3463
|
variant: "subtle",
|
|
@@ -3360,15 +3466,15 @@ var GeneralTab2 = ({ block, editor, proposal }) => {
|
|
|
3360
3466
|
onClick: () => handleUpdateDependency(null)
|
|
3361
3467
|
},
|
|
3362
3468
|
"Disconnect"
|
|
3363
|
-
)), /* @__PURE__ */
|
|
3469
|
+
)), /* @__PURE__ */ React39.createElement(
|
|
3364
3470
|
Card5,
|
|
3365
3471
|
{
|
|
3366
3472
|
padding: "sm",
|
|
3367
3473
|
radius: "md",
|
|
3368
3474
|
style: { backgroundColor: "#2a2a2a", border: "1px solid #333" }
|
|
3369
3475
|
},
|
|
3370
|
-
/* @__PURE__ */
|
|
3371
|
-
proposal?.proposal?.description && /* @__PURE__ */
|
|
3476
|
+
/* @__PURE__ */ React39.createElement(Text25, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, proposal?.proposal?.title || "Connected Proposal"),
|
|
3477
|
+
proposal?.proposal?.description && /* @__PURE__ */ React39.createElement(Text25, { size: "xs", style: { color: "#adb5bd" } }, proposal.proposal.description)
|
|
3372
3478
|
)));
|
|
3373
3479
|
};
|
|
3374
3480
|
|
|
@@ -3402,7 +3508,7 @@ var TemplateConfig2 = ({ editor, block }) => {
|
|
|
3402
3508
|
autoFetch: false
|
|
3403
3509
|
// Don't auto-fetch in template mode
|
|
3404
3510
|
});
|
|
3405
|
-
return /* @__PURE__ */
|
|
3511
|
+
return /* @__PURE__ */ React40.createElement(
|
|
3406
3512
|
Paper2,
|
|
3407
3513
|
{
|
|
3408
3514
|
p: "md",
|
|
@@ -3413,7 +3519,7 @@ var TemplateConfig2 = ({ editor, block }) => {
|
|
|
3413
3519
|
flexDirection: "column"
|
|
3414
3520
|
}
|
|
3415
3521
|
},
|
|
3416
|
-
/* @__PURE__ */
|
|
3522
|
+
/* @__PURE__ */ React40.createElement(
|
|
3417
3523
|
"div",
|
|
3418
3524
|
{
|
|
3419
3525
|
style: {
|
|
@@ -3423,17 +3529,17 @@ var TemplateConfig2 = ({ editor, block }) => {
|
|
|
3423
3529
|
marginBottom: "1rem"
|
|
3424
3530
|
}
|
|
3425
3531
|
},
|
|
3426
|
-
/* @__PURE__ */
|
|
3427
|
-
/* @__PURE__ */
|
|
3532
|
+
/* @__PURE__ */ React40.createElement(Title2, { order: 3 }, "Proposal Vote Settings"),
|
|
3533
|
+
/* @__PURE__ */ React40.createElement(CloseButton2, { onClick: closePanel })
|
|
3428
3534
|
),
|
|
3429
|
-
/* @__PURE__ */
|
|
3535
|
+
/* @__PURE__ */ React40.createElement(
|
|
3430
3536
|
ReusablePanel,
|
|
3431
3537
|
{
|
|
3432
3538
|
extraTabs: [
|
|
3433
3539
|
{
|
|
3434
3540
|
label: "General",
|
|
3435
3541
|
value: "general",
|
|
3436
|
-
content: /* @__PURE__ */
|
|
3542
|
+
content: /* @__PURE__ */ React40.createElement(
|
|
3437
3543
|
GeneralTab2,
|
|
3438
3544
|
{
|
|
3439
3545
|
block,
|
|
@@ -3452,7 +3558,7 @@ var TemplateConfig2 = ({ editor, block }) => {
|
|
|
3452
3558
|
};
|
|
3453
3559
|
|
|
3454
3560
|
// src/mantine/blocks/proposalVote/template/TemplateView.tsx
|
|
3455
|
-
import { Card as Card6, Group as Group10, Stack as
|
|
3561
|
+
import { Card as Card6, Group as Group10, Stack as Stack26, Text as Text26, ActionIcon as ActionIcon4, Badge as Badge4 } from "@mantine/core";
|
|
3456
3562
|
var PROPOSAL_VOTE_TEMPLATE_PANEL_ID = "proposal-vote-template-panel";
|
|
3457
3563
|
var getStatusColor = (status) => {
|
|
3458
3564
|
switch (status) {
|
|
@@ -3473,11 +3579,11 @@ var getStatusColor = (status) => {
|
|
|
3473
3579
|
var ProposalVoteTemplateView = ({ editor, block }) => {
|
|
3474
3580
|
const panelId = `${PROPOSAL_VOTE_TEMPLATE_PANEL_ID}-${block.id}`;
|
|
3475
3581
|
const panelContent = useMemo8(
|
|
3476
|
-
() => /* @__PURE__ */
|
|
3582
|
+
() => /* @__PURE__ */ React41.createElement(TemplateConfig2, { editor, block }),
|
|
3477
3583
|
[editor, block]
|
|
3478
3584
|
);
|
|
3479
3585
|
const { open } = usePanel(panelId, panelContent);
|
|
3480
|
-
return /* @__PURE__ */
|
|
3586
|
+
return /* @__PURE__ */ React41.createElement(
|
|
3481
3587
|
Card6,
|
|
3482
3588
|
{
|
|
3483
3589
|
withBorder: true,
|
|
@@ -3486,20 +3592,20 @@ var ProposalVoteTemplateView = ({ editor, block }) => {
|
|
|
3486
3592
|
style: { width: "100%", cursor: "pointer" },
|
|
3487
3593
|
onClick: open
|
|
3488
3594
|
},
|
|
3489
|
-
/* @__PURE__ */
|
|
3595
|
+
/* @__PURE__ */ React41.createElement(Group10, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React41.createElement(Group10, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React41.createElement(ActionIcon4, { variant: "light", color: "blue", size: "lg", radius: "xl", style: { flexShrink: 0 } }, getIcon(block.props.icon, 18, 1.5, "checklist")), /* @__PURE__ */ React41.createElement(Stack26, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React41.createElement(Text26, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Proposal Vote"), /* @__PURE__ */ React41.createElement(Text26, { size: "xs", c: "dimmed", contentEditable: false }, block.props.subtitle || "Cast your vote"))), /* @__PURE__ */ React41.createElement(Badge4, { color: getStatusColor(block.props.status || "open"), variant: "filled", size: "sm" }, (block.props.status || "open").toUpperCase()))
|
|
3490
3596
|
);
|
|
3491
3597
|
};
|
|
3492
3598
|
|
|
3493
3599
|
// src/mantine/blocks/proposalVote/flow/FlowView.tsx
|
|
3494
|
-
import
|
|
3600
|
+
import React44, { useMemo as useMemo12 } from "react";
|
|
3495
3601
|
|
|
3496
3602
|
// src/mantine/blocks/proposalVote/flow/FlowConfig.tsx
|
|
3497
|
-
import
|
|
3603
|
+
import React43 from "react";
|
|
3498
3604
|
import { Paper as Paper3, CloseButton as CloseButton3, Title as Title3 } from "@mantine/core";
|
|
3499
3605
|
|
|
3500
3606
|
// src/mantine/blocks/proposalVote/flow/GeneralTab.tsx
|
|
3501
|
-
import
|
|
3502
|
-
import { Stack as
|
|
3607
|
+
import React42, { useState as useState10 } from "react";
|
|
3608
|
+
import { Stack as Stack27, Text as Text27, Group as Group11, Card as Card7, Button as Button10, Progress as Progress2, Box as Box15, Textarea as Textarea2, Tooltip as Tooltip3 } from "@mantine/core";
|
|
3503
3609
|
var calculateTimeRemaining = (proposal) => {
|
|
3504
3610
|
if (!proposal?.proposal.expiration || "never" in proposal.proposal.expiration) {
|
|
3505
3611
|
return "Never expires";
|
|
@@ -3575,7 +3681,7 @@ var FlowGeneralTab = ({
|
|
|
3575
3681
|
}
|
|
3576
3682
|
};
|
|
3577
3683
|
const hasDependency = Boolean(proposal);
|
|
3578
|
-
return /* @__PURE__ */
|
|
3684
|
+
return /* @__PURE__ */ React42.createElement(Stack27, { gap: "lg" }, !hasSubmittedProposal && /* @__PURE__ */ React42.createElement(
|
|
3579
3685
|
Card7,
|
|
3580
3686
|
{
|
|
3581
3687
|
padding: "md",
|
|
@@ -3586,8 +3692,8 @@ var FlowGeneralTab = ({
|
|
|
3586
3692
|
color: "#f1f3f5"
|
|
3587
3693
|
}
|
|
3588
3694
|
},
|
|
3589
|
-
/* @__PURE__ */
|
|
3590
|
-
|
|
3695
|
+
/* @__PURE__ */ React42.createElement(Group11, { gap: "xs", align: "center" }, /* @__PURE__ */ React42.createElement(
|
|
3696
|
+
Box15,
|
|
3591
3697
|
{
|
|
3592
3698
|
style: {
|
|
3593
3699
|
width: 8,
|
|
@@ -3596,9 +3702,9 @@ var FlowGeneralTab = ({
|
|
|
3596
3702
|
borderRadius: "50%"
|
|
3597
3703
|
}
|
|
3598
3704
|
}
|
|
3599
|
-
), /* @__PURE__ */
|
|
3600
|
-
/* @__PURE__ */
|
|
3601
|
-
), /* @__PURE__ */
|
|
3705
|
+
), /* @__PURE__ */ React42.createElement(Text27, { size: "sm", fw: 500, style: { color: "#ffd43b" } }, "Waiting for Proposal Submission")),
|
|
3706
|
+
/* @__PURE__ */ React42.createElement(Text27, { size: "xs", style: { color: "#adb5bd", marginTop: 4 } }, "The connected proposal needs to be submitted before voting can begin.")
|
|
3707
|
+
), /* @__PURE__ */ React42.createElement(
|
|
3602
3708
|
Card7,
|
|
3603
3709
|
{
|
|
3604
3710
|
padding: "lg",
|
|
@@ -3610,8 +3716,8 @@ var FlowGeneralTab = ({
|
|
|
3610
3716
|
opacity: !hasSubmittedProposal ? 0.6 : 1
|
|
3611
3717
|
}
|
|
3612
3718
|
},
|
|
3613
|
-
/* @__PURE__ */
|
|
3614
|
-
|
|
3719
|
+
/* @__PURE__ */ React42.createElement(Stack27, { gap: "xs" }, /* @__PURE__ */ React42.createElement(Group11, { justify: "space-between" }, /* @__PURE__ */ React42.createElement(Group11, { gap: "xs" }, /* @__PURE__ */ React42.createElement(
|
|
3720
|
+
Box15,
|
|
3615
3721
|
{
|
|
3616
3722
|
w: 8,
|
|
3617
3723
|
h: 8,
|
|
@@ -3620,8 +3726,8 @@ var FlowGeneralTab = ({
|
|
|
3620
3726
|
borderRadius: "50%"
|
|
3621
3727
|
}
|
|
3622
3728
|
}
|
|
3623
|
-
), /* @__PURE__ */
|
|
3624
|
-
|
|
3729
|
+
), /* @__PURE__ */ React42.createElement(Text27, { size: "sm", style: { color: "#adb5bd" } }, "Status")), /* @__PURE__ */ React42.createElement(Text27, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, hasSubmittedProposal ? proposal?.proposal.status === "open" ? "Active" : proposal?.proposal.status || "Active" : "Waiting")), /* @__PURE__ */ React42.createElement(Group11, { justify: "space-between" }, /* @__PURE__ */ React42.createElement(Group11, { gap: "xs" }, /* @__PURE__ */ React42.createElement(Box15, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React42.createElement(Text27, { size: "sm", style: { color: "#adb5bd" } }, "Ends in")), /* @__PURE__ */ React42.createElement(Text27, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, hasSubmittedProposal ? calculateTimeRemaining(proposal) : "TBD")), /* @__PURE__ */ React42.createElement(Group11, { justify: "space-between" }, /* @__PURE__ */ React42.createElement(Group11, { gap: "xs" }, /* @__PURE__ */ React42.createElement(Box15, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React42.createElement(Text27, { size: "sm", style: { color: "#adb5bd" } }, "Outcome")), /* @__PURE__ */ React42.createElement(
|
|
3730
|
+
Text27,
|
|
3625
3731
|
{
|
|
3626
3732
|
size: "sm",
|
|
3627
3733
|
fw: 500,
|
|
@@ -3630,8 +3736,8 @@ var FlowGeneralTab = ({
|
|
|
3630
3736
|
}
|
|
3631
3737
|
},
|
|
3632
3738
|
hasSubmittedProposal ? calculateOutcome(proposal) : "N/A"
|
|
3633
|
-
)), /* @__PURE__ */
|
|
3634
|
-
/* @__PURE__ */
|
|
3739
|
+
)), /* @__PURE__ */ React42.createElement(Group11, { justify: "space-between" }, /* @__PURE__ */ React42.createElement(Group11, { gap: "xs" }, /* @__PURE__ */ React42.createElement(Box15, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React42.createElement(Text27, { size: "sm", style: { color: "#adb5bd" } }, "My Vote")), /* @__PURE__ */ React42.createElement(Text27, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, hasSubmittedProposal ? userVote?.vote ? userVote.vote.vote : "Pending" : "N/A"))),
|
|
3740
|
+
/* @__PURE__ */ React42.createElement(Stack27, { gap: "xs" }, /* @__PURE__ */ React42.createElement(Text27, { size: "sm", style: { color: "#adb5bd" } }, hasSubmittedProposal ? "Voting is open" : "Voting pending"), /* @__PURE__ */ React42.createElement(
|
|
3635
3741
|
Progress2,
|
|
3636
3742
|
{
|
|
3637
3743
|
value: hasSubmittedProposal ? 75 : 0,
|
|
@@ -3644,7 +3750,7 @@ var FlowGeneralTab = ({
|
|
|
3644
3750
|
}
|
|
3645
3751
|
}
|
|
3646
3752
|
))
|
|
3647
|
-
), hasDependency && hasSubmittedProposal && (status === "open" || proposal?.proposal.status === "open") && /* @__PURE__ */
|
|
3753
|
+
), hasDependency && hasSubmittedProposal && (status === "open" || proposal?.proposal.status === "open") && /* @__PURE__ */ React42.createElement(Stack27, { gap: "lg" }, disabled && isDisabled?.message && /* @__PURE__ */ React42.createElement(
|
|
3648
3754
|
Card7,
|
|
3649
3755
|
{
|
|
3650
3756
|
padding: "md",
|
|
@@ -3655,8 +3761,8 @@ var FlowGeneralTab = ({
|
|
|
3655
3761
|
color: "#f1f3f5"
|
|
3656
3762
|
}
|
|
3657
3763
|
},
|
|
3658
|
-
/* @__PURE__ */
|
|
3659
|
-
|
|
3764
|
+
/* @__PURE__ */ React42.createElement(Group11, { gap: "xs", align: "center" }, /* @__PURE__ */ React42.createElement(
|
|
3765
|
+
Box15,
|
|
3660
3766
|
{
|
|
3661
3767
|
style: {
|
|
3662
3768
|
width: 8,
|
|
@@ -3665,8 +3771,8 @@ var FlowGeneralTab = ({
|
|
|
3665
3771
|
borderRadius: "50%"
|
|
3666
3772
|
}
|
|
3667
3773
|
}
|
|
3668
|
-
), /* @__PURE__ */
|
|
3669
|
-
), /* @__PURE__ */
|
|
3774
|
+
), /* @__PURE__ */ React42.createElement(Text27, { size: "sm", fw: 500, style: { color: "#ffd43b" } }, isDisabled.message))
|
|
3775
|
+
), /* @__PURE__ */ React42.createElement(Stack27, { gap: "md" }, ["yes", "no", "no_with_veto", "abstain"].map((voteType) => /* @__PURE__ */ React42.createElement(
|
|
3670
3776
|
Tooltip3,
|
|
3671
3777
|
{
|
|
3672
3778
|
key: voteType,
|
|
@@ -3674,7 +3780,7 @@ var FlowGeneralTab = ({
|
|
|
3674
3780
|
disabled: !disabled,
|
|
3675
3781
|
position: "top"
|
|
3676
3782
|
},
|
|
3677
|
-
/* @__PURE__ */
|
|
3783
|
+
/* @__PURE__ */ React42.createElement(
|
|
3678
3784
|
Button10,
|
|
3679
3785
|
{
|
|
3680
3786
|
variant: "outline",
|
|
@@ -3693,9 +3799,9 @@ var FlowGeneralTab = ({
|
|
|
3693
3799
|
opacity: disabled ? 0.5 : 1
|
|
3694
3800
|
}
|
|
3695
3801
|
},
|
|
3696
|
-
/* @__PURE__ */
|
|
3802
|
+
/* @__PURE__ */ React42.createElement(Text27, { fw: 500, tt: "capitalize", style: { textAlign: "left" } }, voteType === "no_with_veto" ? "No with Veto" : voteType)
|
|
3697
3803
|
)
|
|
3698
|
-
))), /* @__PURE__ */
|
|
3804
|
+
))), /* @__PURE__ */ React42.createElement(Stack27, { gap: "xs" }, /* @__PURE__ */ React42.createElement(Text27, { size: "sm", style: { color: "#adb5bd" } }, "Rationale (optional)"), /* @__PURE__ */ React42.createElement(
|
|
3699
3805
|
Textarea2,
|
|
3700
3806
|
{
|
|
3701
3807
|
value: rationale,
|
|
@@ -3712,7 +3818,7 @@ var FlowGeneralTab = ({
|
|
|
3712
3818
|
}
|
|
3713
3819
|
}
|
|
3714
3820
|
}
|
|
3715
|
-
))), (status === "executed" || proposal?.proposal.status === "executed") && /* @__PURE__ */
|
|
3821
|
+
))), (status === "executed" || proposal?.proposal.status === "executed") && /* @__PURE__ */ React42.createElement(
|
|
3716
3822
|
Card7,
|
|
3717
3823
|
{
|
|
3718
3824
|
padding: "md",
|
|
@@ -3722,15 +3828,15 @@ var FlowGeneralTab = ({
|
|
|
3722
3828
|
border: "1px solid #333"
|
|
3723
3829
|
}
|
|
3724
3830
|
},
|
|
3725
|
-
/* @__PURE__ */
|
|
3726
|
-
), hasDependency && !hasSubmittedProposal && /* @__PURE__ */
|
|
3831
|
+
/* @__PURE__ */ React42.createElement(Stack27, { gap: "xs" }, /* @__PURE__ */ React42.createElement(Text27, { fw: 500, size: "sm", style: { color: "#f1f3f5" } }, "Proposal Executed"), /* @__PURE__ */ React42.createElement(Text27, { size: "sm", style: { color: "#adb5bd" } }, "This proposal has been successfully executed."))
|
|
3832
|
+
), hasDependency && !hasSubmittedProposal && /* @__PURE__ */ React42.createElement(Stack27, { gap: "lg" }, /* @__PURE__ */ React42.createElement(Stack27, { gap: "md" }, ["yes", "no", "no_with_veto", "abstain"].map((voteType) => /* @__PURE__ */ React42.createElement(
|
|
3727
3833
|
Tooltip3,
|
|
3728
3834
|
{
|
|
3729
3835
|
key: voteType,
|
|
3730
3836
|
label: "Proposal must be submitted before voting",
|
|
3731
3837
|
position: "top"
|
|
3732
3838
|
},
|
|
3733
|
-
/* @__PURE__ */
|
|
3839
|
+
/* @__PURE__ */ React42.createElement(
|
|
3734
3840
|
Button10,
|
|
3735
3841
|
{
|
|
3736
3842
|
variant: "outline",
|
|
@@ -3747,9 +3853,9 @@ var FlowGeneralTab = ({
|
|
|
3747
3853
|
opacity: 0.5
|
|
3748
3854
|
}
|
|
3749
3855
|
},
|
|
3750
|
-
/* @__PURE__ */
|
|
3856
|
+
/* @__PURE__ */ React42.createElement(Text27, { fw: 500, tt: "capitalize", style: { textAlign: "left" } }, voteType === "no_with_veto" ? "No with Veto" : voteType)
|
|
3751
3857
|
)
|
|
3752
|
-
)))), hasDependency && hasSubmittedProposal && selectedVote && (status === "open" || proposal?.proposal.status === "open") && /* @__PURE__ */
|
|
3858
|
+
)))), hasDependency && hasSubmittedProposal && selectedVote && (status === "open" || proposal?.proposal.status === "open") && /* @__PURE__ */ React42.createElement(Tooltip3, { label: disabled ? isDisabled?.message : "Sign to vote", position: "top" }, /* @__PURE__ */ React42.createElement("div", null, /* @__PURE__ */ React42.createElement(
|
|
3753
3859
|
Button10,
|
|
3754
3860
|
{
|
|
3755
3861
|
size: "sm",
|
|
@@ -3780,7 +3886,7 @@ var FlowConfig = ({
|
|
|
3780
3886
|
isDisabled
|
|
3781
3887
|
}) => {
|
|
3782
3888
|
const { closePanel } = usePanelStore();
|
|
3783
|
-
return /* @__PURE__ */
|
|
3889
|
+
return /* @__PURE__ */ React43.createElement(
|
|
3784
3890
|
Paper3,
|
|
3785
3891
|
{
|
|
3786
3892
|
p: "md",
|
|
@@ -3791,7 +3897,7 @@ var FlowConfig = ({
|
|
|
3791
3897
|
flexDirection: "column"
|
|
3792
3898
|
}
|
|
3793
3899
|
},
|
|
3794
|
-
/* @__PURE__ */
|
|
3900
|
+
/* @__PURE__ */ React43.createElement(
|
|
3795
3901
|
"div",
|
|
3796
3902
|
{
|
|
3797
3903
|
style: {
|
|
@@ -3801,17 +3907,17 @@ var FlowConfig = ({
|
|
|
3801
3907
|
marginBottom: "1rem"
|
|
3802
3908
|
}
|
|
3803
3909
|
},
|
|
3804
|
-
/* @__PURE__ */
|
|
3805
|
-
/* @__PURE__ */
|
|
3910
|
+
/* @__PURE__ */ React43.createElement(Title3, { order: 3 }, "Proposal Vote"),
|
|
3911
|
+
/* @__PURE__ */ React43.createElement(CloseButton3, { onClick: closePanel })
|
|
3806
3912
|
),
|
|
3807
|
-
/* @__PURE__ */
|
|
3913
|
+
/* @__PURE__ */ React43.createElement(
|
|
3808
3914
|
ReusablePanel,
|
|
3809
3915
|
{
|
|
3810
3916
|
extraTabs: [
|
|
3811
3917
|
{
|
|
3812
3918
|
label: "General",
|
|
3813
3919
|
value: "general",
|
|
3814
|
-
content: /* @__PURE__ */
|
|
3920
|
+
content: /* @__PURE__ */ React43.createElement(
|
|
3815
3921
|
FlowGeneralTab,
|
|
3816
3922
|
{
|
|
3817
3923
|
proposal,
|
|
@@ -3832,7 +3938,7 @@ var FlowConfig = ({
|
|
|
3832
3938
|
};
|
|
3833
3939
|
|
|
3834
3940
|
// src/mantine/blocks/proposalVote/flow/FlowView.tsx
|
|
3835
|
-
import { Card as Card8, Group as Group12, Stack as
|
|
3941
|
+
import { Card as Card8, Group as Group12, Stack as Stack28, Text as Text28, ActionIcon as ActionIcon5, Alert as Alert5, Skeleton, Badge as Badge5 } from "@mantine/core";
|
|
3836
3942
|
|
|
3837
3943
|
// src/mantine/blocks/proposalVote/flow/useFlowBusinessLogic.ts
|
|
3838
3944
|
import { useEffect as useEffect9, useState as useState11, useMemo as useMemo11 } from "react";
|
|
@@ -3948,12 +4054,7 @@ var useFlowBusinessLogic = ({ block, editor }) => {
|
|
|
3948
4054
|
}
|
|
3949
4055
|
return block;
|
|
3950
4056
|
}, [block, editor]);
|
|
3951
|
-
const dependencies = useBlockDependencies(
|
|
3952
|
-
hydratedBlock,
|
|
3953
|
-
"proposalVote",
|
|
3954
|
-
editor,
|
|
3955
|
-
hydratedBlock.props.hasDependencies
|
|
3956
|
-
);
|
|
4057
|
+
const dependencies = useBlockDependencies(hydratedBlock, "proposalVote", editor, hydratedBlock.props.hasDependencies);
|
|
3957
4058
|
let handlers = null;
|
|
3958
4059
|
try {
|
|
3959
4060
|
handlers = useBlocknoteHandlers();
|
|
@@ -3992,7 +4093,7 @@ var useFlowBusinessLogic = ({ block, editor }) => {
|
|
|
3992
4093
|
}
|
|
3993
4094
|
const loadUserVote = async () => {
|
|
3994
4095
|
try {
|
|
3995
|
-
const user =
|
|
4096
|
+
const user = handlers.getCurrentUser();
|
|
3996
4097
|
const vote = await handlers.getVote(proposalContractAddress, proposalId, user.address);
|
|
3997
4098
|
setUserVote(vote);
|
|
3998
4099
|
} catch (err) {
|
|
@@ -4013,12 +4114,8 @@ var useFlowBusinessLogic = ({ block, editor }) => {
|
|
|
4013
4114
|
if (!handlers) return;
|
|
4014
4115
|
try {
|
|
4015
4116
|
await handlers.vote(voteParams);
|
|
4016
|
-
const user =
|
|
4017
|
-
const vote = await handlers.getVote(
|
|
4018
|
-
voteParams.proposalContractAddress,
|
|
4019
|
-
voteParams.proposalId.toString(),
|
|
4020
|
-
user.address
|
|
4021
|
-
);
|
|
4117
|
+
const user = handlers.getCurrentUser();
|
|
4118
|
+
const vote = await handlers.getVote(voteParams.proposalContractAddress, voteParams.proposalId.toString(), user.address);
|
|
4022
4119
|
setUserVote(vote);
|
|
4023
4120
|
} catch (err) {
|
|
4024
4121
|
console.error("Failed to vote:", err);
|
|
@@ -4086,7 +4183,7 @@ var ProposalVoteFlowView = ({ block, editor, isDisabled }) => {
|
|
|
4086
4183
|
handleVote
|
|
4087
4184
|
} = useFlowBusinessLogic({ block, editor });
|
|
4088
4185
|
const panelContent = useMemo12(
|
|
4089
|
-
() => /* @__PURE__ */
|
|
4186
|
+
() => /* @__PURE__ */ React44.createElement(
|
|
4090
4187
|
FlowConfig,
|
|
4091
4188
|
{
|
|
4092
4189
|
proposal,
|
|
@@ -4111,7 +4208,7 @@ var ProposalVoteFlowView = ({ block, editor, isDisabled }) => {
|
|
|
4111
4208
|
]
|
|
4112
4209
|
);
|
|
4113
4210
|
const { open } = usePanel(panelId, panelContent);
|
|
4114
|
-
return /* @__PURE__ */
|
|
4211
|
+
return /* @__PURE__ */ React44.createElement(
|
|
4115
4212
|
Card8,
|
|
4116
4213
|
{
|
|
4117
4214
|
withBorder: true,
|
|
@@ -4120,9 +4217,9 @@ var ProposalVoteFlowView = ({ block, editor, isDisabled }) => {
|
|
|
4120
4217
|
style: { width: "100%", cursor: "pointer" },
|
|
4121
4218
|
onClick: open
|
|
4122
4219
|
},
|
|
4123
|
-
loading && /* @__PURE__ */
|
|
4124
|
-
(error || localError) && /* @__PURE__ */
|
|
4125
|
-
!loading && !error && !localError && /* @__PURE__ */
|
|
4220
|
+
loading && /* @__PURE__ */ React44.createElement(Stack28, null, /* @__PURE__ */ React44.createElement(Skeleton, { height: 20, width: "70%" }), /* @__PURE__ */ React44.createElement(Skeleton, { height: 16 }), /* @__PURE__ */ React44.createElement(Skeleton, { height: 16, width: "40%" })),
|
|
4221
|
+
(error || localError) && /* @__PURE__ */ React44.createElement(Alert5, { color: "red", title: "Error", mb: "md" }, String(error || localError)),
|
|
4222
|
+
!loading && !error && !localError && /* @__PURE__ */ React44.createElement(Group12, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React44.createElement(Group12, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React44.createElement(
|
|
4126
4223
|
ActionIcon5,
|
|
4127
4224
|
{
|
|
4128
4225
|
variant: "light",
|
|
@@ -4132,7 +4229,7 @@ var ProposalVoteFlowView = ({ block, editor, isDisabled }) => {
|
|
|
4132
4229
|
style: { flexShrink: 0 }
|
|
4133
4230
|
},
|
|
4134
4231
|
getIcon(icon, 24, 1.5, "checklist")
|
|
4135
|
-
), /* @__PURE__ */
|
|
4232
|
+
), /* @__PURE__ */ React44.createElement(Stack28, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React44.createElement(Text28, { fw: 500, size: "sm", contentEditable: false }, proposal?.proposal?.title || title || "Proposal Vote"), /* @__PURE__ */ React44.createElement(Text28, { size: "xs", c: "dimmed", contentEditable: false }, proposal?.proposal?.description || subtitle || "Cast your vote"))), /* @__PURE__ */ React44.createElement(Badge5, { color: getStatusColor2(status), variant: "filled", size: "sm" }, status.toUpperCase()))
|
|
4136
4233
|
);
|
|
4137
4234
|
};
|
|
4138
4235
|
|
|
@@ -4142,7 +4239,7 @@ function ProposalVoteBlock({ editor, block }) {
|
|
|
4142
4239
|
const { actions } = useBlockConditions(block, editor);
|
|
4143
4240
|
console.log("Rendering ProposalVoteBlock with actions:", actions);
|
|
4144
4241
|
if (editable) {
|
|
4145
|
-
return /* @__PURE__ */
|
|
4242
|
+
return /* @__PURE__ */ React45.createElement(ProposalVoteTemplateView, { editor, block });
|
|
4146
4243
|
}
|
|
4147
4244
|
const conditionConfig = parseConditionConfig(block.props.conditions);
|
|
4148
4245
|
const hasVisibility = hasVisibilityConditions(conditionConfig);
|
|
@@ -4162,7 +4259,7 @@ function ProposalVoteBlock({ editor, block }) {
|
|
|
4162
4259
|
shouldDisable,
|
|
4163
4260
|
actions
|
|
4164
4261
|
});
|
|
4165
|
-
return /* @__PURE__ */
|
|
4262
|
+
return /* @__PURE__ */ React45.createElement(
|
|
4166
4263
|
ProposalVoteFlowView,
|
|
4167
4264
|
{
|
|
4168
4265
|
block,
|
|
@@ -4231,28 +4328,28 @@ var ProposalVoteBlockSpec = createReactBlockSpec4(
|
|
|
4231
4328
|
{
|
|
4232
4329
|
render: (props) => {
|
|
4233
4330
|
const ixoProps = props;
|
|
4234
|
-
return /* @__PURE__ */
|
|
4331
|
+
return /* @__PURE__ */ React46.createElement(ProposalVoteBlock, { ...ixoProps });
|
|
4235
4332
|
}
|
|
4236
4333
|
}
|
|
4237
4334
|
);
|
|
4238
4335
|
|
|
4239
4336
|
// src/mantine/blocks/proposal/ProposalBlockSpec.tsx
|
|
4240
|
-
import
|
|
4337
|
+
import React54 from "react";
|
|
4241
4338
|
import { createReactBlockSpec as createReactBlockSpec5 } from "@blocknote/react";
|
|
4242
4339
|
|
|
4243
4340
|
// src/mantine/blocks/proposal/ProposalBlock.tsx
|
|
4244
|
-
import
|
|
4341
|
+
import React53 from "react";
|
|
4245
4342
|
|
|
4246
4343
|
// src/mantine/blocks/proposal/template/TemplateView.tsx
|
|
4247
|
-
import
|
|
4344
|
+
import React49, { useMemo as useMemo13 } from "react";
|
|
4248
4345
|
|
|
4249
4346
|
// src/mantine/blocks/proposal/template/TemplateConfig.tsx
|
|
4250
|
-
import
|
|
4347
|
+
import React48, { useCallback as useCallback11 } from "react";
|
|
4251
4348
|
import { Paper as Paper4, CloseButton as CloseButton4, Title as Title4 } from "@mantine/core";
|
|
4252
4349
|
|
|
4253
4350
|
// src/mantine/blocks/proposal/template/GeneralTab.tsx
|
|
4254
|
-
import
|
|
4255
|
-
import { Stack as
|
|
4351
|
+
import React47, { useEffect as useEffect10, useState as useState12 } from "react";
|
|
4352
|
+
import { Stack as Stack29, Text as Text29, TextInput as TextInput5, Textarea as Textarea3 } from "@mantine/core";
|
|
4256
4353
|
var GeneralTab3 = ({
|
|
4257
4354
|
title,
|
|
4258
4355
|
description,
|
|
@@ -4273,7 +4370,7 @@ var GeneralTab3 = ({
|
|
|
4273
4370
|
useEffect10(() => {
|
|
4274
4371
|
setLocalIcon(icon || "\u{1F4DD}");
|
|
4275
4372
|
}, [icon]);
|
|
4276
|
-
return /* @__PURE__ */
|
|
4373
|
+
return /* @__PURE__ */ React47.createElement(Stack29, { gap: "lg" }, /* @__PURE__ */ React47.createElement(Stack29, { gap: "xs" }, /* @__PURE__ */ React47.createElement(Text29, { size: "sm", fw: 600, style: { color: "#f1f3f5" } }, "Title"), /* @__PURE__ */ React47.createElement(
|
|
4277
4374
|
TextInput5,
|
|
4278
4375
|
{
|
|
4279
4376
|
placeholder: "e.g. Proposal Title",
|
|
@@ -4291,7 +4388,7 @@ var GeneralTab3 = ({
|
|
|
4291
4388
|
}
|
|
4292
4389
|
}
|
|
4293
4390
|
}
|
|
4294
|
-
)), /* @__PURE__ */
|
|
4391
|
+
)), /* @__PURE__ */ React47.createElement(Stack29, { gap: "xs" }, /* @__PURE__ */ React47.createElement(Text29, { size: "sm", fw: 600, style: { color: "#f1f3f5" } }, "Icon"), /* @__PURE__ */ React47.createElement(
|
|
4295
4392
|
TextInput5,
|
|
4296
4393
|
{
|
|
4297
4394
|
placeholder: "e.g. \u{1F4DD}",
|
|
@@ -4311,7 +4408,7 @@ var GeneralTab3 = ({
|
|
|
4311
4408
|
}
|
|
4312
4409
|
}
|
|
4313
4410
|
}
|
|
4314
|
-
)), /* @__PURE__ */
|
|
4411
|
+
)), /* @__PURE__ */ React47.createElement(Stack29, { gap: "xs" }, /* @__PURE__ */ React47.createElement(Text29, { size: "sm", fw: 600, style: { color: "#f1f3f5" } }, "Description"), /* @__PURE__ */ React47.createElement(
|
|
4315
4412
|
Textarea3,
|
|
4316
4413
|
{
|
|
4317
4414
|
placeholder: "Describe what this proposal is about",
|
|
@@ -4347,7 +4444,7 @@ var TemplateConfig3 = ({ editor, block }) => {
|
|
|
4347
4444
|
},
|
|
4348
4445
|
[editor, block]
|
|
4349
4446
|
);
|
|
4350
|
-
return /* @__PURE__ */
|
|
4447
|
+
return /* @__PURE__ */ React48.createElement(
|
|
4351
4448
|
Paper4,
|
|
4352
4449
|
{
|
|
4353
4450
|
p: "md",
|
|
@@ -4358,7 +4455,7 @@ var TemplateConfig3 = ({ editor, block }) => {
|
|
|
4358
4455
|
flexDirection: "column"
|
|
4359
4456
|
}
|
|
4360
4457
|
},
|
|
4361
|
-
/* @__PURE__ */
|
|
4458
|
+
/* @__PURE__ */ React48.createElement(
|
|
4362
4459
|
"div",
|
|
4363
4460
|
{
|
|
4364
4461
|
style: {
|
|
@@ -4368,17 +4465,17 @@ var TemplateConfig3 = ({ editor, block }) => {
|
|
|
4368
4465
|
marginBottom: "1rem"
|
|
4369
4466
|
}
|
|
4370
4467
|
},
|
|
4371
|
-
/* @__PURE__ */
|
|
4372
|
-
/* @__PURE__ */
|
|
4468
|
+
/* @__PURE__ */ React48.createElement(Title4, { order: 3 }, "Proposal Settings"),
|
|
4469
|
+
/* @__PURE__ */ React48.createElement(CloseButton4, { onClick: closePanel })
|
|
4373
4470
|
),
|
|
4374
|
-
/* @__PURE__ */
|
|
4471
|
+
/* @__PURE__ */ React48.createElement(
|
|
4375
4472
|
ReusablePanel,
|
|
4376
4473
|
{
|
|
4377
4474
|
extraTabs: [
|
|
4378
4475
|
{
|
|
4379
4476
|
label: "General",
|
|
4380
4477
|
value: "general",
|
|
4381
|
-
content: /* @__PURE__ */
|
|
4478
|
+
content: /* @__PURE__ */ React48.createElement(
|
|
4382
4479
|
GeneralTab3,
|
|
4383
4480
|
{
|
|
4384
4481
|
title: block.props.title || "",
|
|
@@ -4398,16 +4495,16 @@ var TemplateConfig3 = ({ editor, block }) => {
|
|
|
4398
4495
|
};
|
|
4399
4496
|
|
|
4400
4497
|
// src/mantine/blocks/proposal/template/TemplateView.tsx
|
|
4401
|
-
import { Card as Card9, Group as Group13, Stack as
|
|
4498
|
+
import { Card as Card9, Group as Group13, Stack as Stack30, Text as Text30, ActionIcon as ActionIcon6 } from "@mantine/core";
|
|
4402
4499
|
var PROPOSAL_TEMPLATE_PANEL_ID = "proposal-template-panel";
|
|
4403
4500
|
var ProposalTemplateView = ({ editor, block }) => {
|
|
4404
4501
|
const panelId = `${PROPOSAL_TEMPLATE_PANEL_ID}-${block.id}`;
|
|
4405
4502
|
const panelContent = useMemo13(
|
|
4406
|
-
() => /* @__PURE__ */
|
|
4503
|
+
() => /* @__PURE__ */ React49.createElement(TemplateConfig3, { editor, block }),
|
|
4407
4504
|
[editor, block]
|
|
4408
4505
|
);
|
|
4409
4506
|
const { open } = usePanel(panelId, panelContent);
|
|
4410
|
-
return /* @__PURE__ */
|
|
4507
|
+
return /* @__PURE__ */ React49.createElement(
|
|
4411
4508
|
Card9,
|
|
4412
4509
|
{
|
|
4413
4510
|
withBorder: true,
|
|
@@ -4416,16 +4513,16 @@ var ProposalTemplateView = ({ editor, block }) => {
|
|
|
4416
4513
|
style: { width: "100%", cursor: "pointer" },
|
|
4417
4514
|
onClick: open
|
|
4418
4515
|
},
|
|
4419
|
-
/* @__PURE__ */
|
|
4516
|
+
/* @__PURE__ */ React49.createElement(Group13, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React49.createElement(Group13, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React49.createElement(ActionIcon6, { variant: "light", color: "blue", size: "lg", radius: "xl", style: { flexShrink: 0 } }, getIcon(block.props.icon, 18, 1.5, "file-text")), /* @__PURE__ */ React49.createElement(Stack30, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React49.createElement(Text30, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Proposal Title"), /* @__PURE__ */ React49.createElement(Text30, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description || "Proposal description"))), /* @__PURE__ */ React49.createElement(Text30, { size: "xs", c: "dimmed", contentEditable: false }, block.props.status || "draft"))
|
|
4420
4517
|
);
|
|
4421
4518
|
};
|
|
4422
4519
|
|
|
4423
4520
|
// src/mantine/blocks/proposal/flow/FlowView.tsx
|
|
4424
|
-
import
|
|
4521
|
+
import React52, { useMemo as useMemo14 } from "react";
|
|
4425
4522
|
|
|
4426
4523
|
// src/mantine/blocks/proposal/components/OnChainProposalCard.tsx
|
|
4427
|
-
import
|
|
4428
|
-
import { Card as Card10, Group as Group14, Stack as
|
|
4524
|
+
import React50 from "react";
|
|
4525
|
+
import { Card as Card10, Group as Group14, Stack as Stack31, Text as Text31, Skeleton as Skeleton2, Badge as Badge6, Button as Button11, ActionIcon as ActionIcon7 } from "@mantine/core";
|
|
4429
4526
|
var statusColor = {
|
|
4430
4527
|
open: "#4dabf7",
|
|
4431
4528
|
passed: "#51cf66",
|
|
@@ -4455,7 +4552,7 @@ var OnChainProposalCard = ({
|
|
|
4455
4552
|
onExecute,
|
|
4456
4553
|
isExecuting = false
|
|
4457
4554
|
}) => {
|
|
4458
|
-
return /* @__PURE__ */
|
|
4555
|
+
return /* @__PURE__ */ React50.createElement(
|
|
4459
4556
|
Card10,
|
|
4460
4557
|
{
|
|
4461
4558
|
shadow: "sm",
|
|
@@ -4468,9 +4565,9 @@ var OnChainProposalCard = ({
|
|
|
4468
4565
|
},
|
|
4469
4566
|
onClick
|
|
4470
4567
|
},
|
|
4471
|
-
isFetching && /* @__PURE__ */
|
|
4472
|
-
error && /* @__PURE__ */
|
|
4473
|
-
!isFetching && /* @__PURE__ */
|
|
4568
|
+
isFetching && /* @__PURE__ */ React50.createElement(Stack31, null, /* @__PURE__ */ React50.createElement(Skeleton2, { height: 20, width: "70%" }), /* @__PURE__ */ React50.createElement(Skeleton2, { height: 16 }), /* @__PURE__ */ React50.createElement(Skeleton2, { height: 16, width: "40%" })),
|
|
4569
|
+
error && /* @__PURE__ */ React50.createElement(Text31, { size: "sm", c: "red" }, typeof error === "string" ? error : error.message || "An error occurred while loading the proposal."),
|
|
4570
|
+
!isFetching && /* @__PURE__ */ React50.createElement(Group14, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React50.createElement(Group14, { align: "flex-start", gap: "md", style: { flex: 1 } }, /* @__PURE__ */ React50.createElement(ActionIcon7, { variant: "light", color: "blue", size: "xl", radius: "xl", style: { flexShrink: 0 } }, getIcon(icon, 24, 1.5, "file-text")), /* @__PURE__ */ React50.createElement(Stack31, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React50.createElement(Group14, { gap: "xs" }, /* @__PURE__ */ React50.createElement(Text31, { size: "md", fw: 600 }, title || "Proposal"), /* @__PURE__ */ React50.createElement(Badge6, { color: statusColor[status], variant: "filled", size: "sm", radius: "sm" }, status.replace(/_/g, " ").toUpperCase())), /* @__PURE__ */ React50.createElement(Text31, { size: "sm", c: "dimmed" }, getDisplayDescription(description)), status === "passed" && onExecute && /* @__PURE__ */ React50.createElement(
|
|
4474
4571
|
Button11,
|
|
4475
4572
|
{
|
|
4476
4573
|
size: "sm",
|
|
@@ -4490,16 +4587,16 @@ var OnChainProposalCard = ({
|
|
|
4490
4587
|
};
|
|
4491
4588
|
|
|
4492
4589
|
// src/mantine/blocks/proposal/flow/FlowConfig.tsx
|
|
4493
|
-
import
|
|
4590
|
+
import React51, { useCallback as useCallback12, useState as useState14 } from "react";
|
|
4494
4591
|
import {
|
|
4495
4592
|
Paper as Paper5,
|
|
4496
4593
|
CloseButton as CloseButton5,
|
|
4497
4594
|
Title as Title5,
|
|
4498
|
-
Stack as
|
|
4595
|
+
Stack as Stack32,
|
|
4499
4596
|
TextInput as TextInput6,
|
|
4500
4597
|
Textarea as Textarea4,
|
|
4501
4598
|
Button as Button12,
|
|
4502
|
-
Text as
|
|
4599
|
+
Text as Text32,
|
|
4503
4600
|
Card as Card11
|
|
4504
4601
|
} from "@mantine/core";
|
|
4505
4602
|
|
|
@@ -4697,7 +4794,7 @@ var FlowConfig2 = ({ editor, block }) => {
|
|
|
4697
4794
|
setIsCreating(false);
|
|
4698
4795
|
}
|
|
4699
4796
|
};
|
|
4700
|
-
return /* @__PURE__ */
|
|
4797
|
+
return /* @__PURE__ */ React51.createElement(
|
|
4701
4798
|
Paper5,
|
|
4702
4799
|
{
|
|
4703
4800
|
p: "md",
|
|
@@ -4708,7 +4805,7 @@ var FlowConfig2 = ({ editor, block }) => {
|
|
|
4708
4805
|
flexDirection: "column"
|
|
4709
4806
|
}
|
|
4710
4807
|
},
|
|
4711
|
-
/* @__PURE__ */
|
|
4808
|
+
/* @__PURE__ */ React51.createElement(
|
|
4712
4809
|
"div",
|
|
4713
4810
|
{
|
|
4714
4811
|
style: {
|
|
@@ -4718,10 +4815,10 @@ var FlowConfig2 = ({ editor, block }) => {
|
|
|
4718
4815
|
marginBottom: "1rem"
|
|
4719
4816
|
}
|
|
4720
4817
|
},
|
|
4721
|
-
/* @__PURE__ */
|
|
4722
|
-
/* @__PURE__ */
|
|
4818
|
+
/* @__PURE__ */ React51.createElement(Title5, { order: 3 }, "Create Proposal"),
|
|
4819
|
+
/* @__PURE__ */ React51.createElement(CloseButton5, { onClick: closePanel })
|
|
4723
4820
|
),
|
|
4724
|
-
/* @__PURE__ */
|
|
4821
|
+
/* @__PURE__ */ React51.createElement(Stack32, { gap: "lg", style: { flex: 1, overflow: "auto" } }, coreAddress && /* @__PURE__ */ React51.createElement(Card11, { padding: "sm", radius: "md", withBorder: true }, /* @__PURE__ */ React51.createElement(Text32, { size: "xs", c: "dimmed" }, "Core Address:", " ", /* @__PURE__ */ React51.createElement(Text32, { span: true, ff: "monospace", c: "bright" }, coreAddress.slice(0, 20), "...", coreAddress.slice(-10)))), /* @__PURE__ */ React51.createElement(
|
|
4725
4822
|
TextInput6,
|
|
4726
4823
|
{
|
|
4727
4824
|
label: "Title",
|
|
@@ -4732,7 +4829,7 @@ var FlowConfig2 = ({ editor, block }) => {
|
|
|
4732
4829
|
required: true,
|
|
4733
4830
|
disabled: isProposalCreated
|
|
4734
4831
|
}
|
|
4735
|
-
), /* @__PURE__ */
|
|
4832
|
+
), /* @__PURE__ */ React51.createElement(
|
|
4736
4833
|
Textarea4,
|
|
4737
4834
|
{
|
|
4738
4835
|
label: "Description",
|
|
@@ -4744,7 +4841,7 @@ var FlowConfig2 = ({ editor, block }) => {
|
|
|
4744
4841
|
required: true,
|
|
4745
4842
|
disabled: isProposalCreated
|
|
4746
4843
|
}
|
|
4747
|
-
), errors.general && /* @__PURE__ */
|
|
4844
|
+
), errors.general && /* @__PURE__ */ React51.createElement(Text32, { size: "sm", c: "red" }, errors.general), isProposalCreated && /* @__PURE__ */ React51.createElement(
|
|
4748
4845
|
Card11,
|
|
4749
4846
|
{
|
|
4750
4847
|
padding: "md",
|
|
@@ -4752,9 +4849,9 @@ var FlowConfig2 = ({ editor, block }) => {
|
|
|
4752
4849
|
withBorder: true,
|
|
4753
4850
|
style: { borderColor: "var(--mantine-color-green-6)" }
|
|
4754
4851
|
},
|
|
4755
|
-
/* @__PURE__ */
|
|
4756
|
-
/* @__PURE__ */
|
|
4757
|
-
), /* @__PURE__ */
|
|
4852
|
+
/* @__PURE__ */ React51.createElement(Text32, { fw: 500, size: "sm", c: "green" }, "Proposal Created Successfully"),
|
|
4853
|
+
/* @__PURE__ */ React51.createElement(Text32, { size: "sm", c: "dimmed" }, "Your proposal has been created and is now open for voting.")
|
|
4854
|
+
), /* @__PURE__ */ React51.createElement(
|
|
4758
4855
|
Button12,
|
|
4759
4856
|
{
|
|
4760
4857
|
fullWidth: true,
|
|
@@ -4784,9 +4881,9 @@ var ProposalFlowView = ({ block, editor }) => {
|
|
|
4784
4881
|
handleExecuteProposal,
|
|
4785
4882
|
handleIconChange
|
|
4786
4883
|
} = useFlowBusinessLogic2({ block, editor });
|
|
4787
|
-
const panelContent = useMemo14(() => /* @__PURE__ */
|
|
4884
|
+
const panelContent = useMemo14(() => /* @__PURE__ */ React52.createElement(FlowConfig2, { editor, block }), [editor, block]);
|
|
4788
4885
|
const { open } = usePanel(panelId, panelContent);
|
|
4789
|
-
return /* @__PURE__ */
|
|
4886
|
+
return /* @__PURE__ */ React52.createElement(
|
|
4790
4887
|
OnChainProposalCard,
|
|
4791
4888
|
{
|
|
4792
4889
|
title,
|
|
@@ -4808,9 +4905,9 @@ var ProposalFlowView = ({ block, editor }) => {
|
|
|
4808
4905
|
// src/mantine/blocks/proposal/ProposalBlock.tsx
|
|
4809
4906
|
function ProposalBlock({ editor, block }) {
|
|
4810
4907
|
if (editor.isEditable) {
|
|
4811
|
-
return /* @__PURE__ */
|
|
4908
|
+
return /* @__PURE__ */ React53.createElement(ProposalTemplateView, { editor, block });
|
|
4812
4909
|
}
|
|
4813
|
-
return /* @__PURE__ */
|
|
4910
|
+
return /* @__PURE__ */ React53.createElement(ProposalFlowView, { block, editor });
|
|
4814
4911
|
}
|
|
4815
4912
|
|
|
4816
4913
|
// src/mantine/blocks/proposal/ProposalBlockSpec.tsx
|
|
@@ -4849,21 +4946,21 @@ var ProposalBlockSpec = createReactBlockSpec5(
|
|
|
4849
4946
|
{
|
|
4850
4947
|
render: (props) => {
|
|
4851
4948
|
const ixoProps = props;
|
|
4852
|
-
return /* @__PURE__ */
|
|
4949
|
+
return /* @__PURE__ */ React54.createElement(ProposalBlock, { ...ixoProps });
|
|
4853
4950
|
}
|
|
4854
4951
|
}
|
|
4855
4952
|
);
|
|
4856
4953
|
|
|
4857
4954
|
// src/mantine/blocks/proposalActions/ProposalActionsBlockSpec.tsx
|
|
4858
|
-
import
|
|
4955
|
+
import React57 from "react";
|
|
4859
4956
|
import { createReactBlockSpec as createReactBlockSpec6 } from "@blocknote/react";
|
|
4860
4957
|
|
|
4861
4958
|
// src/mantine/blocks/proposalActions/ProposalActionsBlock.tsx
|
|
4862
|
-
import
|
|
4959
|
+
import React56, { useCallback as useCallback13 } from "react";
|
|
4863
4960
|
|
|
4864
4961
|
// src/mantine/blocks/proposalActions/components/ActionsCard.tsx
|
|
4865
|
-
import
|
|
4866
|
-
import { Card as Card12, Group as Group15, Text as
|
|
4962
|
+
import React55 from "react";
|
|
4963
|
+
import { Card as Card12, Group as Group15, Text as Text33, Badge as Badge7, Stack as Stack33, ActionIcon as ActionIcon8, Button as Button13, Box as Box17, ScrollArea } from "@mantine/core";
|
|
4867
4964
|
var getActionSummary = (action) => {
|
|
4868
4965
|
switch (action.type) {
|
|
4869
4966
|
case "Spend":
|
|
@@ -4895,7 +4992,7 @@ var ActionsCard = ({ actions, isSelected, onClick, onAddAction, onEditAction, on
|
|
|
4895
4992
|
}
|
|
4896
4993
|
onClick();
|
|
4897
4994
|
};
|
|
4898
|
-
return /* @__PURE__ */
|
|
4995
|
+
return /* @__PURE__ */ React55.createElement(
|
|
4899
4996
|
Card12,
|
|
4900
4997
|
{
|
|
4901
4998
|
shadow: "sm",
|
|
@@ -4912,8 +5009,8 @@ var ActionsCard = ({ actions, isSelected, onClick, onAddAction, onEditAction, on
|
|
|
4912
5009
|
},
|
|
4913
5010
|
onClick: handleCardClick
|
|
4914
5011
|
},
|
|
4915
|
-
/* @__PURE__ */
|
|
4916
|
-
|
|
5012
|
+
/* @__PURE__ */ React55.createElement(Group15, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React55.createElement(Group15, { align: "flex-start", gap: "md", style: { flex: 1 } }, /* @__PURE__ */ React55.createElement(
|
|
5013
|
+
Box17,
|
|
4917
5014
|
{
|
|
4918
5015
|
style: {
|
|
4919
5016
|
width: 48,
|
|
@@ -4928,7 +5025,7 @@ var ActionsCard = ({ actions, isSelected, onClick, onAddAction, onEditAction, on
|
|
|
4928
5025
|
}
|
|
4929
5026
|
},
|
|
4930
5027
|
"\u{1F4CB}"
|
|
4931
|
-
), /* @__PURE__ */
|
|
5028
|
+
), /* @__PURE__ */ React55.createElement(Stack33, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React55.createElement(Group15, { justify: "space-between", align: "center" }, /* @__PURE__ */ React55.createElement(Text33, { size: "md", fw: 600, style: { color: "#f1f3f5" } }, "Proposal Actions (", actions.length, ")"), /* @__PURE__ */ React55.createElement(
|
|
4932
5029
|
Button13,
|
|
4933
5030
|
{
|
|
4934
5031
|
size: "xs",
|
|
@@ -4945,7 +5042,7 @@ var ActionsCard = ({ actions, isSelected, onClick, onAddAction, onEditAction, on
|
|
|
4945
5042
|
}
|
|
4946
5043
|
},
|
|
4947
5044
|
"Add Action"
|
|
4948
|
-
)), actions.length === 0 ? /* @__PURE__ */
|
|
5045
|
+
)), actions.length === 0 ? /* @__PURE__ */ React55.createElement(Text33, { size: "sm", style: { color: "#868e96" } }, 'No actions added yet. Click "Add Action" to get started.') : /* @__PURE__ */ React55.createElement(ScrollArea, { h: actions.length > 3 ? 150 : void 0, style: { marginTop: 8 } }, /* @__PURE__ */ React55.createElement(Stack33, { gap: "xs" }, actions.map((action, index) => /* @__PURE__ */ React55.createElement(
|
|
4949
5046
|
Card12,
|
|
4950
5047
|
{
|
|
4951
5048
|
key: index,
|
|
@@ -4956,7 +5053,7 @@ var ActionsCard = ({ actions, isSelected, onClick, onAddAction, onEditAction, on
|
|
|
4956
5053
|
borderColor: "#333"
|
|
4957
5054
|
}
|
|
4958
5055
|
},
|
|
4959
|
-
/* @__PURE__ */
|
|
5056
|
+
/* @__PURE__ */ React55.createElement(Group15, { justify: "space-between", align: "center" }, /* @__PURE__ */ React55.createElement(Group15, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React55.createElement(
|
|
4960
5057
|
Badge7,
|
|
4961
5058
|
{
|
|
4962
5059
|
size: "sm",
|
|
@@ -4967,7 +5064,7 @@ var ActionsCard = ({ actions, isSelected, onClick, onAddAction, onEditAction, on
|
|
|
4967
5064
|
}
|
|
4968
5065
|
},
|
|
4969
5066
|
action.type
|
|
4970
|
-
), /* @__PURE__ */
|
|
5067
|
+
), /* @__PURE__ */ React55.createElement(Text33, { size: "sm", style: { color: "#adb5bd" } }, getActionSummary(action))), /* @__PURE__ */ React55.createElement(Group15, { gap: 4 }, /* @__PURE__ */ React55.createElement(
|
|
4971
5068
|
ActionIcon8,
|
|
4972
5069
|
{
|
|
4973
5070
|
size: "sm",
|
|
@@ -4980,7 +5077,7 @@ var ActionsCard = ({ actions, isSelected, onClick, onAddAction, onEditAction, on
|
|
|
4980
5077
|
style: { color: "#4dabf7" }
|
|
4981
5078
|
},
|
|
4982
5079
|
"\u270F\uFE0F"
|
|
4983
|
-
), /* @__PURE__ */
|
|
5080
|
+
), /* @__PURE__ */ React55.createElement(
|
|
4984
5081
|
ActionIcon8,
|
|
4985
5082
|
{
|
|
4986
5083
|
size: "sm",
|
|
@@ -5037,7 +5134,7 @@ var ProposalActionsBlock = ({ block, editor }) => {
|
|
|
5037
5134
|
);
|
|
5038
5135
|
const handleCardClick = useCallback13(() => {
|
|
5039
5136
|
}, []);
|
|
5040
|
-
return /* @__PURE__ */
|
|
5137
|
+
return /* @__PURE__ */ React56.createElement(ActionsCard, { actions, isSelected: true, onClick: handleCardClick, onAddAction: handleAddAction, onEditAction: handleEditAction, onRemoveAction: handleRemoveAction });
|
|
5041
5138
|
};
|
|
5042
5139
|
|
|
5043
5140
|
// src/mantine/blocks/proposalActions/ProposalActionsBlockSpec.tsx
|
|
@@ -5075,19 +5172,19 @@ var ProposalActionsBlockSpec = createReactBlockSpec6(
|
|
|
5075
5172
|
content: "none"
|
|
5076
5173
|
},
|
|
5077
5174
|
{
|
|
5078
|
-
render: (props) => /* @__PURE__ */
|
|
5175
|
+
render: (props) => /* @__PURE__ */ React57.createElement(ProposalActionsBlock, { ...props })
|
|
5079
5176
|
}
|
|
5080
5177
|
);
|
|
5081
5178
|
|
|
5082
5179
|
// src/mantine/blocks/proposalActions/ProposalActionsDrawer.tsx
|
|
5083
|
-
import
|
|
5084
|
-
import { Stack as
|
|
5180
|
+
import React88, { useState as useState21, useEffect as useEffect13, useMemo as useMemo15 } from "react";
|
|
5181
|
+
import { Stack as Stack64, Select as Select10, Button as Button19, Group as Group26, Text as Text41, Card as Card18, Badge as Badge10, Divider as Divider3, ScrollArea as ScrollArea3, Alert as Alert8, Tabs as Tabs2, SimpleGrid, Paper as Paper6 } from "@mantine/core";
|
|
5085
5182
|
|
|
5086
5183
|
// src/mantine/blocks/proposalActions/components/SpendActionForm.tsx
|
|
5087
|
-
import
|
|
5088
|
-
import { TextInput as TextInput7, Stack as
|
|
5184
|
+
import React58 from "react";
|
|
5185
|
+
import { TextInput as TextInput7, Stack as Stack34 } from "@mantine/core";
|
|
5089
5186
|
var SpendActionForm = ({ data, onChange }) => {
|
|
5090
|
-
return /* @__PURE__ */
|
|
5187
|
+
return /* @__PURE__ */ React58.createElement(Stack34, null, /* @__PURE__ */ React58.createElement(
|
|
5091
5188
|
TextInput7,
|
|
5092
5189
|
{
|
|
5093
5190
|
label: "Recipient Address",
|
|
@@ -5107,7 +5204,7 @@ var SpendActionForm = ({ data, onChange }) => {
|
|
|
5107
5204
|
}
|
|
5108
5205
|
}
|
|
5109
5206
|
}
|
|
5110
|
-
), /* @__PURE__ */
|
|
5207
|
+
), /* @__PURE__ */ React58.createElement(
|
|
5111
5208
|
TextInput7,
|
|
5112
5209
|
{
|
|
5113
5210
|
label: "Denomination",
|
|
@@ -5127,7 +5224,7 @@ var SpendActionForm = ({ data, onChange }) => {
|
|
|
5127
5224
|
}
|
|
5128
5225
|
}
|
|
5129
5226
|
}
|
|
5130
|
-
), /* @__PURE__ */
|
|
5227
|
+
), /* @__PURE__ */ React58.createElement(
|
|
5131
5228
|
TextInput7,
|
|
5132
5229
|
{
|
|
5133
5230
|
label: "Amount",
|
|
@@ -5151,8 +5248,8 @@ var SpendActionForm = ({ data, onChange }) => {
|
|
|
5151
5248
|
};
|
|
5152
5249
|
|
|
5153
5250
|
// src/mantine/blocks/proposalActions/components/UpdateMembersActionForm.tsx
|
|
5154
|
-
import
|
|
5155
|
-
import { Stack as
|
|
5251
|
+
import React59, { useState as useState15 } from "react";
|
|
5252
|
+
import { Stack as Stack35, TextInput as TextInput8, NumberInput as NumberInput2, Button as Button14, Group as Group16, Text as Text34, Card as Card13, Badge as Badge8, ActionIcon as ActionIcon9, Divider as Divider2, ScrollArea as ScrollArea2 } from "@mantine/core";
|
|
5156
5253
|
var UpdateMembersActionForm = ({ data, onChange }) => {
|
|
5157
5254
|
const [newMember, setNewMember] = useState15({ address: "", weight: 1 });
|
|
5158
5255
|
const [newRemoveAddress, setNewRemoveAddress] = useState15("");
|
|
@@ -5195,7 +5292,7 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
|
|
|
5195
5292
|
}
|
|
5196
5293
|
}
|
|
5197
5294
|
};
|
|
5198
|
-
return /* @__PURE__ */
|
|
5295
|
+
return /* @__PURE__ */ React59.createElement(Stack35, null, /* @__PURE__ */ React59.createElement(Stack35, { gap: "xs" }, /* @__PURE__ */ React59.createElement(Text34, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Members to Add"), /* @__PURE__ */ React59.createElement(ScrollArea2, { h: 150 }, /* @__PURE__ */ React59.createElement(Stack35, { gap: "xs" }, (data.add || []).map((member, index) => /* @__PURE__ */ React59.createElement(
|
|
5199
5296
|
Card13,
|
|
5200
5297
|
{
|
|
5201
5298
|
key: index,
|
|
@@ -5206,7 +5303,7 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
|
|
|
5206
5303
|
borderColor: "#333"
|
|
5207
5304
|
}
|
|
5208
5305
|
},
|
|
5209
|
-
/* @__PURE__ */
|
|
5306
|
+
/* @__PURE__ */ React59.createElement(Group16, { justify: "space-between" }, /* @__PURE__ */ React59.createElement("div", null, /* @__PURE__ */ React59.createElement(Text34, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, member.address.slice(0, 20), "..."), /* @__PURE__ */ React59.createElement(
|
|
5210
5307
|
Badge8,
|
|
5211
5308
|
{
|
|
5212
5309
|
size: "sm",
|
|
@@ -5217,8 +5314,8 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
|
|
|
5217
5314
|
},
|
|
5218
5315
|
"Weight: ",
|
|
5219
5316
|
member.weight
|
|
5220
|
-
)), /* @__PURE__ */
|
|
5221
|
-
)))), /* @__PURE__ */
|
|
5317
|
+
)), /* @__PURE__ */ React59.createElement(ActionIcon9, { size: "sm", variant: "subtle", onClick: () => handleRemoveMember(index), style: { color: "#ff6b6b" } }, "\u{1F5D1}\uFE0F"))
|
|
5318
|
+
)))), /* @__PURE__ */ React59.createElement(Group16, { grow: true }, /* @__PURE__ */ React59.createElement(TextInput8, { placeholder: "Member address", value: newMember.address, onChange: (e) => setNewMember({ ...newMember, address: e.currentTarget.value }), styles: inputStyles29 }), /* @__PURE__ */ React59.createElement(
|
|
5222
5319
|
NumberInput2,
|
|
5223
5320
|
{
|
|
5224
5321
|
placeholder: "Weight",
|
|
@@ -5227,7 +5324,7 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
|
|
|
5227
5324
|
min: 1,
|
|
5228
5325
|
styles: inputStyles29
|
|
5229
5326
|
}
|
|
5230
|
-
), /* @__PURE__ */
|
|
5327
|
+
), /* @__PURE__ */ React59.createElement(
|
|
5231
5328
|
Button14,
|
|
5232
5329
|
{
|
|
5233
5330
|
size: "sm",
|
|
@@ -5240,7 +5337,7 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
|
|
|
5240
5337
|
}
|
|
5241
5338
|
},
|
|
5242
5339
|
"\u2795 Add"
|
|
5243
|
-
))), /* @__PURE__ */
|
|
5340
|
+
))), /* @__PURE__ */ React59.createElement(Divider2, { color: "#333" }), /* @__PURE__ */ React59.createElement(Stack35, { gap: "xs" }, /* @__PURE__ */ React59.createElement(Text34, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Members to Remove"), /* @__PURE__ */ React59.createElement(ScrollArea2, { h: 100 }, /* @__PURE__ */ React59.createElement(Stack35, { gap: "xs" }, (data.remove || []).map((item, index) => /* @__PURE__ */ React59.createElement(
|
|
5244
5341
|
Card13,
|
|
5245
5342
|
{
|
|
5246
5343
|
key: index,
|
|
@@ -5251,8 +5348,8 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
|
|
|
5251
5348
|
borderColor: "#333"
|
|
5252
5349
|
}
|
|
5253
5350
|
},
|
|
5254
|
-
/* @__PURE__ */
|
|
5255
|
-
)))), /* @__PURE__ */
|
|
5351
|
+
/* @__PURE__ */ React59.createElement(Group16, { justify: "space-between" }, /* @__PURE__ */ React59.createElement(Text34, { size: "sm", style: { color: "#adb5bd" } }, item.addr.slice(0, 30), "..."), /* @__PURE__ */ React59.createElement(ActionIcon9, { size: "sm", variant: "subtle", onClick: () => handleRemoveRemoveAddress(index), style: { color: "#ff6b6b" } }, "\u{1F5D1}\uFE0F"))
|
|
5352
|
+
)))), /* @__PURE__ */ React59.createElement(Group16, { grow: true }, /* @__PURE__ */ React59.createElement(TextInput8, { placeholder: "Address to remove", value: newRemoveAddress, onChange: (e) => setNewRemoveAddress(e.currentTarget.value), styles: inputStyles29 }), /* @__PURE__ */ React59.createElement(
|
|
5256
5353
|
Button14,
|
|
5257
5354
|
{
|
|
5258
5355
|
size: "sm",
|
|
@@ -5269,8 +5366,8 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
|
|
|
5269
5366
|
};
|
|
5270
5367
|
|
|
5271
5368
|
// src/mantine/blocks/proposalActions/components/StakeActionForm.tsx
|
|
5272
|
-
import
|
|
5273
|
-
import { Stack as
|
|
5369
|
+
import React60 from "react";
|
|
5370
|
+
import { Stack as Stack36, TextInput as TextInput9, Select as Select4, NumberInput as NumberInput3 } from "@mantine/core";
|
|
5274
5371
|
var stakeTypeOptions = [
|
|
5275
5372
|
{ value: StakeType.Delegate, label: "Delegate" },
|
|
5276
5373
|
{ value: StakeType.Undelegate, label: "Undelegate" },
|
|
@@ -5315,7 +5412,7 @@ var selectStyles = {
|
|
|
5315
5412
|
var StakeActionForm = ({ data, onChange }) => {
|
|
5316
5413
|
const isRedelegate = data.stakeType === StakeType.Redelegate;
|
|
5317
5414
|
const needsAmount = data.stakeType !== StakeType.WithdrawDelegatorReward;
|
|
5318
|
-
return /* @__PURE__ */
|
|
5415
|
+
return /* @__PURE__ */ React60.createElement(Stack36, { gap: "md" }, /* @__PURE__ */ React60.createElement(
|
|
5319
5416
|
Select4,
|
|
5320
5417
|
{
|
|
5321
5418
|
label: "Stake Type",
|
|
@@ -5325,7 +5422,7 @@ var StakeActionForm = ({ data, onChange }) => {
|
|
|
5325
5422
|
required: true,
|
|
5326
5423
|
styles: selectStyles
|
|
5327
5424
|
}
|
|
5328
|
-
), /* @__PURE__ */
|
|
5425
|
+
), /* @__PURE__ */ React60.createElement(
|
|
5329
5426
|
TextInput9,
|
|
5330
5427
|
{
|
|
5331
5428
|
label: "Validator Address",
|
|
@@ -5335,7 +5432,7 @@ var StakeActionForm = ({ data, onChange }) => {
|
|
|
5335
5432
|
required: true,
|
|
5336
5433
|
styles: inputStyles
|
|
5337
5434
|
}
|
|
5338
|
-
), isRedelegate && /* @__PURE__ */
|
|
5435
|
+
), isRedelegate && /* @__PURE__ */ React60.createElement(
|
|
5339
5436
|
TextInput9,
|
|
5340
5437
|
{
|
|
5341
5438
|
label: "Destination Validator Address",
|
|
@@ -5345,7 +5442,7 @@ var StakeActionForm = ({ data, onChange }) => {
|
|
|
5345
5442
|
required: true,
|
|
5346
5443
|
styles: inputStyles
|
|
5347
5444
|
}
|
|
5348
|
-
), needsAmount && /* @__PURE__ */
|
|
5445
|
+
), needsAmount && /* @__PURE__ */ React60.createElement(React60.Fragment, null, /* @__PURE__ */ React60.createElement(
|
|
5349
5446
|
NumberInput3,
|
|
5350
5447
|
{
|
|
5351
5448
|
label: "Amount",
|
|
@@ -5357,7 +5454,7 @@ var StakeActionForm = ({ data, onChange }) => {
|
|
|
5357
5454
|
required: true,
|
|
5358
5455
|
styles: inputStyles
|
|
5359
5456
|
}
|
|
5360
|
-
), /* @__PURE__ */
|
|
5457
|
+
), /* @__PURE__ */ React60.createElement(
|
|
5361
5458
|
Select4,
|
|
5362
5459
|
{
|
|
5363
5460
|
label: "Denomination",
|
|
@@ -5374,8 +5471,8 @@ var StakeActionForm = ({ data, onChange }) => {
|
|
|
5374
5471
|
};
|
|
5375
5472
|
|
|
5376
5473
|
// src/mantine/blocks/proposalActions/components/JoinActionForm.tsx
|
|
5377
|
-
import
|
|
5378
|
-
import { Stack as
|
|
5474
|
+
import React61 from "react";
|
|
5475
|
+
import { Stack as Stack37, TextInput as TextInput10 } from "@mantine/core";
|
|
5379
5476
|
var inputStyles2 = {
|
|
5380
5477
|
label: { color: "#adb5bd" },
|
|
5381
5478
|
input: {
|
|
@@ -5388,7 +5485,7 @@ var inputStyles2 = {
|
|
|
5388
5485
|
}
|
|
5389
5486
|
};
|
|
5390
5487
|
var JoinActionForm = ({ data, onChange }) => {
|
|
5391
|
-
return /* @__PURE__ */
|
|
5488
|
+
return /* @__PURE__ */ React61.createElement(Stack37, { gap: "md" }, /* @__PURE__ */ React61.createElement(
|
|
5392
5489
|
TextInput10,
|
|
5393
5490
|
{
|
|
5394
5491
|
label: "ID",
|
|
@@ -5398,7 +5495,7 @@ var JoinActionForm = ({ data, onChange }) => {
|
|
|
5398
5495
|
required: true,
|
|
5399
5496
|
styles: inputStyles2
|
|
5400
5497
|
}
|
|
5401
|
-
), /* @__PURE__ */
|
|
5498
|
+
), /* @__PURE__ */ React61.createElement(
|
|
5402
5499
|
TextInput10,
|
|
5403
5500
|
{
|
|
5404
5501
|
label: "Core Address",
|
|
@@ -5408,7 +5505,7 @@ var JoinActionForm = ({ data, onChange }) => {
|
|
|
5408
5505
|
required: true,
|
|
5409
5506
|
styles: inputStyles2
|
|
5410
5507
|
}
|
|
5411
|
-
), /* @__PURE__ */
|
|
5508
|
+
), /* @__PURE__ */ React61.createElement(
|
|
5412
5509
|
TextInput10,
|
|
5413
5510
|
{
|
|
5414
5511
|
label: "Address",
|
|
@@ -5422,8 +5519,8 @@ var JoinActionForm = ({ data, onChange }) => {
|
|
|
5422
5519
|
};
|
|
5423
5520
|
|
|
5424
5521
|
// src/mantine/blocks/proposalActions/components/forms/MintActionForm.tsx
|
|
5425
|
-
import
|
|
5426
|
-
import { Stack as
|
|
5522
|
+
import React62 from "react";
|
|
5523
|
+
import { Stack as Stack38, TextInput as TextInput11, NumberInput as NumberInput4 } from "@mantine/core";
|
|
5427
5524
|
var inputStyles3 = {
|
|
5428
5525
|
label: { color: "#adb5bd" },
|
|
5429
5526
|
input: {
|
|
@@ -5436,7 +5533,7 @@ var inputStyles3 = {
|
|
|
5436
5533
|
}
|
|
5437
5534
|
};
|
|
5438
5535
|
var MintActionForm = ({ data, onChange }) => {
|
|
5439
|
-
return /* @__PURE__ */
|
|
5536
|
+
return /* @__PURE__ */ React62.createElement(Stack38, { gap: "md" }, /* @__PURE__ */ React62.createElement(
|
|
5440
5537
|
TextInput11,
|
|
5441
5538
|
{
|
|
5442
5539
|
label: "Recipient Address",
|
|
@@ -5446,7 +5543,7 @@ var MintActionForm = ({ data, onChange }) => {
|
|
|
5446
5543
|
required: true,
|
|
5447
5544
|
styles: inputStyles3
|
|
5448
5545
|
}
|
|
5449
|
-
), /* @__PURE__ */
|
|
5546
|
+
), /* @__PURE__ */ React62.createElement(
|
|
5450
5547
|
NumberInput4,
|
|
5451
5548
|
{
|
|
5452
5549
|
label: "Amount",
|
|
@@ -5462,8 +5559,8 @@ var MintActionForm = ({ data, onChange }) => {
|
|
|
5462
5559
|
};
|
|
5463
5560
|
|
|
5464
5561
|
// src/mantine/blocks/proposalActions/components/forms/ExecuteActionForm.tsx
|
|
5465
|
-
import
|
|
5466
|
-
import { Stack as
|
|
5562
|
+
import React63, { useState as useState16 } from "react";
|
|
5563
|
+
import { Stack as Stack39, TextInput as TextInput12, Textarea as Textarea5, Button as Button15, Group as Group17, Text as Text35, Card as Card14 } from "@mantine/core";
|
|
5467
5564
|
var inputStyles4 = {
|
|
5468
5565
|
label: { color: "#adb5bd" },
|
|
5469
5566
|
input: {
|
|
@@ -5500,7 +5597,7 @@ var ExecuteActionForm = ({ data, onChange }) => {
|
|
|
5500
5597
|
return data.message;
|
|
5501
5598
|
}
|
|
5502
5599
|
};
|
|
5503
|
-
return /* @__PURE__ */
|
|
5600
|
+
return /* @__PURE__ */ React63.createElement(Stack39, { gap: "md" }, /* @__PURE__ */ React63.createElement(
|
|
5504
5601
|
TextInput12,
|
|
5505
5602
|
{
|
|
5506
5603
|
label: "Contract Address",
|
|
@@ -5510,7 +5607,7 @@ var ExecuteActionForm = ({ data, onChange }) => {
|
|
|
5510
5607
|
required: true,
|
|
5511
5608
|
styles: inputStyles4
|
|
5512
5609
|
}
|
|
5513
|
-
), /* @__PURE__ */
|
|
5610
|
+
), /* @__PURE__ */ React63.createElement(
|
|
5514
5611
|
Textarea5,
|
|
5515
5612
|
{
|
|
5516
5613
|
label: "Message (JSON)",
|
|
@@ -5521,7 +5618,7 @@ var ExecuteActionForm = ({ data, onChange }) => {
|
|
|
5521
5618
|
required: true,
|
|
5522
5619
|
styles: inputStyles4
|
|
5523
5620
|
}
|
|
5524
|
-
), /* @__PURE__ */
|
|
5621
|
+
), /* @__PURE__ */ React63.createElement(Stack39, { gap: "xs" }, /* @__PURE__ */ React63.createElement(Text35, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Funds (Optional)"), (data.funds || []).map((fund, index) => /* @__PURE__ */ React63.createElement(
|
|
5525
5622
|
Card14,
|
|
5526
5623
|
{
|
|
5527
5624
|
key: index,
|
|
@@ -5529,7 +5626,7 @@ var ExecuteActionForm = ({ data, onChange }) => {
|
|
|
5529
5626
|
padding: "xs",
|
|
5530
5627
|
style: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
5531
5628
|
},
|
|
5532
|
-
/* @__PURE__ */
|
|
5629
|
+
/* @__PURE__ */ React63.createElement(Group17, { justify: "space-between" }, /* @__PURE__ */ React63.createElement(Text35, { size: "sm", style: { color: "#f1f3f5" } }, fund.amount, " ", fund.denom), /* @__PURE__ */ React63.createElement(
|
|
5533
5630
|
Button15,
|
|
5534
5631
|
{
|
|
5535
5632
|
size: "xs",
|
|
@@ -5539,7 +5636,7 @@ var ExecuteActionForm = ({ data, onChange }) => {
|
|
|
5539
5636
|
},
|
|
5540
5637
|
"Remove"
|
|
5541
5638
|
))
|
|
5542
|
-
)), /* @__PURE__ */
|
|
5639
|
+
)), /* @__PURE__ */ React63.createElement(Group17, { grow: true }, /* @__PURE__ */ React63.createElement(
|
|
5543
5640
|
TextInput12,
|
|
5544
5641
|
{
|
|
5545
5642
|
placeholder: "Amount",
|
|
@@ -5547,7 +5644,7 @@ var ExecuteActionForm = ({ data, onChange }) => {
|
|
|
5547
5644
|
onChange: (e) => setNewFund({ ...newFund, amount: e.currentTarget.value }),
|
|
5548
5645
|
styles: inputStyles4
|
|
5549
5646
|
}
|
|
5550
|
-
), /* @__PURE__ */
|
|
5647
|
+
), /* @__PURE__ */ React63.createElement(
|
|
5551
5648
|
TextInput12,
|
|
5552
5649
|
{
|
|
5553
5650
|
placeholder: "Denom (e.g., uixo)",
|
|
@@ -5555,7 +5652,7 @@ var ExecuteActionForm = ({ data, onChange }) => {
|
|
|
5555
5652
|
onChange: (e) => setNewFund({ ...newFund, denom: e.currentTarget.value }),
|
|
5556
5653
|
styles: inputStyles4
|
|
5557
5654
|
}
|
|
5558
|
-
), /* @__PURE__ */
|
|
5655
|
+
), /* @__PURE__ */ React63.createElement(
|
|
5559
5656
|
Button15,
|
|
5560
5657
|
{
|
|
5561
5658
|
size: "sm",
|
|
@@ -5570,8 +5667,8 @@ var ExecuteActionForm = ({ data, onChange }) => {
|
|
|
5570
5667
|
};
|
|
5571
5668
|
|
|
5572
5669
|
// src/mantine/blocks/proposalActions/components/forms/CustomActionForm.tsx
|
|
5573
|
-
import
|
|
5574
|
-
import { Stack as
|
|
5670
|
+
import React64, { useState as useState17, useEffect as useEffect12 } from "react";
|
|
5671
|
+
import { Stack as Stack40, Textarea as Textarea6, Alert as Alert6, Text as Text36, Badge as Badge9 } from "@mantine/core";
|
|
5575
5672
|
import { Group as Group18 } from "@mantine/core";
|
|
5576
5673
|
var inputStyles5 = {
|
|
5577
5674
|
label: { color: "#adb5bd" },
|
|
@@ -5608,7 +5705,7 @@ var CustomActionForm = ({ data, onChange }) => {
|
|
|
5608
5705
|
return data.message;
|
|
5609
5706
|
}
|
|
5610
5707
|
};
|
|
5611
|
-
return /* @__PURE__ */
|
|
5708
|
+
return /* @__PURE__ */ React64.createElement(Stack40, { gap: "md" }, /* @__PURE__ */ React64.createElement(Alert6, { color: "yellow", style: { backgroundColor: "#2a2a2a", borderColor: "#ffd43b" } }, /* @__PURE__ */ React64.createElement(Text36, { size: "sm", style: { color: "#ffd43b" } }, "\u26A0\uFE0F Custom actions require valid JSON messages. Supports both Wasm and Stargate message formats.")), /* @__PURE__ */ React64.createElement("div", null, /* @__PURE__ */ React64.createElement(Group18, { gap: "xs", mb: "xs" }, /* @__PURE__ */ React64.createElement(Text36, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Custom Message (JSON)"), /* @__PURE__ */ React64.createElement(
|
|
5612
5709
|
Badge9,
|
|
5613
5710
|
{
|
|
5614
5711
|
size: "sm",
|
|
@@ -5618,7 +5715,7 @@ var CustomActionForm = ({ data, onChange }) => {
|
|
|
5618
5715
|
}
|
|
5619
5716
|
},
|
|
5620
5717
|
isValid ? "Valid JSON" : "Invalid JSON"
|
|
5621
|
-
)), /* @__PURE__ */
|
|
5718
|
+
)), /* @__PURE__ */ React64.createElement(
|
|
5622
5719
|
Textarea6,
|
|
5623
5720
|
{
|
|
5624
5721
|
placeholder: `Example Wasm message:
|
|
@@ -5651,8 +5748,8 @@ Example Stargate message:
|
|
|
5651
5748
|
};
|
|
5652
5749
|
|
|
5653
5750
|
// src/mantine/blocks/proposalActions/components/forms/AuthzExecActionForm.tsx
|
|
5654
|
-
import
|
|
5655
|
-
import { Stack as
|
|
5751
|
+
import React65 from "react";
|
|
5752
|
+
import { Stack as Stack41, Select as Select5, TextInput as TextInput13, Textarea as Textarea7 } from "@mantine/core";
|
|
5656
5753
|
var inputStyles6 = {
|
|
5657
5754
|
label: { color: "#adb5bd" },
|
|
5658
5755
|
input: {
|
|
@@ -5690,7 +5787,7 @@ var AuthzExecActionForm = ({
|
|
|
5690
5787
|
onChange({ ...data, [field]: value });
|
|
5691
5788
|
}
|
|
5692
5789
|
};
|
|
5693
|
-
return /* @__PURE__ */
|
|
5790
|
+
return /* @__PURE__ */ React65.createElement(Stack41, { gap: "md" }, /* @__PURE__ */ React65.createElement(
|
|
5694
5791
|
Select5,
|
|
5695
5792
|
{
|
|
5696
5793
|
label: "Action Type",
|
|
@@ -5701,7 +5798,7 @@ var AuthzExecActionForm = ({
|
|
|
5701
5798
|
required: true,
|
|
5702
5799
|
styles: inputStyles6
|
|
5703
5800
|
}
|
|
5704
|
-
), data.authzExecActionType === AuthzExecActionTypes.Delegate && /* @__PURE__ */
|
|
5801
|
+
), data.authzExecActionType === AuthzExecActionTypes.Delegate && /* @__PURE__ */ React65.createElement(
|
|
5705
5802
|
Textarea7,
|
|
5706
5803
|
{
|
|
5707
5804
|
label: "Delegate Message (JSON)",
|
|
@@ -5711,7 +5808,7 @@ var AuthzExecActionForm = ({
|
|
|
5711
5808
|
minRows: 4,
|
|
5712
5809
|
styles: inputStyles6
|
|
5713
5810
|
}
|
|
5714
|
-
), data.authzExecActionType === AuthzExecActionTypes.Undelegate && /* @__PURE__ */
|
|
5811
|
+
), data.authzExecActionType === AuthzExecActionTypes.Undelegate && /* @__PURE__ */ React65.createElement(
|
|
5715
5812
|
Textarea7,
|
|
5716
5813
|
{
|
|
5717
5814
|
label: "Undelegate Message (JSON)",
|
|
@@ -5721,7 +5818,7 @@ var AuthzExecActionForm = ({
|
|
|
5721
5818
|
minRows: 4,
|
|
5722
5819
|
styles: inputStyles6
|
|
5723
5820
|
}
|
|
5724
|
-
), data.authzExecActionType === AuthzExecActionTypes.Redelegate && /* @__PURE__ */
|
|
5821
|
+
), data.authzExecActionType === AuthzExecActionTypes.Redelegate && /* @__PURE__ */ React65.createElement(
|
|
5725
5822
|
Textarea7,
|
|
5726
5823
|
{
|
|
5727
5824
|
label: "Redelegate Message (JSON)",
|
|
@@ -5731,7 +5828,7 @@ var AuthzExecActionForm = ({
|
|
|
5731
5828
|
minRows: 4,
|
|
5732
5829
|
styles: inputStyles6
|
|
5733
5830
|
}
|
|
5734
|
-
), data.authzExecActionType === AuthzExecActionTypes.ClaimRewards && /* @__PURE__ */
|
|
5831
|
+
), data.authzExecActionType === AuthzExecActionTypes.ClaimRewards && /* @__PURE__ */ React65.createElement(
|
|
5735
5832
|
Textarea7,
|
|
5736
5833
|
{
|
|
5737
5834
|
label: "Claim Rewards Message (JSON)",
|
|
@@ -5741,7 +5838,7 @@ var AuthzExecActionForm = ({
|
|
|
5741
5838
|
minRows: 3,
|
|
5742
5839
|
styles: inputStyles6
|
|
5743
5840
|
}
|
|
5744
|
-
), data.authzExecActionType === AuthzExecActionTypes.Custom && /* @__PURE__ */
|
|
5841
|
+
), data.authzExecActionType === AuthzExecActionTypes.Custom && /* @__PURE__ */ React65.createElement(
|
|
5745
5842
|
TextInput13,
|
|
5746
5843
|
{
|
|
5747
5844
|
label: "Custom Message",
|
|
@@ -5754,8 +5851,8 @@ var AuthzExecActionForm = ({
|
|
|
5754
5851
|
};
|
|
5755
5852
|
|
|
5756
5853
|
// src/mantine/blocks/proposalActions/components/forms/AuthzGrantActionForm.tsx
|
|
5757
|
-
import
|
|
5758
|
-
import { Stack as
|
|
5854
|
+
import React66 from "react";
|
|
5855
|
+
import { Stack as Stack42, TextInput as TextInput14 } from "@mantine/core";
|
|
5759
5856
|
var inputStyles7 = {
|
|
5760
5857
|
label: { color: "#adb5bd" },
|
|
5761
5858
|
input: {
|
|
@@ -5768,7 +5865,7 @@ var inputStyles7 = {
|
|
|
5768
5865
|
}
|
|
5769
5866
|
};
|
|
5770
5867
|
var AuthzGrantActionForm = ({ data, onChange }) => {
|
|
5771
|
-
return /* @__PURE__ */
|
|
5868
|
+
return /* @__PURE__ */ React66.createElement(Stack42, { gap: "md" }, /* @__PURE__ */ React66.createElement(
|
|
5772
5869
|
TextInput14,
|
|
5773
5870
|
{
|
|
5774
5871
|
label: "Type URL",
|
|
@@ -5778,7 +5875,7 @@ var AuthzGrantActionForm = ({ data, onChange }) => {
|
|
|
5778
5875
|
required: true,
|
|
5779
5876
|
styles: inputStyles7
|
|
5780
5877
|
}
|
|
5781
|
-
), /* @__PURE__ */
|
|
5878
|
+
), /* @__PURE__ */ React66.createElement(
|
|
5782
5879
|
TextInput14,
|
|
5783
5880
|
{
|
|
5784
5881
|
label: "Grantee Address",
|
|
@@ -5791,7 +5888,7 @@ var AuthzGrantActionForm = ({ data, onChange }) => {
|
|
|
5791
5888
|
required: true,
|
|
5792
5889
|
styles: inputStyles7
|
|
5793
5890
|
}
|
|
5794
|
-
), /* @__PURE__ */
|
|
5891
|
+
), /* @__PURE__ */ React66.createElement(
|
|
5795
5892
|
TextInput14,
|
|
5796
5893
|
{
|
|
5797
5894
|
label: "Message Type URL",
|
|
@@ -5808,8 +5905,8 @@ var AuthzGrantActionForm = ({ data, onChange }) => {
|
|
|
5808
5905
|
};
|
|
5809
5906
|
|
|
5810
5907
|
// src/mantine/blocks/proposalActions/components/forms/BurnNftActionForm.tsx
|
|
5811
|
-
import
|
|
5812
|
-
import { Stack as
|
|
5908
|
+
import React67 from "react";
|
|
5909
|
+
import { Stack as Stack43, TextInput as TextInput15 } from "@mantine/core";
|
|
5813
5910
|
var inputStyles8 = {
|
|
5814
5911
|
label: { color: "#adb5bd" },
|
|
5815
5912
|
input: {
|
|
@@ -5822,7 +5919,7 @@ var inputStyles8 = {
|
|
|
5822
5919
|
}
|
|
5823
5920
|
};
|
|
5824
5921
|
var BurnNftActionForm = ({ data, onChange }) => {
|
|
5825
|
-
return /* @__PURE__ */
|
|
5922
|
+
return /* @__PURE__ */ React67.createElement(Stack43, { gap: "md" }, /* @__PURE__ */ React67.createElement(
|
|
5826
5923
|
TextInput15,
|
|
5827
5924
|
{
|
|
5828
5925
|
label: "Collection Address",
|
|
@@ -5832,7 +5929,7 @@ var BurnNftActionForm = ({ data, onChange }) => {
|
|
|
5832
5929
|
required: true,
|
|
5833
5930
|
styles: inputStyles8
|
|
5834
5931
|
}
|
|
5835
|
-
), /* @__PURE__ */
|
|
5932
|
+
), /* @__PURE__ */ React67.createElement(
|
|
5836
5933
|
TextInput15,
|
|
5837
5934
|
{
|
|
5838
5935
|
label: "Token ID",
|
|
@@ -5846,8 +5943,8 @@ var BurnNftActionForm = ({ data, onChange }) => {
|
|
|
5846
5943
|
};
|
|
5847
5944
|
|
|
5848
5945
|
// src/mantine/blocks/proposalActions/components/forms/TransferNftActionForm.tsx
|
|
5849
|
-
import
|
|
5850
|
-
import { Stack as
|
|
5946
|
+
import React68 from "react";
|
|
5947
|
+
import { Stack as Stack44, TextInput as TextInput16, Checkbox as Checkbox4, Textarea as Textarea8 } from "@mantine/core";
|
|
5851
5948
|
var inputStyles9 = {
|
|
5852
5949
|
label: { color: "#adb5bd" },
|
|
5853
5950
|
input: {
|
|
@@ -5863,7 +5960,7 @@ var TransferNftActionForm = ({
|
|
|
5863
5960
|
data,
|
|
5864
5961
|
onChange
|
|
5865
5962
|
}) => {
|
|
5866
|
-
return /* @__PURE__ */
|
|
5963
|
+
return /* @__PURE__ */ React68.createElement(Stack44, { gap: "md" }, /* @__PURE__ */ React68.createElement(
|
|
5867
5964
|
TextInput16,
|
|
5868
5965
|
{
|
|
5869
5966
|
label: "Collection Address",
|
|
@@ -5873,7 +5970,7 @@ var TransferNftActionForm = ({
|
|
|
5873
5970
|
required: true,
|
|
5874
5971
|
styles: inputStyles9
|
|
5875
5972
|
}
|
|
5876
|
-
), /* @__PURE__ */
|
|
5973
|
+
), /* @__PURE__ */ React68.createElement(
|
|
5877
5974
|
TextInput16,
|
|
5878
5975
|
{
|
|
5879
5976
|
label: "Token ID",
|
|
@@ -5883,7 +5980,7 @@ var TransferNftActionForm = ({
|
|
|
5883
5980
|
required: true,
|
|
5884
5981
|
styles: inputStyles9
|
|
5885
5982
|
}
|
|
5886
|
-
), /* @__PURE__ */
|
|
5983
|
+
), /* @__PURE__ */ React68.createElement(
|
|
5887
5984
|
TextInput16,
|
|
5888
5985
|
{
|
|
5889
5986
|
label: "Recipient Address",
|
|
@@ -5893,7 +5990,7 @@ var TransferNftActionForm = ({
|
|
|
5893
5990
|
required: true,
|
|
5894
5991
|
styles: inputStyles9
|
|
5895
5992
|
}
|
|
5896
|
-
), /* @__PURE__ */
|
|
5993
|
+
), /* @__PURE__ */ React68.createElement(
|
|
5897
5994
|
Checkbox4,
|
|
5898
5995
|
{
|
|
5899
5996
|
label: "Execute Smart Contract",
|
|
@@ -5904,7 +6001,7 @@ var TransferNftActionForm = ({
|
|
|
5904
6001
|
input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
5905
6002
|
}
|
|
5906
6003
|
}
|
|
5907
|
-
), data.executeSmartContract && /* @__PURE__ */
|
|
6004
|
+
), data.executeSmartContract && /* @__PURE__ */ React68.createElement(
|
|
5908
6005
|
Textarea8,
|
|
5909
6006
|
{
|
|
5910
6007
|
label: "Smart Contract Message (JSON)",
|
|
@@ -5918,8 +6015,8 @@ var TransferNftActionForm = ({
|
|
|
5918
6015
|
};
|
|
5919
6016
|
|
|
5920
6017
|
// src/mantine/blocks/proposalActions/components/forms/ManageCw721ActionForm.tsx
|
|
5921
|
-
import
|
|
5922
|
-
import { Stack as
|
|
6018
|
+
import React69 from "react";
|
|
6019
|
+
import { Stack as Stack45, TextInput as TextInput17, Radio, Group as Group19 } from "@mantine/core";
|
|
5923
6020
|
var inputStyles10 = {
|
|
5924
6021
|
label: { color: "#adb5bd" },
|
|
5925
6022
|
input: {
|
|
@@ -5935,14 +6032,14 @@ var ManageCw721ActionForm = ({
|
|
|
5935
6032
|
data,
|
|
5936
6033
|
onChange
|
|
5937
6034
|
}) => {
|
|
5938
|
-
return /* @__PURE__ */
|
|
6035
|
+
return /* @__PURE__ */ React69.createElement(Stack45, { gap: "md" }, /* @__PURE__ */ React69.createElement(
|
|
5939
6036
|
Radio.Group,
|
|
5940
6037
|
{
|
|
5941
6038
|
label: "Action",
|
|
5942
6039
|
value: data.adding ? "add" : "remove",
|
|
5943
6040
|
onChange: (value) => onChange({ ...data, adding: value === "add" })
|
|
5944
6041
|
},
|
|
5945
|
-
/* @__PURE__ */
|
|
6042
|
+
/* @__PURE__ */ React69.createElement(Group19, { mt: "xs" }, /* @__PURE__ */ React69.createElement(
|
|
5946
6043
|
Radio,
|
|
5947
6044
|
{
|
|
5948
6045
|
value: "add",
|
|
@@ -5952,7 +6049,7 @@ var ManageCw721ActionForm = ({
|
|
|
5952
6049
|
radio: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
5953
6050
|
}
|
|
5954
6051
|
}
|
|
5955
|
-
), /* @__PURE__ */
|
|
6052
|
+
), /* @__PURE__ */ React69.createElement(
|
|
5956
6053
|
Radio,
|
|
5957
6054
|
{
|
|
5958
6055
|
value: "remove",
|
|
@@ -5963,7 +6060,7 @@ var ManageCw721ActionForm = ({
|
|
|
5963
6060
|
}
|
|
5964
6061
|
}
|
|
5965
6062
|
))
|
|
5966
|
-
), /* @__PURE__ */
|
|
6063
|
+
), /* @__PURE__ */ React69.createElement(
|
|
5967
6064
|
TextInput17,
|
|
5968
6065
|
{
|
|
5969
6066
|
label: "NFT Contract Address",
|
|
@@ -5977,8 +6074,8 @@ var ManageCw721ActionForm = ({
|
|
|
5977
6074
|
};
|
|
5978
6075
|
|
|
5979
6076
|
// src/mantine/blocks/proposalActions/components/forms/InstantiateActionForm.tsx
|
|
5980
|
-
import
|
|
5981
|
-
import { Stack as
|
|
6077
|
+
import React70, { useState as useState18 } from "react";
|
|
6078
|
+
import { Stack as Stack46, TextInput as TextInput18, Textarea as Textarea9, NumberInput as NumberInput5, Button as Button16, Group as Group20, Text as Text37, Card as Card15 } from "@mantine/core";
|
|
5982
6079
|
var inputStyles11 = {
|
|
5983
6080
|
label: { color: "#adb5bd" },
|
|
5984
6081
|
input: {
|
|
@@ -6018,7 +6115,7 @@ var InstantiateActionForm = ({
|
|
|
6018
6115
|
return data.message;
|
|
6019
6116
|
}
|
|
6020
6117
|
};
|
|
6021
|
-
return /* @__PURE__ */
|
|
6118
|
+
return /* @__PURE__ */ React70.createElement(Stack46, { gap: "md" }, /* @__PURE__ */ React70.createElement(
|
|
6022
6119
|
TextInput18,
|
|
6023
6120
|
{
|
|
6024
6121
|
label: "Admin Address",
|
|
@@ -6028,7 +6125,7 @@ var InstantiateActionForm = ({
|
|
|
6028
6125
|
required: true,
|
|
6029
6126
|
styles: inputStyles11
|
|
6030
6127
|
}
|
|
6031
|
-
), /* @__PURE__ */
|
|
6128
|
+
), /* @__PURE__ */ React70.createElement(
|
|
6032
6129
|
NumberInput5,
|
|
6033
6130
|
{
|
|
6034
6131
|
label: "Code ID",
|
|
@@ -6039,7 +6136,7 @@ var InstantiateActionForm = ({
|
|
|
6039
6136
|
required: true,
|
|
6040
6137
|
styles: inputStyles11
|
|
6041
6138
|
}
|
|
6042
|
-
), /* @__PURE__ */
|
|
6139
|
+
), /* @__PURE__ */ React70.createElement(
|
|
6043
6140
|
TextInput18,
|
|
6044
6141
|
{
|
|
6045
6142
|
label: "Label",
|
|
@@ -6049,7 +6146,7 @@ var InstantiateActionForm = ({
|
|
|
6049
6146
|
required: true,
|
|
6050
6147
|
styles: inputStyles11
|
|
6051
6148
|
}
|
|
6052
|
-
), /* @__PURE__ */
|
|
6149
|
+
), /* @__PURE__ */ React70.createElement(
|
|
6053
6150
|
Textarea9,
|
|
6054
6151
|
{
|
|
6055
6152
|
label: "Instantiate Message (JSON)",
|
|
@@ -6060,7 +6157,7 @@ var InstantiateActionForm = ({
|
|
|
6060
6157
|
required: true,
|
|
6061
6158
|
styles: inputStyles11
|
|
6062
6159
|
}
|
|
6063
|
-
), /* @__PURE__ */
|
|
6160
|
+
), /* @__PURE__ */ React70.createElement(Stack46, { gap: "xs" }, /* @__PURE__ */ React70.createElement(Text37, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Funds (Optional)"), (data.funds || []).map((fund, index) => /* @__PURE__ */ React70.createElement(
|
|
6064
6161
|
Card15,
|
|
6065
6162
|
{
|
|
6066
6163
|
key: index,
|
|
@@ -6068,7 +6165,7 @@ var InstantiateActionForm = ({
|
|
|
6068
6165
|
padding: "xs",
|
|
6069
6166
|
style: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
6070
6167
|
},
|
|
6071
|
-
/* @__PURE__ */
|
|
6168
|
+
/* @__PURE__ */ React70.createElement(Group20, { justify: "space-between" }, /* @__PURE__ */ React70.createElement(Text37, { size: "sm", style: { color: "#f1f3f5" } }, fund.amount, " ", fund.denom), /* @__PURE__ */ React70.createElement(
|
|
6072
6169
|
Button16,
|
|
6073
6170
|
{
|
|
6074
6171
|
size: "xs",
|
|
@@ -6078,7 +6175,7 @@ var InstantiateActionForm = ({
|
|
|
6078
6175
|
},
|
|
6079
6176
|
"Remove"
|
|
6080
6177
|
))
|
|
6081
|
-
)), /* @__PURE__ */
|
|
6178
|
+
)), /* @__PURE__ */ React70.createElement(Group20, { grow: true }, /* @__PURE__ */ React70.createElement(
|
|
6082
6179
|
TextInput18,
|
|
6083
6180
|
{
|
|
6084
6181
|
placeholder: "Amount",
|
|
@@ -6086,7 +6183,7 @@ var InstantiateActionForm = ({
|
|
|
6086
6183
|
onChange: (e) => setNewFund({ ...newFund, amount: e.currentTarget.value }),
|
|
6087
6184
|
styles: inputStyles11
|
|
6088
6185
|
}
|
|
6089
|
-
), /* @__PURE__ */
|
|
6186
|
+
), /* @__PURE__ */ React70.createElement(
|
|
6090
6187
|
TextInput18,
|
|
6091
6188
|
{
|
|
6092
6189
|
placeholder: "Denom (e.g., uixo)",
|
|
@@ -6094,7 +6191,7 @@ var InstantiateActionForm = ({
|
|
|
6094
6191
|
onChange: (e) => setNewFund({ ...newFund, denom: e.currentTarget.value }),
|
|
6095
6192
|
styles: inputStyles11
|
|
6096
6193
|
}
|
|
6097
|
-
), /* @__PURE__ */
|
|
6194
|
+
), /* @__PURE__ */ React70.createElement(
|
|
6098
6195
|
Button16,
|
|
6099
6196
|
{
|
|
6100
6197
|
size: "sm",
|
|
@@ -6109,8 +6206,8 @@ var InstantiateActionForm = ({
|
|
|
6109
6206
|
};
|
|
6110
6207
|
|
|
6111
6208
|
// src/mantine/blocks/proposalActions/components/forms/MigrateActionForm.tsx
|
|
6112
|
-
import
|
|
6113
|
-
import { Stack as
|
|
6209
|
+
import React71 from "react";
|
|
6210
|
+
import { Stack as Stack47, TextInput as TextInput19, Textarea as Textarea10, NumberInput as NumberInput6 } from "@mantine/core";
|
|
6114
6211
|
var inputStyles12 = {
|
|
6115
6212
|
label: { color: "#adb5bd" },
|
|
6116
6213
|
input: {
|
|
@@ -6131,7 +6228,7 @@ var MigrateActionForm = ({ data, onChange }) => {
|
|
|
6131
6228
|
return data.msg;
|
|
6132
6229
|
}
|
|
6133
6230
|
};
|
|
6134
|
-
return /* @__PURE__ */
|
|
6231
|
+
return /* @__PURE__ */ React71.createElement(Stack47, { gap: "md" }, /* @__PURE__ */ React71.createElement(
|
|
6135
6232
|
TextInput19,
|
|
6136
6233
|
{
|
|
6137
6234
|
label: "Contract Address",
|
|
@@ -6141,7 +6238,7 @@ var MigrateActionForm = ({ data, onChange }) => {
|
|
|
6141
6238
|
required: true,
|
|
6142
6239
|
styles: inputStyles12
|
|
6143
6240
|
}
|
|
6144
|
-
), /* @__PURE__ */
|
|
6241
|
+
), /* @__PURE__ */ React71.createElement(
|
|
6145
6242
|
NumberInput6,
|
|
6146
6243
|
{
|
|
6147
6244
|
label: "New Code ID",
|
|
@@ -6152,7 +6249,7 @@ var MigrateActionForm = ({ data, onChange }) => {
|
|
|
6152
6249
|
required: true,
|
|
6153
6250
|
styles: inputStyles12
|
|
6154
6251
|
}
|
|
6155
|
-
), /* @__PURE__ */
|
|
6252
|
+
), /* @__PURE__ */ React71.createElement(
|
|
6156
6253
|
Textarea10,
|
|
6157
6254
|
{
|
|
6158
6255
|
label: "Migration Message (JSON)",
|
|
@@ -6167,8 +6264,8 @@ var MigrateActionForm = ({ data, onChange }) => {
|
|
|
6167
6264
|
};
|
|
6168
6265
|
|
|
6169
6266
|
// src/mantine/blocks/proposalActions/components/forms/UpdateAdminActionForm.tsx
|
|
6170
|
-
import
|
|
6171
|
-
import { Stack as
|
|
6267
|
+
import React72 from "react";
|
|
6268
|
+
import { Stack as Stack48, TextInput as TextInput20 } from "@mantine/core";
|
|
6172
6269
|
var inputStyles13 = {
|
|
6173
6270
|
label: { color: "#adb5bd" },
|
|
6174
6271
|
input: {
|
|
@@ -6184,7 +6281,7 @@ var UpdateAdminActionForm = ({
|
|
|
6184
6281
|
data,
|
|
6185
6282
|
onChange
|
|
6186
6283
|
}) => {
|
|
6187
|
-
return /* @__PURE__ */
|
|
6284
|
+
return /* @__PURE__ */ React72.createElement(Stack48, { gap: "md" }, /* @__PURE__ */ React72.createElement(
|
|
6188
6285
|
TextInput20,
|
|
6189
6286
|
{
|
|
6190
6287
|
label: "Contract Address",
|
|
@@ -6194,7 +6291,7 @@ var UpdateAdminActionForm = ({
|
|
|
6194
6291
|
required: true,
|
|
6195
6292
|
styles: inputStyles13
|
|
6196
6293
|
}
|
|
6197
|
-
), /* @__PURE__ */
|
|
6294
|
+
), /* @__PURE__ */ React72.createElement(
|
|
6198
6295
|
TextInput20,
|
|
6199
6296
|
{
|
|
6200
6297
|
label: "New Admin Address",
|
|
@@ -6208,8 +6305,8 @@ var UpdateAdminActionForm = ({
|
|
|
6208
6305
|
};
|
|
6209
6306
|
|
|
6210
6307
|
// src/mantine/blocks/proposalActions/components/forms/ManageCw20ActionForm.tsx
|
|
6211
|
-
import
|
|
6212
|
-
import { Stack as
|
|
6308
|
+
import React73 from "react";
|
|
6309
|
+
import { Stack as Stack49, TextInput as TextInput21, Radio as Radio2, Group as Group21 } from "@mantine/core";
|
|
6213
6310
|
var inputStyles14 = {
|
|
6214
6311
|
label: { color: "#adb5bd" },
|
|
6215
6312
|
input: {
|
|
@@ -6225,14 +6322,14 @@ var ManageCw20ActionForm = ({
|
|
|
6225
6322
|
data,
|
|
6226
6323
|
onChange
|
|
6227
6324
|
}) => {
|
|
6228
|
-
return /* @__PURE__ */
|
|
6325
|
+
return /* @__PURE__ */ React73.createElement(Stack49, { gap: "md" }, /* @__PURE__ */ React73.createElement(
|
|
6229
6326
|
Radio2.Group,
|
|
6230
6327
|
{
|
|
6231
6328
|
label: "Action",
|
|
6232
6329
|
value: data.adding ? "add" : "remove",
|
|
6233
6330
|
onChange: (value) => onChange({ ...data, adding: value === "add" })
|
|
6234
6331
|
},
|
|
6235
|
-
/* @__PURE__ */
|
|
6332
|
+
/* @__PURE__ */ React73.createElement(Group21, { mt: "xs" }, /* @__PURE__ */ React73.createElement(
|
|
6236
6333
|
Radio2,
|
|
6237
6334
|
{
|
|
6238
6335
|
value: "add",
|
|
@@ -6242,7 +6339,7 @@ var ManageCw20ActionForm = ({
|
|
|
6242
6339
|
radio: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
6243
6340
|
}
|
|
6244
6341
|
}
|
|
6245
|
-
), /* @__PURE__ */
|
|
6342
|
+
), /* @__PURE__ */ React73.createElement(
|
|
6246
6343
|
Radio2,
|
|
6247
6344
|
{
|
|
6248
6345
|
value: "remove",
|
|
@@ -6253,7 +6350,7 @@ var ManageCw20ActionForm = ({
|
|
|
6253
6350
|
}
|
|
6254
6351
|
}
|
|
6255
6352
|
))
|
|
6256
|
-
), /* @__PURE__ */
|
|
6353
|
+
), /* @__PURE__ */ React73.createElement(
|
|
6257
6354
|
TextInput21,
|
|
6258
6355
|
{
|
|
6259
6356
|
label: "Token Contract Address",
|
|
@@ -6267,8 +6364,8 @@ var ManageCw20ActionForm = ({
|
|
|
6267
6364
|
};
|
|
6268
6365
|
|
|
6269
6366
|
// src/mantine/blocks/proposalActions/components/forms/ManageSubDaosActionForm.tsx
|
|
6270
|
-
import
|
|
6271
|
-
import { Stack as
|
|
6367
|
+
import React74, { useState as useState19 } from "react";
|
|
6368
|
+
import { Stack as Stack50, TextInput as TextInput22, Button as Button17, Group as Group22, Text as Text38, Card as Card16, Textarea as Textarea11 } from "@mantine/core";
|
|
6272
6369
|
var inputStyles15 = {
|
|
6273
6370
|
label: { color: "#adb5bd" },
|
|
6274
6371
|
input: {
|
|
@@ -6316,7 +6413,7 @@ var ManageSubDaosActionForm = ({
|
|
|
6316
6413
|
toRemove: (data.toRemove || []).filter((_, i) => i !== index)
|
|
6317
6414
|
});
|
|
6318
6415
|
};
|
|
6319
|
-
return /* @__PURE__ */
|
|
6416
|
+
return /* @__PURE__ */ React74.createElement(Stack50, { gap: "md" }, /* @__PURE__ */ React74.createElement(Stack50, { gap: "xs" }, /* @__PURE__ */ React74.createElement(Text38, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "SubDAOs to Add"), (data.toAdd || []).map((subDao, index) => /* @__PURE__ */ React74.createElement(
|
|
6320
6417
|
Card16,
|
|
6321
6418
|
{
|
|
6322
6419
|
key: index,
|
|
@@ -6324,7 +6421,7 @@ var ManageSubDaosActionForm = ({
|
|
|
6324
6421
|
padding: "xs",
|
|
6325
6422
|
style: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
6326
6423
|
},
|
|
6327
|
-
/* @__PURE__ */
|
|
6424
|
+
/* @__PURE__ */ React74.createElement(Stack50, { gap: "xs" }, /* @__PURE__ */ React74.createElement(Group22, { justify: "space-between" }, /* @__PURE__ */ React74.createElement(Text38, { size: "sm", style: { color: "#f1f3f5" } }, subDao.addr), /* @__PURE__ */ React74.createElement(
|
|
6328
6425
|
Button17,
|
|
6329
6426
|
{
|
|
6330
6427
|
size: "xs",
|
|
@@ -6333,8 +6430,8 @@ var ManageSubDaosActionForm = ({
|
|
|
6333
6430
|
style: { color: "#ff6b6b" }
|
|
6334
6431
|
},
|
|
6335
6432
|
"Remove"
|
|
6336
|
-
)), subDao.charter && /* @__PURE__ */
|
|
6337
|
-
)), /* @__PURE__ */
|
|
6433
|
+
)), subDao.charter && /* @__PURE__ */ React74.createElement(Text38, { size: "xs", style: { color: "#adb5bd" } }, "Charter: ", subDao.charter))
|
|
6434
|
+
)), /* @__PURE__ */ React74.createElement(Stack50, { gap: "xs" }, /* @__PURE__ */ React74.createElement(
|
|
6338
6435
|
TextInput22,
|
|
6339
6436
|
{
|
|
6340
6437
|
placeholder: "SubDAO Address",
|
|
@@ -6342,7 +6439,7 @@ var ManageSubDaosActionForm = ({
|
|
|
6342
6439
|
onChange: (e) => setNewSubDao({ ...newSubDao, addr: e.currentTarget.value }),
|
|
6343
6440
|
styles: inputStyles15
|
|
6344
6441
|
}
|
|
6345
|
-
), /* @__PURE__ */
|
|
6442
|
+
), /* @__PURE__ */ React74.createElement(
|
|
6346
6443
|
Textarea11,
|
|
6347
6444
|
{
|
|
6348
6445
|
placeholder: "Charter (optional)",
|
|
@@ -6351,7 +6448,7 @@ var ManageSubDaosActionForm = ({
|
|
|
6351
6448
|
minRows: 2,
|
|
6352
6449
|
styles: inputStyles15
|
|
6353
6450
|
}
|
|
6354
|
-
), /* @__PURE__ */
|
|
6451
|
+
), /* @__PURE__ */ React74.createElement(
|
|
6355
6452
|
Button17,
|
|
6356
6453
|
{
|
|
6357
6454
|
size: "sm",
|
|
@@ -6362,7 +6459,7 @@ var ManageSubDaosActionForm = ({
|
|
|
6362
6459
|
}
|
|
6363
6460
|
},
|
|
6364
6461
|
"Add SubDAO"
|
|
6365
|
-
))), /* @__PURE__ */
|
|
6462
|
+
))), /* @__PURE__ */ React74.createElement(Stack50, { gap: "xs" }, /* @__PURE__ */ React74.createElement(Text38, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "SubDAOs to Remove"), (data.toRemove || []).map((subDao, index) => /* @__PURE__ */ React74.createElement(
|
|
6366
6463
|
Card16,
|
|
6367
6464
|
{
|
|
6368
6465
|
key: index,
|
|
@@ -6370,7 +6467,7 @@ var ManageSubDaosActionForm = ({
|
|
|
6370
6467
|
padding: "xs",
|
|
6371
6468
|
style: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
6372
6469
|
},
|
|
6373
|
-
/* @__PURE__ */
|
|
6470
|
+
/* @__PURE__ */ React74.createElement(Group22, { justify: "space-between" }, /* @__PURE__ */ React74.createElement(Text38, { size: "sm", style: { color: "#f1f3f5" } }, subDao.address), /* @__PURE__ */ React74.createElement(
|
|
6374
6471
|
Button17,
|
|
6375
6472
|
{
|
|
6376
6473
|
size: "xs",
|
|
@@ -6380,7 +6477,7 @@ var ManageSubDaosActionForm = ({
|
|
|
6380
6477
|
},
|
|
6381
6478
|
"Remove"
|
|
6382
6479
|
))
|
|
6383
|
-
)), /* @__PURE__ */
|
|
6480
|
+
)), /* @__PURE__ */ React74.createElement(Group22, { grow: true }, /* @__PURE__ */ React74.createElement(
|
|
6384
6481
|
TextInput22,
|
|
6385
6482
|
{
|
|
6386
6483
|
placeholder: "SubDAO Address to Remove",
|
|
@@ -6388,7 +6485,7 @@ var ManageSubDaosActionForm = ({
|
|
|
6388
6485
|
onChange: (e) => setNewRemoveAddress(e.currentTarget.value),
|
|
6389
6486
|
styles: inputStyles15
|
|
6390
6487
|
}
|
|
6391
|
-
), /* @__PURE__ */
|
|
6488
|
+
), /* @__PURE__ */ React74.createElement(
|
|
6392
6489
|
Button17,
|
|
6393
6490
|
{
|
|
6394
6491
|
size: "sm",
|
|
@@ -6403,8 +6500,8 @@ var ManageSubDaosActionForm = ({
|
|
|
6403
6500
|
};
|
|
6404
6501
|
|
|
6405
6502
|
// src/mantine/blocks/proposalActions/components/forms/UpdateInfoActionForm.tsx
|
|
6406
|
-
import
|
|
6407
|
-
import { Stack as
|
|
6503
|
+
import React75 from "react";
|
|
6504
|
+
import { Stack as Stack51, TextInput as TextInput23, Textarea as Textarea12, Checkbox as Checkbox5 } from "@mantine/core";
|
|
6408
6505
|
var inputStyles16 = {
|
|
6409
6506
|
label: { color: "#adb5bd" },
|
|
6410
6507
|
input: {
|
|
@@ -6420,7 +6517,7 @@ var UpdateInfoActionForm = ({
|
|
|
6420
6517
|
data,
|
|
6421
6518
|
onChange
|
|
6422
6519
|
}) => {
|
|
6423
|
-
return /* @__PURE__ */
|
|
6520
|
+
return /* @__PURE__ */ React75.createElement(Stack51, { gap: "md" }, /* @__PURE__ */ React75.createElement(
|
|
6424
6521
|
TextInput23,
|
|
6425
6522
|
{
|
|
6426
6523
|
label: "DAO Name",
|
|
@@ -6430,7 +6527,7 @@ var UpdateInfoActionForm = ({
|
|
|
6430
6527
|
required: true,
|
|
6431
6528
|
styles: inputStyles16
|
|
6432
6529
|
}
|
|
6433
|
-
), /* @__PURE__ */
|
|
6530
|
+
), /* @__PURE__ */ React75.createElement(
|
|
6434
6531
|
Textarea12,
|
|
6435
6532
|
{
|
|
6436
6533
|
label: "Description",
|
|
@@ -6440,7 +6537,7 @@ var UpdateInfoActionForm = ({
|
|
|
6440
6537
|
minRows: 3,
|
|
6441
6538
|
styles: inputStyles16
|
|
6442
6539
|
}
|
|
6443
|
-
), /* @__PURE__ */
|
|
6540
|
+
), /* @__PURE__ */ React75.createElement(
|
|
6444
6541
|
TextInput23,
|
|
6445
6542
|
{
|
|
6446
6543
|
label: "Image URL (Optional)",
|
|
@@ -6449,7 +6546,7 @@ var UpdateInfoActionForm = ({
|
|
|
6449
6546
|
onChange: (e) => onChange({ ...data, image_url: e.currentTarget.value || null }),
|
|
6450
6547
|
styles: inputStyles16
|
|
6451
6548
|
}
|
|
6452
|
-
), /* @__PURE__ */
|
|
6549
|
+
), /* @__PURE__ */ React75.createElement(
|
|
6453
6550
|
TextInput23,
|
|
6454
6551
|
{
|
|
6455
6552
|
label: "DAO URI (Optional)",
|
|
@@ -6458,7 +6555,7 @@ var UpdateInfoActionForm = ({
|
|
|
6458
6555
|
onChange: (e) => onChange({ ...data, dao_uri: e.currentTarget.value || null }),
|
|
6459
6556
|
styles: inputStyles16
|
|
6460
6557
|
}
|
|
6461
|
-
), /* @__PURE__ */
|
|
6558
|
+
), /* @__PURE__ */ React75.createElement(
|
|
6462
6559
|
Checkbox5,
|
|
6463
6560
|
{
|
|
6464
6561
|
label: "Automatically add CW20 tokens",
|
|
@@ -6469,7 +6566,7 @@ var UpdateInfoActionForm = ({
|
|
|
6469
6566
|
input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
6470
6567
|
}
|
|
6471
6568
|
}
|
|
6472
|
-
), /* @__PURE__ */
|
|
6569
|
+
), /* @__PURE__ */ React75.createElement(
|
|
6473
6570
|
Checkbox5,
|
|
6474
6571
|
{
|
|
6475
6572
|
label: "Automatically add CW721 NFTs",
|
|
@@ -6484,8 +6581,8 @@ var UpdateInfoActionForm = ({
|
|
|
6484
6581
|
};
|
|
6485
6582
|
|
|
6486
6583
|
// src/mantine/blocks/proposalActions/components/forms/ManageStorageItemsActionForm.tsx
|
|
6487
|
-
import
|
|
6488
|
-
import { Stack as
|
|
6584
|
+
import React76 from "react";
|
|
6585
|
+
import { Stack as Stack52, TextInput as TextInput24, Radio as Radio3, Group as Group23, Textarea as Textarea13 } from "@mantine/core";
|
|
6489
6586
|
var inputStyles17 = {
|
|
6490
6587
|
label: { color: "#adb5bd" },
|
|
6491
6588
|
input: {
|
|
@@ -6501,14 +6598,14 @@ var ManageStorageItemsActionForm = ({
|
|
|
6501
6598
|
data,
|
|
6502
6599
|
onChange
|
|
6503
6600
|
}) => {
|
|
6504
|
-
return /* @__PURE__ */
|
|
6601
|
+
return /* @__PURE__ */ React76.createElement(Stack52, { gap: "md" }, /* @__PURE__ */ React76.createElement(
|
|
6505
6602
|
Radio3.Group,
|
|
6506
6603
|
{
|
|
6507
6604
|
label: "Action",
|
|
6508
6605
|
value: data.setting ? "set" : "remove",
|
|
6509
6606
|
onChange: (value) => onChange({ ...data, setting: value === "set" })
|
|
6510
6607
|
},
|
|
6511
|
-
/* @__PURE__ */
|
|
6608
|
+
/* @__PURE__ */ React76.createElement(Group23, { mt: "xs" }, /* @__PURE__ */ React76.createElement(
|
|
6512
6609
|
Radio3,
|
|
6513
6610
|
{
|
|
6514
6611
|
value: "set",
|
|
@@ -6518,7 +6615,7 @@ var ManageStorageItemsActionForm = ({
|
|
|
6518
6615
|
radio: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
6519
6616
|
}
|
|
6520
6617
|
}
|
|
6521
|
-
), /* @__PURE__ */
|
|
6618
|
+
), /* @__PURE__ */ React76.createElement(
|
|
6522
6619
|
Radio3,
|
|
6523
6620
|
{
|
|
6524
6621
|
value: "remove",
|
|
@@ -6529,7 +6626,7 @@ var ManageStorageItemsActionForm = ({
|
|
|
6529
6626
|
}
|
|
6530
6627
|
}
|
|
6531
6628
|
))
|
|
6532
|
-
), /* @__PURE__ */
|
|
6629
|
+
), /* @__PURE__ */ React76.createElement(
|
|
6533
6630
|
TextInput24,
|
|
6534
6631
|
{
|
|
6535
6632
|
label: "Storage Key",
|
|
@@ -6539,7 +6636,7 @@ var ManageStorageItemsActionForm = ({
|
|
|
6539
6636
|
required: true,
|
|
6540
6637
|
styles: inputStyles17
|
|
6541
6638
|
}
|
|
6542
|
-
), data.setting && /* @__PURE__ */
|
|
6639
|
+
), data.setting && /* @__PURE__ */ React76.createElement(
|
|
6543
6640
|
Textarea13,
|
|
6544
6641
|
{
|
|
6545
6642
|
label: "Storage Value",
|
|
@@ -6554,8 +6651,8 @@ var ManageStorageItemsActionForm = ({
|
|
|
6554
6651
|
};
|
|
6555
6652
|
|
|
6556
6653
|
// src/mantine/blocks/proposalActions/components/forms/DaoAdminExecActionForm.tsx
|
|
6557
|
-
import
|
|
6558
|
-
import { Stack as
|
|
6654
|
+
import React77, { useState as useState20 } from "react";
|
|
6655
|
+
import { Stack as Stack53, TextInput as TextInput25, Button as Button18, Group as Group24, Text as Text39, Card as Card17, Textarea as Textarea14 } from "@mantine/core";
|
|
6559
6656
|
var inputStyles18 = {
|
|
6560
6657
|
label: { color: "#adb5bd" },
|
|
6561
6658
|
input: {
|
|
@@ -6591,7 +6688,7 @@ var DaoAdminExecActionForm = ({
|
|
|
6591
6688
|
msgs: (data.msgs || []).filter((_, i) => i !== index)
|
|
6592
6689
|
});
|
|
6593
6690
|
};
|
|
6594
|
-
return /* @__PURE__ */
|
|
6691
|
+
return /* @__PURE__ */ React77.createElement(Stack53, { gap: "md" }, /* @__PURE__ */ React77.createElement(
|
|
6595
6692
|
TextInput25,
|
|
6596
6693
|
{
|
|
6597
6694
|
label: "Core Address",
|
|
@@ -6601,7 +6698,7 @@ var DaoAdminExecActionForm = ({
|
|
|
6601
6698
|
required: true,
|
|
6602
6699
|
styles: inputStyles18
|
|
6603
6700
|
}
|
|
6604
|
-
), /* @__PURE__ */
|
|
6701
|
+
), /* @__PURE__ */ React77.createElement(Stack53, { gap: "xs" }, /* @__PURE__ */ React77.createElement(Text39, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Messages to Execute"), (data.msgs || []).map((msg, index) => /* @__PURE__ */ React77.createElement(
|
|
6605
6702
|
Card17,
|
|
6606
6703
|
{
|
|
6607
6704
|
key: index,
|
|
@@ -6609,7 +6706,7 @@ var DaoAdminExecActionForm = ({
|
|
|
6609
6706
|
padding: "xs",
|
|
6610
6707
|
style: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
6611
6708
|
},
|
|
6612
|
-
/* @__PURE__ */
|
|
6709
|
+
/* @__PURE__ */ React77.createElement(Group24, { justify: "space-between" }, /* @__PURE__ */ React77.createElement(Text39, { size: "sm", style: { color: "#f1f3f5" } }, "Message ", index + 1), /* @__PURE__ */ React77.createElement(
|
|
6613
6710
|
Button18,
|
|
6614
6711
|
{
|
|
6615
6712
|
size: "xs",
|
|
@@ -6619,8 +6716,8 @@ var DaoAdminExecActionForm = ({
|
|
|
6619
6716
|
},
|
|
6620
6717
|
"Remove"
|
|
6621
6718
|
)),
|
|
6622
|
-
/* @__PURE__ */
|
|
6623
|
-
)), /* @__PURE__ */
|
|
6719
|
+
/* @__PURE__ */ React77.createElement(Text39, { size: "xs", style: { color: "#adb5bd", fontFamily: "monospace" } }, JSON.stringify(msg, null, 2).substring(0, 100), "...")
|
|
6720
|
+
)), /* @__PURE__ */ React77.createElement(
|
|
6624
6721
|
Textarea14,
|
|
6625
6722
|
{
|
|
6626
6723
|
placeholder: 'Add cosmos message as JSON:\\n{"bank": {"send": {"to_address": "ixo1...", "amount": [{"denom": "uixo", "amount": "1000"}]}}}',
|
|
@@ -6629,7 +6726,7 @@ var DaoAdminExecActionForm = ({
|
|
|
6629
6726
|
minRows: 4,
|
|
6630
6727
|
styles: inputStyles18
|
|
6631
6728
|
}
|
|
6632
|
-
), /* @__PURE__ */
|
|
6729
|
+
), /* @__PURE__ */ React77.createElement(
|
|
6633
6730
|
Button18,
|
|
6634
6731
|
{
|
|
6635
6732
|
size: "sm",
|
|
@@ -6644,8 +6741,8 @@ var DaoAdminExecActionForm = ({
|
|
|
6644
6741
|
};
|
|
6645
6742
|
|
|
6646
6743
|
// src/mantine/blocks/proposalActions/components/forms/AcceptToMarketplaceActionForm.tsx
|
|
6647
|
-
import
|
|
6648
|
-
import { Stack as
|
|
6744
|
+
import React78 from "react";
|
|
6745
|
+
import { Stack as Stack54, TextInput as TextInput26 } from "@mantine/core";
|
|
6649
6746
|
var inputStyles19 = {
|
|
6650
6747
|
label: { color: "#adb5bd" },
|
|
6651
6748
|
input: {
|
|
@@ -6661,7 +6758,7 @@ var AcceptToMarketplaceActionForm = ({
|
|
|
6661
6758
|
data,
|
|
6662
6759
|
onChange
|
|
6663
6760
|
}) => {
|
|
6664
|
-
return /* @__PURE__ */
|
|
6761
|
+
return /* @__PURE__ */ React78.createElement(Stack54, { gap: "md" }, /* @__PURE__ */ React78.createElement(
|
|
6665
6762
|
TextInput26,
|
|
6666
6763
|
{
|
|
6667
6764
|
label: "DID",
|
|
@@ -6671,7 +6768,7 @@ var AcceptToMarketplaceActionForm = ({
|
|
|
6671
6768
|
required: true,
|
|
6672
6769
|
styles: inputStyles19
|
|
6673
6770
|
}
|
|
6674
|
-
), /* @__PURE__ */
|
|
6771
|
+
), /* @__PURE__ */ React78.createElement(
|
|
6675
6772
|
TextInput26,
|
|
6676
6773
|
{
|
|
6677
6774
|
label: "Relayer Node DID",
|
|
@@ -6681,7 +6778,7 @@ var AcceptToMarketplaceActionForm = ({
|
|
|
6681
6778
|
required: true,
|
|
6682
6779
|
styles: inputStyles19
|
|
6683
6780
|
}
|
|
6684
|
-
), /* @__PURE__ */
|
|
6781
|
+
), /* @__PURE__ */ React78.createElement(
|
|
6685
6782
|
TextInput26,
|
|
6686
6783
|
{
|
|
6687
6784
|
label: "Relayer Node Address",
|
|
@@ -6695,8 +6792,8 @@ var AcceptToMarketplaceActionForm = ({
|
|
|
6695
6792
|
};
|
|
6696
6793
|
|
|
6697
6794
|
// src/mantine/blocks/proposalActions/components/forms/CreateEntityActionForm.tsx
|
|
6698
|
-
import
|
|
6699
|
-
import { Stack as
|
|
6795
|
+
import React79 from "react";
|
|
6796
|
+
import { Stack as Stack55, Textarea as Textarea15, Alert as Alert7, Text as Text40 } from "@mantine/core";
|
|
6700
6797
|
var inputStyles20 = {
|
|
6701
6798
|
label: { color: "#adb5bd" },
|
|
6702
6799
|
input: {
|
|
@@ -6716,7 +6813,7 @@ var CreateEntityActionForm = ({ data, onChange }) => {
|
|
|
6716
6813
|
} catch {
|
|
6717
6814
|
}
|
|
6718
6815
|
};
|
|
6719
|
-
return /* @__PURE__ */
|
|
6816
|
+
return /* @__PURE__ */ React79.createElement(Stack55, { gap: "md" }, /* @__PURE__ */ React79.createElement(Alert7, { color: "blue", style: { backgroundColor: "#2a2a2a", borderColor: "#4dabf7" } }, /* @__PURE__ */ React79.createElement(Text40, { size: "sm", style: { color: "#4dabf7" } }, "This is a complex entity creation action. Please provide the complete entity data as JSON.")), /* @__PURE__ */ React79.createElement(
|
|
6720
6817
|
Textarea15,
|
|
6721
6818
|
{
|
|
6722
6819
|
label: "Entity Data (JSON)",
|
|
@@ -6731,8 +6828,8 @@ var CreateEntityActionForm = ({ data, onChange }) => {
|
|
|
6731
6828
|
};
|
|
6732
6829
|
|
|
6733
6830
|
// src/mantine/blocks/proposalActions/components/forms/UpdateVotingConfigActionForm.tsx
|
|
6734
|
-
import
|
|
6735
|
-
import { Stack as
|
|
6831
|
+
import React80 from "react";
|
|
6832
|
+
import { Stack as Stack56, Checkbox as Checkbox6, Select as Select6, NumberInput as NumberInput7, Group as Group25 } from "@mantine/core";
|
|
6736
6833
|
var inputStyles21 = {
|
|
6737
6834
|
label: { color: "#adb5bd" },
|
|
6738
6835
|
input: {
|
|
@@ -6748,7 +6845,7 @@ var UpdateVotingConfigActionForm = ({
|
|
|
6748
6845
|
data,
|
|
6749
6846
|
onChange
|
|
6750
6847
|
}) => {
|
|
6751
|
-
return /* @__PURE__ */
|
|
6848
|
+
return /* @__PURE__ */ React80.createElement(Stack56, { gap: "md" }, /* @__PURE__ */ React80.createElement(
|
|
6752
6849
|
Checkbox6,
|
|
6753
6850
|
{
|
|
6754
6851
|
label: "Only members can execute",
|
|
@@ -6759,7 +6856,7 @@ var UpdateVotingConfigActionForm = ({
|
|
|
6759
6856
|
input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
6760
6857
|
}
|
|
6761
6858
|
}
|
|
6762
|
-
), /* @__PURE__ */
|
|
6859
|
+
), /* @__PURE__ */ React80.createElement(
|
|
6763
6860
|
Select6,
|
|
6764
6861
|
{
|
|
6765
6862
|
label: "Threshold Type",
|
|
@@ -6771,7 +6868,7 @@ var UpdateVotingConfigActionForm = ({
|
|
|
6771
6868
|
],
|
|
6772
6869
|
styles: inputStyles21
|
|
6773
6870
|
}
|
|
6774
|
-
), data.thresholdType === "%" && /* @__PURE__ */
|
|
6871
|
+
), data.thresholdType === "%" && /* @__PURE__ */ React80.createElement(
|
|
6775
6872
|
NumberInput7,
|
|
6776
6873
|
{
|
|
6777
6874
|
label: "Threshold Percentage",
|
|
@@ -6783,7 +6880,7 @@ var UpdateVotingConfigActionForm = ({
|
|
|
6783
6880
|
suffix: "%",
|
|
6784
6881
|
styles: inputStyles21
|
|
6785
6882
|
}
|
|
6786
|
-
), /* @__PURE__ */
|
|
6883
|
+
), /* @__PURE__ */ React80.createElement(
|
|
6787
6884
|
Checkbox6,
|
|
6788
6885
|
{
|
|
6789
6886
|
label: "Enable Quorum",
|
|
@@ -6794,7 +6891,7 @@ var UpdateVotingConfigActionForm = ({
|
|
|
6794
6891
|
input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
6795
6892
|
}
|
|
6796
6893
|
}
|
|
6797
|
-
), data.quorumEnabled && /* @__PURE__ */
|
|
6894
|
+
), data.quorumEnabled && /* @__PURE__ */ React80.createElement(React80.Fragment, null, /* @__PURE__ */ React80.createElement(
|
|
6798
6895
|
Select6,
|
|
6799
6896
|
{
|
|
6800
6897
|
label: "Quorum Type",
|
|
@@ -6806,7 +6903,7 @@ var UpdateVotingConfigActionForm = ({
|
|
|
6806
6903
|
],
|
|
6807
6904
|
styles: inputStyles21
|
|
6808
6905
|
}
|
|
6809
|
-
), data.quorumType === "%" && /* @__PURE__ */
|
|
6906
|
+
), data.quorumType === "%" && /* @__PURE__ */ React80.createElement(
|
|
6810
6907
|
NumberInput7,
|
|
6811
6908
|
{
|
|
6812
6909
|
label: "Quorum Percentage",
|
|
@@ -6818,7 +6915,7 @@ var UpdateVotingConfigActionForm = ({
|
|
|
6818
6915
|
suffix: "%",
|
|
6819
6916
|
styles: inputStyles21
|
|
6820
6917
|
}
|
|
6821
|
-
)), /* @__PURE__ */
|
|
6918
|
+
)), /* @__PURE__ */ React80.createElement(Group25, { grow: true }, /* @__PURE__ */ React80.createElement(
|
|
6822
6919
|
NumberInput7,
|
|
6823
6920
|
{
|
|
6824
6921
|
label: "Proposal Duration",
|
|
@@ -6828,7 +6925,7 @@ var UpdateVotingConfigActionForm = ({
|
|
|
6828
6925
|
min: 1,
|
|
6829
6926
|
styles: inputStyles21
|
|
6830
6927
|
}
|
|
6831
|
-
), /* @__PURE__ */
|
|
6928
|
+
), /* @__PURE__ */ React80.createElement(
|
|
6832
6929
|
Select6,
|
|
6833
6930
|
{
|
|
6834
6931
|
label: "Duration Units",
|
|
@@ -6842,7 +6939,7 @@ var UpdateVotingConfigActionForm = ({
|
|
|
6842
6939
|
],
|
|
6843
6940
|
styles: inputStyles21
|
|
6844
6941
|
}
|
|
6845
|
-
)), /* @__PURE__ */
|
|
6942
|
+
)), /* @__PURE__ */ React80.createElement(
|
|
6846
6943
|
Checkbox6,
|
|
6847
6944
|
{
|
|
6848
6945
|
label: "Allow revoting",
|
|
@@ -6857,8 +6954,8 @@ var UpdateVotingConfigActionForm = ({
|
|
|
6857
6954
|
};
|
|
6858
6955
|
|
|
6859
6956
|
// src/mantine/blocks/proposalActions/components/forms/UpdatePreProposeConfigActionForm.tsx
|
|
6860
|
-
import
|
|
6861
|
-
import { Stack as
|
|
6957
|
+
import React81 from "react";
|
|
6958
|
+
import { Stack as Stack57, Checkbox as Checkbox7, TextInput as TextInput27, Select as Select7, Textarea as Textarea16 } from "@mantine/core";
|
|
6862
6959
|
var inputStyles22 = {
|
|
6863
6960
|
label: { color: "#adb5bd" },
|
|
6864
6961
|
input: {
|
|
@@ -6871,7 +6968,7 @@ var inputStyles22 = {
|
|
|
6871
6968
|
}
|
|
6872
6969
|
};
|
|
6873
6970
|
var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
|
|
6874
|
-
return /* @__PURE__ */
|
|
6971
|
+
return /* @__PURE__ */ React81.createElement(Stack57, { gap: "md" }, /* @__PURE__ */ React81.createElement(
|
|
6875
6972
|
Checkbox7,
|
|
6876
6973
|
{
|
|
6877
6974
|
label: "Anyone can propose",
|
|
@@ -6882,7 +6979,7 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
|
|
|
6882
6979
|
input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
6883
6980
|
}
|
|
6884
6981
|
}
|
|
6885
|
-
), /* @__PURE__ */
|
|
6982
|
+
), /* @__PURE__ */ React81.createElement(
|
|
6886
6983
|
Checkbox7,
|
|
6887
6984
|
{
|
|
6888
6985
|
label: "Deposit required",
|
|
@@ -6893,7 +6990,7 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
|
|
|
6893
6990
|
input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
6894
6991
|
}
|
|
6895
6992
|
}
|
|
6896
|
-
), data.depositRequired && /* @__PURE__ */
|
|
6993
|
+
), data.depositRequired && /* @__PURE__ */ React81.createElement(React81.Fragment, null, /* @__PURE__ */ React81.createElement(
|
|
6897
6994
|
TextInput27,
|
|
6898
6995
|
{
|
|
6899
6996
|
label: "Deposit Amount",
|
|
@@ -6906,7 +7003,7 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
|
|
|
6906
7003
|
required: true,
|
|
6907
7004
|
styles: inputStyles22
|
|
6908
7005
|
}
|
|
6909
|
-
), /* @__PURE__ */
|
|
7006
|
+
), /* @__PURE__ */ React81.createElement(
|
|
6910
7007
|
Select7,
|
|
6911
7008
|
{
|
|
6912
7009
|
label: "Deposit Type",
|
|
@@ -6922,7 +7019,7 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
|
|
|
6922
7019
|
],
|
|
6923
7020
|
styles: inputStyles22
|
|
6924
7021
|
}
|
|
6925
|
-
), /* @__PURE__ */
|
|
7022
|
+
), /* @__PURE__ */ React81.createElement(
|
|
6926
7023
|
TextInput27,
|
|
6927
7024
|
{
|
|
6928
7025
|
label: "Token Denomination or Address",
|
|
@@ -6935,7 +7032,7 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
|
|
|
6935
7032
|
required: true,
|
|
6936
7033
|
styles: inputStyles22
|
|
6937
7034
|
}
|
|
6938
|
-
), /* @__PURE__ */
|
|
7035
|
+
), /* @__PURE__ */ React81.createElement(
|
|
6939
7036
|
TextInput27,
|
|
6940
7037
|
{
|
|
6941
7038
|
label: "Refund Policy",
|
|
@@ -6948,7 +7045,7 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
|
|
|
6948
7045
|
required: true,
|
|
6949
7046
|
styles: inputStyles22
|
|
6950
7047
|
}
|
|
6951
|
-
), data.depositInfo.type !== "native" && /* @__PURE__ */
|
|
7048
|
+
), data.depositInfo.type !== "native" && /* @__PURE__ */ React81.createElement(
|
|
6952
7049
|
Textarea16,
|
|
6953
7050
|
{
|
|
6954
7051
|
label: "Token Configuration (JSON)",
|
|
@@ -6971,8 +7068,8 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
|
|
|
6971
7068
|
};
|
|
6972
7069
|
|
|
6973
7070
|
// src/mantine/blocks/proposalActions/components/forms/GovernanceVoteActionForm.tsx
|
|
6974
|
-
import
|
|
6975
|
-
import { Stack as
|
|
7071
|
+
import React82 from "react";
|
|
7072
|
+
import { Stack as Stack58, TextInput as TextInput28, Select as Select8 } from "@mantine/core";
|
|
6976
7073
|
var inputStyles23 = {
|
|
6977
7074
|
label: { color: "#adb5bd" },
|
|
6978
7075
|
input: {
|
|
@@ -6994,7 +7091,7 @@ var GovernanceVoteActionForm = ({
|
|
|
6994
7091
|
{ value: "3", label: "No" },
|
|
6995
7092
|
{ value: "4", label: "No with Veto" }
|
|
6996
7093
|
];
|
|
6997
|
-
return /* @__PURE__ */
|
|
7094
|
+
return /* @__PURE__ */ React82.createElement(Stack58, { gap: "md" }, /* @__PURE__ */ React82.createElement(
|
|
6998
7095
|
TextInput28,
|
|
6999
7096
|
{
|
|
7000
7097
|
label: "Proposal ID",
|
|
@@ -7004,7 +7101,7 @@ var GovernanceVoteActionForm = ({
|
|
|
7004
7101
|
required: true,
|
|
7005
7102
|
styles: inputStyles23
|
|
7006
7103
|
}
|
|
7007
|
-
), /* @__PURE__ */
|
|
7104
|
+
), /* @__PURE__ */ React82.createElement(
|
|
7008
7105
|
Select8,
|
|
7009
7106
|
{
|
|
7010
7107
|
label: "Vote Option",
|
|
@@ -7018,8 +7115,8 @@ var GovernanceVoteActionForm = ({
|
|
|
7018
7115
|
};
|
|
7019
7116
|
|
|
7020
7117
|
// src/mantine/blocks/proposalActions/components/forms/WithdrawTokenSwapActionForm.tsx
|
|
7021
|
-
import
|
|
7022
|
-
import { Stack as
|
|
7118
|
+
import React83 from "react";
|
|
7119
|
+
import { Stack as Stack59, TextInput as TextInput29, Checkbox as Checkbox8 } from "@mantine/core";
|
|
7023
7120
|
var inputStyles24 = {
|
|
7024
7121
|
label: { color: "#adb5bd" },
|
|
7025
7122
|
input: {
|
|
@@ -7035,7 +7132,7 @@ var WithdrawTokenSwapActionForm = ({
|
|
|
7035
7132
|
data,
|
|
7036
7133
|
onChange
|
|
7037
7134
|
}) => {
|
|
7038
|
-
return /* @__PURE__ */
|
|
7135
|
+
return /* @__PURE__ */ React83.createElement(Stack59, { gap: "md" }, /* @__PURE__ */ React83.createElement(
|
|
7039
7136
|
Checkbox8,
|
|
7040
7137
|
{
|
|
7041
7138
|
label: "Contract chosen",
|
|
@@ -7046,7 +7143,7 @@ var WithdrawTokenSwapActionForm = ({
|
|
|
7046
7143
|
input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
7047
7144
|
}
|
|
7048
7145
|
}
|
|
7049
|
-
), data.contractChosen && /* @__PURE__ */
|
|
7146
|
+
), data.contractChosen && /* @__PURE__ */ React83.createElement(
|
|
7050
7147
|
TextInput29,
|
|
7051
7148
|
{
|
|
7052
7149
|
label: "Token Swap Contract Address",
|
|
@@ -7060,8 +7157,8 @@ var WithdrawTokenSwapActionForm = ({
|
|
|
7060
7157
|
};
|
|
7061
7158
|
|
|
7062
7159
|
// src/mantine/blocks/proposalActions/components/forms/PerformTokenSwapActionForm.tsx
|
|
7063
|
-
import
|
|
7064
|
-
import { Stack as
|
|
7160
|
+
import React84 from "react";
|
|
7161
|
+
import { Stack as Stack60, TextInput as TextInput30, Checkbox as Checkbox9, Textarea as Textarea17 } from "@mantine/core";
|
|
7065
7162
|
var inputStyles25 = {
|
|
7066
7163
|
label: { color: "#adb5bd" },
|
|
7067
7164
|
input: {
|
|
@@ -7077,7 +7174,7 @@ var PerformTokenSwapActionForm = ({
|
|
|
7077
7174
|
data,
|
|
7078
7175
|
onChange
|
|
7079
7176
|
}) => {
|
|
7080
|
-
return /* @__PURE__ */
|
|
7177
|
+
return /* @__PURE__ */ React84.createElement(Stack60, { gap: "md" }, /* @__PURE__ */ React84.createElement(
|
|
7081
7178
|
Checkbox9,
|
|
7082
7179
|
{
|
|
7083
7180
|
label: "Contract chosen",
|
|
@@ -7088,7 +7185,7 @@ var PerformTokenSwapActionForm = ({
|
|
|
7088
7185
|
input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
7089
7186
|
}
|
|
7090
7187
|
}
|
|
7091
|
-
), data.contractChosen && /* @__PURE__ */
|
|
7188
|
+
), data.contractChosen && /* @__PURE__ */ React84.createElement(React84.Fragment, null, /* @__PURE__ */ React84.createElement(
|
|
7092
7189
|
TextInput30,
|
|
7093
7190
|
{
|
|
7094
7191
|
label: "Token Swap Contract Address",
|
|
@@ -7098,7 +7195,7 @@ var PerformTokenSwapActionForm = ({
|
|
|
7098
7195
|
required: true,
|
|
7099
7196
|
styles: inputStyles25
|
|
7100
7197
|
}
|
|
7101
|
-
), /* @__PURE__ */
|
|
7198
|
+
), /* @__PURE__ */ React84.createElement(
|
|
7102
7199
|
Textarea17,
|
|
7103
7200
|
{
|
|
7104
7201
|
label: "Self Party Information (JSON)",
|
|
@@ -7114,7 +7211,7 @@ var PerformTokenSwapActionForm = ({
|
|
|
7114
7211
|
minRows: 4,
|
|
7115
7212
|
styles: inputStyles25
|
|
7116
7213
|
}
|
|
7117
|
-
), /* @__PURE__ */
|
|
7214
|
+
), /* @__PURE__ */ React84.createElement(
|
|
7118
7215
|
Textarea17,
|
|
7119
7216
|
{
|
|
7120
7217
|
label: "Counterparty Information (JSON)",
|
|
@@ -7134,8 +7231,8 @@ var PerformTokenSwapActionForm = ({
|
|
|
7134
7231
|
};
|
|
7135
7232
|
|
|
7136
7233
|
// src/mantine/blocks/proposalActions/components/forms/StakeToGroupActionForm.tsx
|
|
7137
|
-
import
|
|
7138
|
-
import { Stack as
|
|
7234
|
+
import React85 from "react";
|
|
7235
|
+
import { Stack as Stack61, TextInput as TextInput31 } from "@mantine/core";
|
|
7139
7236
|
var inputStyles26 = {
|
|
7140
7237
|
label: { color: "#adb5bd" },
|
|
7141
7238
|
input: {
|
|
@@ -7151,7 +7248,7 @@ var StakeToGroupActionForm = ({
|
|
|
7151
7248
|
data,
|
|
7152
7249
|
onChange
|
|
7153
7250
|
}) => {
|
|
7154
|
-
return /* @__PURE__ */
|
|
7251
|
+
return /* @__PURE__ */ React85.createElement(Stack61, { gap: "md" }, /* @__PURE__ */ React85.createElement(
|
|
7155
7252
|
TextInput31,
|
|
7156
7253
|
{
|
|
7157
7254
|
label: "Token Contract Address",
|
|
@@ -7161,7 +7258,7 @@ var StakeToGroupActionForm = ({
|
|
|
7161
7258
|
required: true,
|
|
7162
7259
|
styles: inputStyles26
|
|
7163
7260
|
}
|
|
7164
|
-
), /* @__PURE__ */
|
|
7261
|
+
), /* @__PURE__ */ React85.createElement(
|
|
7165
7262
|
TextInput31,
|
|
7166
7263
|
{
|
|
7167
7264
|
label: "Staking Contract Address",
|
|
@@ -7171,7 +7268,7 @@ var StakeToGroupActionForm = ({
|
|
|
7171
7268
|
required: true,
|
|
7172
7269
|
styles: inputStyles26
|
|
7173
7270
|
}
|
|
7174
|
-
), /* @__PURE__ */
|
|
7271
|
+
), /* @__PURE__ */ React85.createElement(
|
|
7175
7272
|
TextInput31,
|
|
7176
7273
|
{
|
|
7177
7274
|
label: "Amount",
|
|
@@ -7185,8 +7282,8 @@ var StakeToGroupActionForm = ({
|
|
|
7185
7282
|
};
|
|
7186
7283
|
|
|
7187
7284
|
// src/mantine/blocks/proposalActions/components/forms/SendGroupTokenActionForm.tsx
|
|
7188
|
-
import
|
|
7189
|
-
import { Stack as
|
|
7285
|
+
import React86 from "react";
|
|
7286
|
+
import { Stack as Stack62, TextInput as TextInput32 } from "@mantine/core";
|
|
7190
7287
|
var inputStyles27 = {
|
|
7191
7288
|
label: { color: "#adb5bd" },
|
|
7192
7289
|
input: {
|
|
@@ -7202,7 +7299,7 @@ var SendGroupTokenActionForm = ({
|
|
|
7202
7299
|
data,
|
|
7203
7300
|
onChange
|
|
7204
7301
|
}) => {
|
|
7205
|
-
return /* @__PURE__ */
|
|
7302
|
+
return /* @__PURE__ */ React86.createElement(Stack62, { gap: "md" }, /* @__PURE__ */ React86.createElement(
|
|
7206
7303
|
TextInput32,
|
|
7207
7304
|
{
|
|
7208
7305
|
label: "Contract Address",
|
|
@@ -7212,7 +7309,7 @@ var SendGroupTokenActionForm = ({
|
|
|
7212
7309
|
required: true,
|
|
7213
7310
|
styles: inputStyles27
|
|
7214
7311
|
}
|
|
7215
|
-
), /* @__PURE__ */
|
|
7312
|
+
), /* @__PURE__ */ React86.createElement(
|
|
7216
7313
|
TextInput32,
|
|
7217
7314
|
{
|
|
7218
7315
|
label: "Recipient Address",
|
|
@@ -7222,7 +7319,7 @@ var SendGroupTokenActionForm = ({
|
|
|
7222
7319
|
required: true,
|
|
7223
7320
|
styles: inputStyles27
|
|
7224
7321
|
}
|
|
7225
|
-
), /* @__PURE__ */
|
|
7322
|
+
), /* @__PURE__ */ React86.createElement(
|
|
7226
7323
|
TextInput32,
|
|
7227
7324
|
{
|
|
7228
7325
|
label: "Amount",
|
|
@@ -7236,8 +7333,8 @@ var SendGroupTokenActionForm = ({
|
|
|
7236
7333
|
};
|
|
7237
7334
|
|
|
7238
7335
|
// src/mantine/blocks/proposalActions/components/forms/ValidatorActionsActionForm.tsx
|
|
7239
|
-
import
|
|
7240
|
-
import { Stack as
|
|
7336
|
+
import React87 from "react";
|
|
7337
|
+
import { Stack as Stack63, Select as Select9, Textarea as Textarea18 } from "@mantine/core";
|
|
7241
7338
|
var inputStyles28 = {
|
|
7242
7339
|
label: { color: "#adb5bd" },
|
|
7243
7340
|
input: {
|
|
@@ -7259,7 +7356,7 @@ var ValidatorActionsActionForm = ({
|
|
|
7259
7356
|
{ value: "/cosmos.slashing.v1beta1.MsgUnjail" /* UnjailValidator */, label: "Unjail Validator" },
|
|
7260
7357
|
{ value: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission" /* WithdrawValidatorCommission */, label: "Withdraw Commission" }
|
|
7261
7358
|
];
|
|
7262
|
-
return /* @__PURE__ */
|
|
7359
|
+
return /* @__PURE__ */ React87.createElement(Stack63, { gap: "md" }, /* @__PURE__ */ React87.createElement(
|
|
7263
7360
|
Select9,
|
|
7264
7361
|
{
|
|
7265
7362
|
label: "Validator Action Type",
|
|
@@ -7269,7 +7366,7 @@ var ValidatorActionsActionForm = ({
|
|
|
7269
7366
|
required: true,
|
|
7270
7367
|
styles: inputStyles28
|
|
7271
7368
|
}
|
|
7272
|
-
), data.validatorActionType === "/cosmos.staking.v1beta1.MsgCreateValidator" /* CreateValidator */ && /* @__PURE__ */
|
|
7369
|
+
), data.validatorActionType === "/cosmos.staking.v1beta1.MsgCreateValidator" /* CreateValidator */ && /* @__PURE__ */ React87.createElement(
|
|
7273
7370
|
Textarea18,
|
|
7274
7371
|
{
|
|
7275
7372
|
label: "Create Validator Message (JSON)",
|
|
@@ -7280,7 +7377,7 @@ var ValidatorActionsActionForm = ({
|
|
|
7280
7377
|
required: true,
|
|
7281
7378
|
styles: inputStyles28
|
|
7282
7379
|
}
|
|
7283
|
-
), data.validatorActionType === "/cosmos.staking.v1beta1.MsgEditValidator" /* EditValidator */ && /* @__PURE__ */
|
|
7380
|
+
), data.validatorActionType === "/cosmos.staking.v1beta1.MsgEditValidator" /* EditValidator */ && /* @__PURE__ */ React87.createElement(
|
|
7284
7381
|
Textarea18,
|
|
7285
7382
|
{
|
|
7286
7383
|
label: "Edit Validator Message (JSON)",
|
|
@@ -7937,28 +8034,28 @@ var actionRegistry = /* @__PURE__ */ new Map([
|
|
|
7937
8034
|
]);
|
|
7938
8035
|
|
|
7939
8036
|
// src/mantine/blocks/enumChecklist/EnumChecklistBlock.tsx
|
|
7940
|
-
import
|
|
8037
|
+
import React94, { useState as useState23, useEffect as useEffect14, useMemo as useMemo16, useCallback as useCallback14 } from "react";
|
|
7941
8038
|
import { createReactBlockSpec as createReactBlockSpec7 } from "@blocknote/react";
|
|
7942
|
-
import { Stack as
|
|
8039
|
+
import { Stack as Stack69, Text as Text46, Button as Button23, ActionIcon as ActionIcon10, Center as Center3, Flex as Flex16 } from "@mantine/core";
|
|
7943
8040
|
|
|
7944
8041
|
// src/mantine/blocks/enumChecklist/oracle_personalities/index.tsx
|
|
7945
|
-
import
|
|
7946
|
-
import { Box as
|
|
8042
|
+
import React89 from "react";
|
|
8043
|
+
import { Box as Box18, Flex as Flex15, Stack as Stack65, Text as Text42, Image as Image11 } from "@mantine/core";
|
|
7947
8044
|
function OraclePersonalitiesEnumList({ selectionMode, isItemChecked, onItemCheck, items }) {
|
|
7948
8045
|
if (!items || items.length === 0) {
|
|
7949
|
-
return /* @__PURE__ */
|
|
8046
|
+
return /* @__PURE__ */ React89.createElement(Text42, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No assets found");
|
|
7950
8047
|
}
|
|
7951
|
-
const rows = items.map(({ id, name, description, voice, icon }) => /* @__PURE__ */
|
|
7952
|
-
return /* @__PURE__ */
|
|
8048
|
+
const rows = items.map(({ id, name, description, voice, icon }) => /* @__PURE__ */ React89.createElement(ListItemContainer, { key: id }, /* @__PURE__ */ React89.createElement(Flex15, { align: "center", gap: "sm" }, /* @__PURE__ */ React89.createElement(Image11, { radius: 16, w: 62, h: 62, src: icon, alt: name }), /* @__PURE__ */ React89.createElement(Stack65, { gap: 0 }, /* @__PURE__ */ React89.createElement(Text42, { size: "sm", fw: 500 }, name || "-"), description !== void 0 && /* @__PURE__ */ React89.createElement(Text42, { size: "sm", c: "dimmed" }, description))), /* @__PURE__ */ React89.createElement(Flex15, { align: "center", gap: "md" }, /* @__PURE__ */ React89.createElement(Stack65, { ta: "right", gap: 0 }, /* @__PURE__ */ React89.createElement(Text42, { size: "sm", fw: 500 }, "Voice"), /* @__PURE__ */ React89.createElement(Text42, { size: "sm", c: "dimmed" }, voice)), selectionMode && /* @__PURE__ */ React89.createElement(ListItemCheckbox, { ariaLabel: `Select oracle ${name}`, checked: isItemChecked?.(id), onCheck: (checked) => onItemCheck?.(id, checked) }))));
|
|
8049
|
+
return /* @__PURE__ */ React89.createElement(Box18, { flex: 1 }, /* @__PURE__ */ React89.createElement(Stack65, null, rows));
|
|
7953
8050
|
}
|
|
7954
8051
|
|
|
7955
8052
|
// src/mantine/blocks/enumChecklist/EnumChecklistConfigModal.tsx
|
|
7956
|
-
import
|
|
7957
|
-
import { Modal as Modal2, Group as Group30, Box as
|
|
8053
|
+
import React93, { useState as useState22 } from "react";
|
|
8054
|
+
import { Modal as Modal2, Group as Group30, Box as Box20 } from "@mantine/core";
|
|
7958
8055
|
|
|
7959
8056
|
// src/mantine/blocks/enumChecklist/EnumChecklistTypeSelection.tsx
|
|
7960
|
-
import
|
|
7961
|
-
import { Stack as
|
|
8057
|
+
import React90 from "react";
|
|
8058
|
+
import { Stack as Stack66, Card as Card19, Group as Group27, Text as Text43, Box as Box19, Button as Button20 } from "@mantine/core";
|
|
7962
8059
|
|
|
7963
8060
|
// src/mantine/blocks/enumChecklist/oracle_personalities/config.ts
|
|
7964
8061
|
var oraclePersonalitiesMetadata = {
|
|
@@ -8087,7 +8184,7 @@ function getEnumListItems(type) {
|
|
|
8087
8184
|
// src/mantine/blocks/enumChecklist/EnumChecklistTypeSelection.tsx
|
|
8088
8185
|
var EnumChecklistTypeSelection = ({ selectedType, onTypeSelect, onNext }) => {
|
|
8089
8186
|
const enumListsMeta = getEnumListTypesMetadata();
|
|
8090
|
-
return /* @__PURE__ */
|
|
8187
|
+
return /* @__PURE__ */ React90.createElement(Stack66, { gap: "md" }, /* @__PURE__ */ React90.createElement("div", null, /* @__PURE__ */ React90.createElement(Text43, { size: "lg", fw: 600, mb: "xs" }, "Choose List Type"), /* @__PURE__ */ React90.createElement(Text43, { size: "sm", c: "dimmed" }, "Select the type of list you want to create")), /* @__PURE__ */ React90.createElement(Stack66, { gap: "sm" }, enumListsMeta.map((enumChecklistMeta) => /* @__PURE__ */ React90.createElement(
|
|
8091
8188
|
Card19,
|
|
8092
8189
|
{
|
|
8093
8190
|
key: enumChecklistMeta.id,
|
|
@@ -8100,8 +8197,8 @@ var EnumChecklistTypeSelection = ({ selectedType, onTypeSelect, onNext }) => {
|
|
|
8100
8197
|
},
|
|
8101
8198
|
onClick: () => onTypeSelect(enumChecklistMeta.id)
|
|
8102
8199
|
},
|
|
8103
|
-
/* @__PURE__ */
|
|
8104
|
-
|
|
8200
|
+
/* @__PURE__ */ React90.createElement(Group27, { gap: "md", align: "flex-start" }, /* @__PURE__ */ React90.createElement(
|
|
8201
|
+
Box19,
|
|
8105
8202
|
{
|
|
8106
8203
|
style: {
|
|
8107
8204
|
width: 48,
|
|
@@ -8116,35 +8213,35 @@ var EnumChecklistTypeSelection = ({ selectedType, onTypeSelect, onNext }) => {
|
|
|
8116
8213
|
}
|
|
8117
8214
|
},
|
|
8118
8215
|
enumChecklistMeta.icon
|
|
8119
|
-
), /* @__PURE__ */
|
|
8120
|
-
))), /* @__PURE__ */
|
|
8216
|
+
), /* @__PURE__ */ React90.createElement(Stack66, { gap: 2, style: { flex: 1 } }, /* @__PURE__ */ React90.createElement(Text43, { size: "md", fw: 600 }, enumChecklistMeta.name), /* @__PURE__ */ React90.createElement(Text43, { size: "sm", c: "dimmed" }, enumChecklistMeta.description)))
|
|
8217
|
+
))), /* @__PURE__ */ React90.createElement(Group27, { justify: "flex-end", mt: "md" }, /* @__PURE__ */ React90.createElement(Button20, { onClick: onNext, disabled: !selectedType }, "Next")));
|
|
8121
8218
|
};
|
|
8122
8219
|
|
|
8123
8220
|
// src/mantine/blocks/enumChecklist/EnumChecklistPreviewStep.tsx
|
|
8124
|
-
import
|
|
8125
|
-
import { Stack as
|
|
8221
|
+
import React91 from "react";
|
|
8222
|
+
import { Stack as Stack67, Text as Text44, Button as Button21, Group as Group28 } from "@mantine/core";
|
|
8126
8223
|
var EnumChecklistPreviewStep = ({ listType, onAddToBlock, onPrev }) => {
|
|
8127
8224
|
const renderListComponent = () => {
|
|
8128
8225
|
switch (listType) {
|
|
8129
8226
|
case "oracle_personalities":
|
|
8130
|
-
return /* @__PURE__ */
|
|
8227
|
+
return /* @__PURE__ */ React91.createElement(OraclePersonalitiesEnumList, { items: getEnumListItems(listType) });
|
|
8131
8228
|
default:
|
|
8132
8229
|
return null;
|
|
8133
8230
|
}
|
|
8134
8231
|
};
|
|
8135
|
-
return /* @__PURE__ */
|
|
8232
|
+
return /* @__PURE__ */ React91.createElement(Stack67, { gap: "md" }, /* @__PURE__ */ React91.createElement("div", null, /* @__PURE__ */ React91.createElement(Text44, { size: "lg", fw: 600, mb: "xs" }, "Preview ", getEnumListNameByType(listType)), /* @__PURE__ */ React91.createElement(Text44, { size: "sm", c: "dimmed" }, "Preview how your list will look with the current configuration")), /* @__PURE__ */ React91.createElement("div", { style: { maxHeight: "400px", overflow: "auto" } }, renderListComponent()), /* @__PURE__ */ React91.createElement(Group28, { justify: "space-between", mt: "md" }, /* @__PURE__ */ React91.createElement(Button21, { variant: "subtle", onClick: onPrev }, "Previous"), /* @__PURE__ */ React91.createElement(Button21, { onClick: onAddToBlock }, "Add to Block")));
|
|
8136
8233
|
};
|
|
8137
8234
|
|
|
8138
8235
|
// src/mantine/blocks/enumChecklist/EnumChecklistConfigurationStep.tsx
|
|
8139
|
-
import
|
|
8140
|
-
import { Stack as
|
|
8236
|
+
import React92 from "react";
|
|
8237
|
+
import { Stack as Stack68, TextInput as TextInput33, Text as Text45, Button as Button22, Group as Group29, Switch as Switch4, Select as Select11 } from "@mantine/core";
|
|
8141
8238
|
var EnumChecklistConfigurationStep = ({ enumChecklistType: listType, config, onConfigChange, onPrev, onNext, isValid }) => {
|
|
8142
8239
|
const typeConfig = ENUM_LIST_CONFIG[listType];
|
|
8143
8240
|
const configFields = getEnumListTypesConfigFields(listType);
|
|
8144
8241
|
const renderListConfigField = (field) => {
|
|
8145
8242
|
switch (field.type) {
|
|
8146
8243
|
case "text":
|
|
8147
|
-
return /* @__PURE__ */
|
|
8244
|
+
return /* @__PURE__ */ React92.createElement(
|
|
8148
8245
|
TextInput33,
|
|
8149
8246
|
{
|
|
8150
8247
|
label: field.label,
|
|
@@ -8156,7 +8253,7 @@ var EnumChecklistConfigurationStep = ({ enumChecklistType: listType, config, onC
|
|
|
8156
8253
|
}
|
|
8157
8254
|
);
|
|
8158
8255
|
case "switch":
|
|
8159
|
-
return /* @__PURE__ */
|
|
8256
|
+
return /* @__PURE__ */ React92.createElement(
|
|
8160
8257
|
Switch4,
|
|
8161
8258
|
{
|
|
8162
8259
|
label: field.label,
|
|
@@ -8166,7 +8263,7 @@ var EnumChecklistConfigurationStep = ({ enumChecklistType: listType, config, onC
|
|
|
8166
8263
|
}
|
|
8167
8264
|
);
|
|
8168
8265
|
case "select":
|
|
8169
|
-
return /* @__PURE__ */
|
|
8266
|
+
return /* @__PURE__ */ React92.createElement(
|
|
8170
8267
|
Select11,
|
|
8171
8268
|
{
|
|
8172
8269
|
label: field.label,
|
|
@@ -8179,7 +8276,7 @@ var EnumChecklistConfigurationStep = ({ enumChecklistType: listType, config, onC
|
|
|
8179
8276
|
}
|
|
8180
8277
|
);
|
|
8181
8278
|
default:
|
|
8182
|
-
return /* @__PURE__ */
|
|
8279
|
+
return /* @__PURE__ */ React92.createElement(
|
|
8183
8280
|
TextInput33,
|
|
8184
8281
|
{
|
|
8185
8282
|
label: field.label,
|
|
@@ -8192,7 +8289,7 @@ var EnumChecklistConfigurationStep = ({ enumChecklistType: listType, config, onC
|
|
|
8192
8289
|
);
|
|
8193
8290
|
}
|
|
8194
8291
|
};
|
|
8195
|
-
return /* @__PURE__ */
|
|
8292
|
+
return /* @__PURE__ */ React92.createElement(Stack68, { gap: "md" }, /* @__PURE__ */ React92.createElement("div", null, /* @__PURE__ */ React92.createElement(Text45, { size: "lg", fw: 600, mb: "xs" }, "Configure ", typeConfig.metadata.name), /* @__PURE__ */ React92.createElement(Text45, { size: "sm", c: "dimmed" }, typeConfig.metadata.description)), /* @__PURE__ */ React92.createElement(Stack68, { gap: "sm" }, configFields.map((field) => /* @__PURE__ */ React92.createElement("div", { key: field.key }, renderListConfigField(field)))), /* @__PURE__ */ React92.createElement(Group29, { justify: "space-between", mt: "md" }, /* @__PURE__ */ React92.createElement(Button22, { variant: "subtle", onClick: onPrev }, "Previous"), /* @__PURE__ */ React92.createElement(Button22, { onClick: onNext, disabled: !isValid }, "Next")));
|
|
8196
8293
|
};
|
|
8197
8294
|
|
|
8198
8295
|
// src/mantine/blocks/enumChecklist/EnumChecklistConfigModal.tsx
|
|
@@ -8254,9 +8351,9 @@ var EnumChecklistConfigModal = ({ opened, onClose, onSave, initialConfig }) => {
|
|
|
8254
8351
|
const renderStepContent = () => {
|
|
8255
8352
|
switch (activeStep) {
|
|
8256
8353
|
case "type":
|
|
8257
|
-
return /* @__PURE__ */
|
|
8354
|
+
return /* @__PURE__ */ React93.createElement(EnumChecklistTypeSelection, { selectedType, onTypeSelect: handleTypeSelect, onNext: () => setActiveStep("configure") });
|
|
8258
8355
|
case "configure":
|
|
8259
|
-
return selectedType ? /* @__PURE__ */
|
|
8356
|
+
return selectedType ? /* @__PURE__ */ React93.createElement(
|
|
8260
8357
|
EnumChecklistConfigurationStep,
|
|
8261
8358
|
{
|
|
8262
8359
|
enumChecklistType: selectedType,
|
|
@@ -8268,16 +8365,16 @@ var EnumChecklistConfigModal = ({ opened, onClose, onSave, initialConfig }) => {
|
|
|
8268
8365
|
}
|
|
8269
8366
|
) : null;
|
|
8270
8367
|
case "preview":
|
|
8271
|
-
return selectedType ? /* @__PURE__ */
|
|
8368
|
+
return selectedType ? /* @__PURE__ */ React93.createElement(EnumChecklistPreviewStep, { listType: selectedType, onAddToBlock: handleAddToBlock, onPrev: () => setActiveStep("configure") }) : null;
|
|
8272
8369
|
default:
|
|
8273
8370
|
return null;
|
|
8274
8371
|
}
|
|
8275
8372
|
};
|
|
8276
|
-
return /* @__PURE__ */
|
|
8373
|
+
return /* @__PURE__ */ React93.createElement(Modal2, { opened, onClose: handleClose, title: "Configure Enum Checklist Block", size: "xl" }, /* @__PURE__ */ React93.createElement(Group30, { align: "flex-start", gap: "lg", style: { minHeight: "400px" } }, /* @__PURE__ */ React93.createElement(Box20, { style: { width: "200px", flexShrink: 0, height: "400px", display: "flex" } }, /* @__PURE__ */ React93.createElement(ModalNavigation, { steps, activeStep, onStepChange: setActiveStep, showUpdateButton: selectedType !== null, onUpdateBlock: handleAddToBlock })), /* @__PURE__ */ React93.createElement(Box20, { style: { flex: 1 } }, renderStepContent())));
|
|
8277
8374
|
};
|
|
8278
8375
|
|
|
8279
8376
|
// src/mantine/blocks/enumChecklist/EnumChecklistBlock.tsx
|
|
8280
|
-
var IconSettings2 = () => /* @__PURE__ */
|
|
8377
|
+
var IconSettings2 = () => /* @__PURE__ */ React94.createElement("span", null, "\u2699\uFE0F");
|
|
8281
8378
|
var EnumChecklistBlockType = "enumChecklist";
|
|
8282
8379
|
var EnumChecklistBlockContent = ({ block, editor }) => {
|
|
8283
8380
|
const [modalOpened, setModalOpened] = useState23(false);
|
|
@@ -8363,7 +8460,7 @@ var EnumChecklistBlockContent = ({ block, editor }) => {
|
|
|
8363
8460
|
if (!listType) return null;
|
|
8364
8461
|
switch (listType) {
|
|
8365
8462
|
case "oracle_personalities":
|
|
8366
|
-
return /* @__PURE__ */
|
|
8463
|
+
return /* @__PURE__ */ React94.createElement(
|
|
8367
8464
|
OraclePersonalitiesEnumList,
|
|
8368
8465
|
{
|
|
8369
8466
|
items: getEnumListItems(listType),
|
|
@@ -8376,7 +8473,7 @@ var EnumChecklistBlockContent = ({ block, editor }) => {
|
|
|
8376
8473
|
return null;
|
|
8377
8474
|
}
|
|
8378
8475
|
};
|
|
8379
|
-
return /* @__PURE__ */
|
|
8476
|
+
return /* @__PURE__ */ React94.createElement(Stack69, { w: "100%" }, listType && /* @__PURE__ */ React94.createElement(Flex16, { align: "center", justify: "space-between", gap: "xs" }, /* @__PURE__ */ React94.createElement(Text46, null, getEnumListNameByType(listType)), listConfig.listSelectionMode && /* @__PURE__ */ React94.createElement(Text46, { lh: 0.5, c: "dimmed" }, listConfig?.selection_mode === "single" ? "Single Selection" : "Multi Selection"), editable && /* @__PURE__ */ React94.createElement(Flex16, { justify: listType ? "space-between" : "flex-end" }, /* @__PURE__ */ React94.createElement(Flex16, { gap: "xs" }, /* @__PURE__ */ React94.createElement(ActionIcon10, { variant: "subtle", size: "sm", onClick: () => setModalOpened(true) }, /* @__PURE__ */ React94.createElement(IconSettings2, null))))), /* @__PURE__ */ React94.createElement(Flex16, { flex: 1 }, !listType ? /* @__PURE__ */ React94.createElement(Center3, { py: "xl" }, /* @__PURE__ */ React94.createElement(Stack69, { align: "center", gap: "sm" }, /* @__PURE__ */ React94.createElement(Text46, { size: "sm", c: "dimmed", ta: "center" }, "No list type configured"), /* @__PURE__ */ React94.createElement(Button23, { size: "sm", variant: "light", onClick: () => setModalOpened(true) }, "Configure List"))) : /* @__PURE__ */ React94.createElement(Stack69, { gap: "md", flex: 1 }, renderListComponent())), /* @__PURE__ */ React94.createElement(
|
|
8380
8477
|
EnumChecklistConfigModal,
|
|
8381
8478
|
{
|
|
8382
8479
|
opened: modalOpened,
|
|
@@ -8408,7 +8505,7 @@ var EnumChecklistBlock = createReactBlockSpec7(
|
|
|
8408
8505
|
content: "none"
|
|
8409
8506
|
},
|
|
8410
8507
|
{
|
|
8411
|
-
render: (props) => /* @__PURE__ */
|
|
8508
|
+
render: (props) => /* @__PURE__ */ React94.createElement(EnumChecklistBlockContent, { ...props })
|
|
8412
8509
|
}
|
|
8413
8510
|
);
|
|
8414
8511
|
|
|
@@ -9048,19 +9145,19 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
9048
9145
|
}
|
|
9049
9146
|
|
|
9050
9147
|
// src/mantine/IxoEditor.tsx
|
|
9051
|
-
import
|
|
9148
|
+
import React96 from "react";
|
|
9052
9149
|
import { getDefaultReactSlashMenuItems, SuggestionMenuController } from "@blocknote/react";
|
|
9053
9150
|
import { BlockNoteView } from "@blocknote/mantine";
|
|
9054
9151
|
import { filterSuggestionItems } from "@blocknote/core";
|
|
9055
9152
|
import { MantineProvider } from "@mantine/core";
|
|
9056
9153
|
|
|
9057
9154
|
// src/mantine/components/PanelContent.tsx
|
|
9058
|
-
import
|
|
9155
|
+
import React95 from "react";
|
|
9059
9156
|
function PanelContent() {
|
|
9060
9157
|
const { activePanel, registeredPanels } = usePanelStore();
|
|
9061
9158
|
const isOpen = activePanel !== null;
|
|
9062
9159
|
const content = activePanel ? registeredPanels.get(activePanel) : null;
|
|
9063
|
-
return /* @__PURE__ */
|
|
9160
|
+
return /* @__PURE__ */ React95.createElement(
|
|
9064
9161
|
"div",
|
|
9065
9162
|
{
|
|
9066
9163
|
style: {
|
|
@@ -9084,13 +9181,13 @@ function IxoEditorContent({
|
|
|
9084
9181
|
onSelectionChange,
|
|
9085
9182
|
children
|
|
9086
9183
|
}) {
|
|
9087
|
-
return /* @__PURE__ */
|
|
9184
|
+
return /* @__PURE__ */ React96.createElement("div", { style: { display: "flex", height: "100%" } }, /* @__PURE__ */ React96.createElement(
|
|
9088
9185
|
"div",
|
|
9089
9186
|
{
|
|
9090
9187
|
className: `ixo-editor ixo-editor--theme-${config.theme} ${className}`,
|
|
9091
9188
|
style: { flex: 1 }
|
|
9092
9189
|
},
|
|
9093
|
-
/* @__PURE__ */
|
|
9190
|
+
/* @__PURE__ */ React96.createElement(
|
|
9094
9191
|
BlockNoteView,
|
|
9095
9192
|
{
|
|
9096
9193
|
editor,
|
|
@@ -9105,7 +9202,7 @@ function IxoEditorContent({
|
|
|
9105
9202
|
onChange,
|
|
9106
9203
|
onSelectionChange
|
|
9107
9204
|
},
|
|
9108
|
-
config.slashMenu && /* @__PURE__ */
|
|
9205
|
+
config.slashMenu && /* @__PURE__ */ React96.createElement(
|
|
9109
9206
|
SuggestionMenuController,
|
|
9110
9207
|
{
|
|
9111
9208
|
triggerCharacter: "/",
|
|
@@ -9118,7 +9215,7 @@ function IxoEditorContent({
|
|
|
9118
9215
|
),
|
|
9119
9216
|
children
|
|
9120
9217
|
)
|
|
9121
|
-
), /* @__PURE__ */
|
|
9218
|
+
), /* @__PURE__ */ React96.createElement(PanelContent, null));
|
|
9122
9219
|
}
|
|
9123
9220
|
function IxoEditor({
|
|
9124
9221
|
editor,
|
|
@@ -9144,7 +9241,7 @@ function IxoEditor({
|
|
|
9144
9241
|
tableHandles: true
|
|
9145
9242
|
};
|
|
9146
9243
|
const isEditable = editable;
|
|
9147
|
-
const editorContent = /* @__PURE__ */
|
|
9244
|
+
const editorContent = /* @__PURE__ */ React96.createElement(
|
|
9148
9245
|
BlocknoteProvider,
|
|
9149
9246
|
{
|
|
9150
9247
|
editor,
|
|
@@ -9152,7 +9249,7 @@ function IxoEditor({
|
|
|
9152
9249
|
blockRequirements,
|
|
9153
9250
|
editable: isEditable
|
|
9154
9251
|
},
|
|
9155
|
-
/* @__PURE__ */
|
|
9252
|
+
/* @__PURE__ */ React96.createElement(
|
|
9156
9253
|
IxoEditorContent,
|
|
9157
9254
|
{
|
|
9158
9255
|
editor,
|
|
@@ -9166,7 +9263,7 @@ function IxoEditor({
|
|
|
9166
9263
|
)
|
|
9167
9264
|
);
|
|
9168
9265
|
if (mantineTheme) {
|
|
9169
|
-
return /* @__PURE__ */
|
|
9266
|
+
return /* @__PURE__ */ React96.createElement(MantineProvider, { theme: mantineTheme }, editorContent);
|
|
9170
9267
|
}
|
|
9171
9268
|
return editorContent;
|
|
9172
9269
|
}
|
|
@@ -9251,4 +9348,4 @@ export {
|
|
|
9251
9348
|
ixoGraphQLClient,
|
|
9252
9349
|
getEntity
|
|
9253
9350
|
};
|
|
9254
|
-
//# sourceMappingURL=chunk-
|
|
9351
|
+
//# sourceMappingURL=chunk-BO2JVTVH.mjs.map
|