@ixo/editor 1.13.0 → 1.15.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.
|
@@ -1287,11 +1287,11 @@ var CheckboxBlockSpec = createReactBlockSpec(
|
|
|
1287
1287
|
);
|
|
1288
1288
|
|
|
1289
1289
|
// src/mantine/blocks/list/ListBlockSpec.tsx
|
|
1290
|
-
import
|
|
1290
|
+
import React41 from "react";
|
|
1291
1291
|
import { createReactBlockSpec as createReactBlockSpec2 } from "@blocknote/react";
|
|
1292
1292
|
|
|
1293
1293
|
// src/mantine/blocks/list/ListBlock.tsx
|
|
1294
|
-
import
|
|
1294
|
+
import React40 from "react";
|
|
1295
1295
|
|
|
1296
1296
|
// src/mantine/blocks/list/template/TemplateView.tsx
|
|
1297
1297
|
import React16, { useMemo as useMemo6 } from "react";
|
|
@@ -1466,7 +1466,7 @@ var investmentsConfigFields = [
|
|
|
1466
1466
|
label: "Relayed Node DID",
|
|
1467
1467
|
description: "The DID of the relayed node to fetch investments from",
|
|
1468
1468
|
type: "text",
|
|
1469
|
-
required:
|
|
1469
|
+
required: false
|
|
1470
1470
|
}
|
|
1471
1471
|
];
|
|
1472
1472
|
var investmentsSortFields = [
|
|
@@ -1508,7 +1508,7 @@ var oraclesConfigFields = [
|
|
|
1508
1508
|
label: "Relayed Node DID",
|
|
1509
1509
|
description: "The DID of the relayed node to fetch oracles from",
|
|
1510
1510
|
type: "text",
|
|
1511
|
-
required:
|
|
1511
|
+
required: false
|
|
1512
1512
|
}
|
|
1513
1513
|
];
|
|
1514
1514
|
var oraclesSortFields = [
|
|
@@ -1573,14 +1573,14 @@ var podsSelectionPanelConfig = {
|
|
|
1573
1573
|
var proposalsMetadata = {
|
|
1574
1574
|
id: "proposals",
|
|
1575
1575
|
name: "Proposals",
|
|
1576
|
-
description: "Display proposals from a
|
|
1576
|
+
description: "Display proposals from a group",
|
|
1577
1577
|
icon: "\u{1F4DC}"
|
|
1578
1578
|
};
|
|
1579
1579
|
var proposalsConfigFields = [
|
|
1580
1580
|
{
|
|
1581
|
-
key: "
|
|
1582
|
-
label: "
|
|
1583
|
-
description: "The
|
|
1581
|
+
key: "groupCoreAddress",
|
|
1582
|
+
label: "Group Core Address",
|
|
1583
|
+
description: "The Core Address of the group to fetch proposals from",
|
|
1584
1584
|
type: "text",
|
|
1585
1585
|
required: true
|
|
1586
1586
|
}
|
|
@@ -1615,7 +1615,7 @@ var requestsConfigFields = [
|
|
|
1615
1615
|
label: "Relayed Node DID",
|
|
1616
1616
|
description: "The DID of the relayed node to fetch requests from",
|
|
1617
1617
|
type: "text",
|
|
1618
|
-
required:
|
|
1618
|
+
required: false
|
|
1619
1619
|
}
|
|
1620
1620
|
];
|
|
1621
1621
|
var requestsSortFields = [
|
|
@@ -1764,6 +1764,60 @@ var daoMembersSelectionPanelConfig = {
|
|
|
1764
1764
|
detailsHandlerKey: "getDaoMemberDetails"
|
|
1765
1765
|
};
|
|
1766
1766
|
|
|
1767
|
+
// src/mantine/blocks/list/projects/config.ts
|
|
1768
|
+
var projectsMetadata = {
|
|
1769
|
+
id: "projects",
|
|
1770
|
+
name: "Projects",
|
|
1771
|
+
description: "Display projects from a registry",
|
|
1772
|
+
icon: "\u{1F4E9}"
|
|
1773
|
+
};
|
|
1774
|
+
var projectsConfigFields = [
|
|
1775
|
+
{
|
|
1776
|
+
key: "relayedNodeDid",
|
|
1777
|
+
label: "Relayed Node DID",
|
|
1778
|
+
description: "The DID of the relayed node to fetch projects from",
|
|
1779
|
+
type: "text",
|
|
1780
|
+
required: false
|
|
1781
|
+
}
|
|
1782
|
+
];
|
|
1783
|
+
var projectsSortFields = [{ key: "name", label: "Name", type: "string" }];
|
|
1784
|
+
var projectsFilterFields = [];
|
|
1785
|
+
var projectsHandlerKey = "getProjects";
|
|
1786
|
+
var projectsSelectionPanelConfig = {
|
|
1787
|
+
title: (item) => item.name || "Project",
|
|
1788
|
+
description: (item) => item.description || "No description",
|
|
1789
|
+
prompts: (item) => [{ text: `DID: ${item.did}` }],
|
|
1790
|
+
actionSections: (item) => item.actionSections,
|
|
1791
|
+
detailsHandlerKey: "getProjectDetails"
|
|
1792
|
+
};
|
|
1793
|
+
|
|
1794
|
+
// src/mantine/blocks/list/daos/config.ts
|
|
1795
|
+
var daosMetadata = {
|
|
1796
|
+
id: "daos",
|
|
1797
|
+
name: "Daos",
|
|
1798
|
+
description: "Display Daos from a registry",
|
|
1799
|
+
icon: "\u{1F4E9}"
|
|
1800
|
+
};
|
|
1801
|
+
var daosConfigFields = [
|
|
1802
|
+
{
|
|
1803
|
+
key: "relayedNodeDid",
|
|
1804
|
+
label: "Relayed Node DID",
|
|
1805
|
+
description: "The DID of the relayed node to fetch Daos from",
|
|
1806
|
+
type: "text",
|
|
1807
|
+
required: false
|
|
1808
|
+
}
|
|
1809
|
+
];
|
|
1810
|
+
var daosSortFields = [{ key: "name", label: "Name", type: "string" }];
|
|
1811
|
+
var daosFilterFields = [];
|
|
1812
|
+
var daosHandlerKey = "getDaos";
|
|
1813
|
+
var daosSelectionPanelConfig = {
|
|
1814
|
+
title: (item) => item.name || "Dao",
|
|
1815
|
+
description: (item) => item.description || "No description",
|
|
1816
|
+
prompts: (item) => [{ text: `DID: ${item.did}` }],
|
|
1817
|
+
actionSections: (item) => item.actionSections,
|
|
1818
|
+
detailsHandlerKey: "getDaoDetails"
|
|
1819
|
+
};
|
|
1820
|
+
|
|
1767
1821
|
// src/mantine/blocks/list/registry.ts
|
|
1768
1822
|
var listTypeRegistry = {
|
|
1769
1823
|
linked_resources: {
|
|
@@ -1849,6 +1903,20 @@ var listTypeRegistry = {
|
|
|
1849
1903
|
sortFields: daoMembersSortFields,
|
|
1850
1904
|
filterFields: [],
|
|
1851
1905
|
handlerKey: daoMembersHandlerKey
|
|
1906
|
+
},
|
|
1907
|
+
projects: {
|
|
1908
|
+
metadata: projectsMetadata,
|
|
1909
|
+
configFields: projectsConfigFields,
|
|
1910
|
+
sortFields: projectsSortFields,
|
|
1911
|
+
filterFields: projectsFilterFields,
|
|
1912
|
+
handlerKey: projectsHandlerKey
|
|
1913
|
+
},
|
|
1914
|
+
daos: {
|
|
1915
|
+
metadata: daosMetadata,
|
|
1916
|
+
configFields: daosConfigFields,
|
|
1917
|
+
sortFields: daosSortFields,
|
|
1918
|
+
filterFields: daosFilterFields,
|
|
1919
|
+
handlerKey: daosHandlerKey
|
|
1852
1920
|
}
|
|
1853
1921
|
};
|
|
1854
1922
|
var getAllListTypes = () => {
|
|
@@ -1872,7 +1940,9 @@ var listSelectionPanelRegistry = {
|
|
|
1872
1940
|
requests: requestsSelectionPanelConfig,
|
|
1873
1941
|
group_members: groupMembersSelectionPanelConfig,
|
|
1874
1942
|
validators: validatorsSelectionPanelConfig,
|
|
1875
|
-
dao_members: daoMembersSelectionPanelConfig
|
|
1943
|
+
dao_members: daoMembersSelectionPanelConfig,
|
|
1944
|
+
projects: projectsSelectionPanelConfig,
|
|
1945
|
+
daos: daosSelectionPanelConfig
|
|
1876
1946
|
};
|
|
1877
1947
|
var getSelectionPanelConfig = (type) => {
|
|
1878
1948
|
return listSelectionPanelRegistry[type];
|
|
@@ -2043,8 +2113,9 @@ var TemplateConfig2 = ({ editor, block }) => {
|
|
|
2043
2113
|
filter: JSON.stringify(config.filter)
|
|
2044
2114
|
}
|
|
2045
2115
|
});
|
|
2116
|
+
closePanel();
|
|
2046
2117
|
},
|
|
2047
|
-
[editor, block]
|
|
2118
|
+
[editor, closePanel, block]
|
|
2048
2119
|
);
|
|
2049
2120
|
const listType = block.props.listType && block.props.listType !== "" ? block.props.listType : null;
|
|
2050
2121
|
let listConfig = {};
|
|
@@ -2132,8 +2203,8 @@ var ListTemplateView = ({ editor, block }) => {
|
|
|
2132
2203
|
};
|
|
2133
2204
|
|
|
2134
2205
|
// src/mantine/blocks/list/flow/FlowView.tsx
|
|
2135
|
-
import
|
|
2136
|
-
import { Group as Group7, Stack as
|
|
2206
|
+
import React39, { useState as useState6, useEffect as useEffect6, useMemo as useMemo8, useCallback as useCallback9 } from "react";
|
|
2207
|
+
import { Group as Group7, Stack as Stack26, Text as Text26, ActionIcon as ActionIcon5, Alert as Alert4, Loader as Loader2, Center as Center2, Flex as Flex17, Button as Button5, Title as Title4, Collapse } from "@mantine/core";
|
|
2137
2208
|
|
|
2138
2209
|
// src/mantine/blocks/list/linked_resources/LinkedResourcesList.tsx
|
|
2139
2210
|
import React20 from "react";
|
|
@@ -2240,6 +2311,14 @@ import { Text as Text9, Box as Box3, Stack as Stack11, Flex as Flex3, Image } fr
|
|
|
2240
2311
|
|
|
2241
2312
|
// src/core/lib/formatters.ts
|
|
2242
2313
|
var formatNumber = (value) => typeof value === "number" ? value.toLocaleString() : "-";
|
|
2314
|
+
function shortStr(str, threshold = 30, saveSymbolsAtTheEnd = 10, insert = "...") {
|
|
2315
|
+
if (!str) return str;
|
|
2316
|
+
const len = str.length;
|
|
2317
|
+
if (len <= threshold) return str;
|
|
2318
|
+
const ending = saveSymbolsAtTheEnd ? str.slice(-1 * saveSymbolsAtTheEnd) : "";
|
|
2319
|
+
const beginning = str.substring(0, threshold - saveSymbolsAtTheEnd - insert.length);
|
|
2320
|
+
return `${beginning}${insert}${ending}`;
|
|
2321
|
+
}
|
|
2243
2322
|
|
|
2244
2323
|
// src/mantine/blocks/list/assets/AssetsList.tsx
|
|
2245
2324
|
var AssetsList = ({ items, mods, isItemChecked, onItemCheck }) => {
|
|
@@ -2338,14 +2417,14 @@ var PodsList = ({ items, mods, isItemChecked, onItemCheck }) => {
|
|
|
2338
2417
|
return /* @__PURE__ */ React26.createElement(Box8, { flex: 1 }, /* @__PURE__ */ React26.createElement(Stack16, null, rows));
|
|
2339
2418
|
};
|
|
2340
2419
|
|
|
2341
|
-
// src/mantine/blocks/list/proposals/
|
|
2420
|
+
// src/mantine/blocks/list/proposals/ProposalsList.tsx
|
|
2342
2421
|
import React27 from "react";
|
|
2343
2422
|
import { Text as Text15, Box as Box9, Image as Image6, Stack as Stack17, Flex as Flex9, Badge as Badge4 } from "@mantine/core";
|
|
2344
2423
|
var ProposalsList = ({ items, mods, isItemChecked, onItemCheck }) => {
|
|
2345
2424
|
if (!items || items.length === 0) {
|
|
2346
2425
|
return /* @__PURE__ */ React27.createElement(Text15, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No proposals found");
|
|
2347
2426
|
}
|
|
2348
|
-
const rows = items.map((proposal) => /* @__PURE__ */ React27.createElement(ListItemContainer, { key: proposal.did }, /* @__PURE__ */ React27.createElement(Flex9, { align: "center", gap: "sm" }, /* @__PURE__ */ React27.createElement(Image6, { radius: 16, w: 32, h: 32, src: proposal.icon }), /* @__PURE__ */ React27.createElement(Stack17, { gap: 0 }, /* @__PURE__ */ React27.createElement(Text15, { size: "sm" }, proposal.name || "-"), /* @__PURE__ */ React27.createElement(Text15, { size: "xs", c: "dimmed" }, proposal.description || "-"))), /* @__PURE__ */ React27.createElement(Flex9, { align: "center", gap: "md" }, /* @__PURE__ */ React27.createElement(Stack17, { ta: "right", gap: 0 }, /* @__PURE__ */ React27.createElement(Badge4, { size: "sm", variant: "light", color: "blue", style: { fontFamily: "monospace", fontSize: "10px" } }, proposal.status), /* @__PURE__ */ React27.createElement(Text15, { size: "sm", c: "dimmed" }, proposal.isVotedOn ? "Voted" : "Not voted")), mods && /* @__PURE__ */ React27.createElement(ListItemCheckbox, { ariaLabel: `Select proposal ${proposal.did}`, checked: isItemChecked?.(proposal.did), onCheck: (checked) => onItemCheck?.(proposal.did, checked) }))));
|
|
2427
|
+
const rows = items.map((proposal) => /* @__PURE__ */ React27.createElement(ListItemContainer, { key: proposal.did }, /* @__PURE__ */ React27.createElement(Flex9, { align: "center", gap: "sm" }, /* @__PURE__ */ React27.createElement(Image6, { radius: 16, w: 32, h: 32, src: proposal.icon }), /* @__PURE__ */ React27.createElement(Stack17, { gap: 0 }, /* @__PURE__ */ React27.createElement(Text15, { size: "sm" }, proposal.name || "-"), /* @__PURE__ */ React27.createElement(Text15, { size: "xs", c: "dimmed" }, proposal.description || "-"))), /* @__PURE__ */ React27.createElement(Flex9, { align: "center", gap: "md" }, /* @__PURE__ */ React27.createElement(Stack17, { ta: "right", align: "end", gap: 0 }, /* @__PURE__ */ React27.createElement(Badge4, { size: "sm", variant: "light", color: "blue", style: { fontFamily: "monospace", fontSize: "10px" } }, proposal.status), /* @__PURE__ */ React27.createElement(Text15, { size: "sm", c: "dimmed" }, proposal.isVotedOn ? "Voted" : "Not voted")), mods && /* @__PURE__ */ React27.createElement(ListItemCheckbox, { ariaLabel: `Select proposal ${proposal.did}`, checked: isItemChecked?.(proposal.did), onCheck: (checked) => onItemCheck?.(proposal.did, checked) }))));
|
|
2349
2428
|
return /* @__PURE__ */ React27.createElement(Box9, { flex: 1 }, /* @__PURE__ */ React27.createElement(Stack17, null, rows));
|
|
2350
2429
|
};
|
|
2351
2430
|
|
|
@@ -2374,19 +2453,45 @@ var MembersList = ({ items, mods, isItemChecked, onItemCheck }) => {
|
|
|
2374
2453
|
// src/mantine/blocks/list/validators/ValidatorsList.tsx
|
|
2375
2454
|
import React30 from "react";
|
|
2376
2455
|
import { Text as Text18, Box as Box12, Image as Image9, Stack as Stack20, Flex as Flex12 } from "@mantine/core";
|
|
2456
|
+
|
|
2457
|
+
// src/core/utils/numbers.ts
|
|
2458
|
+
var numberFormatter = (num, digits) => {
|
|
2459
|
+
const lookup = [
|
|
2460
|
+
{ value: 1, symbol: "" },
|
|
2461
|
+
{ value: 1e3, symbol: "k" },
|
|
2462
|
+
{ value: 1e6, symbol: "M" },
|
|
2463
|
+
{ value: 1e9, symbol: "G" },
|
|
2464
|
+
{ value: 1e12, symbol: "T" },
|
|
2465
|
+
{ value: 1e15, symbol: "P" },
|
|
2466
|
+
{ value: 1e18, symbol: "E" }
|
|
2467
|
+
];
|
|
2468
|
+
const rx = /\.0+$|(\.[0-9]*[1-9])0+$/;
|
|
2469
|
+
const item = lookup.slice().reverse().find((lookupItem) => num >= lookupItem.value);
|
|
2470
|
+
return item ? (num / item.value).toFixed(digits).replace(rx, "$1") + item.symbol : "0";
|
|
2471
|
+
};
|
|
2472
|
+
var microAmountToAmount = (microAmount, microUnits = 6) => {
|
|
2473
|
+
const amount = (microAmount ?? 0) / Math.pow(10, microUnits);
|
|
2474
|
+
return amount;
|
|
2475
|
+
};
|
|
2476
|
+
|
|
2477
|
+
// src/core/lib/validators.ts
|
|
2478
|
+
var getDelegatedTokensFromValidator = (validator) => Number(validator?.amount ?? 0);
|
|
2479
|
+
var getDisplayDelegatedTokensFromValidator = (validator) => microAmountToAmount(getDelegatedTokensFromValidator(validator), 6);
|
|
2480
|
+
|
|
2481
|
+
// src/mantine/blocks/list/validators/ValidatorsList.tsx
|
|
2377
2482
|
var ValidatorsList = ({ items, mods, isItemChecked, onItemCheck }) => {
|
|
2378
2483
|
if (!items || items.length === 0) {
|
|
2379
2484
|
return /* @__PURE__ */ React30.createElement(Text18, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No validators found");
|
|
2380
2485
|
}
|
|
2381
|
-
const rows = items.map((v) => /* @__PURE__ */ React30.createElement(ListItemContainer, { key: v.did }, /* @__PURE__ */ React30.createElement(Flex12, { align: "center", gap: "sm" }, /* @__PURE__ */ React30.createElement(Image9, { radius: 16, w: 32, h: 32, src: v.icon }), /* @__PURE__ */ React30.createElement(Stack20, { gap: 0 }, /* @__PURE__ */ React30.createElement(Text18, { size: "sm" }, v.name || "-"), /* @__PURE__ */ React30.createElement(Text18, { size: "xs", c: "dimmed" }, v.description || "-"))), /* @__PURE__ */ React30.createElement(Flex12, { align: "center", gap: "md" }, /* @__PURE__ */ React30.createElement(Stack20, { ta: "right", gap: 0 }, /* @__PURE__ */ React30.createElement(Text18, { size: "sm" },
|
|
2486
|
+
const rows = items.map((v) => /* @__PURE__ */ React30.createElement(ListItemContainer, { key: v.did }, /* @__PURE__ */ React30.createElement(Flex12, { align: "center", gap: "sm" }, /* @__PURE__ */ React30.createElement(Image9, { radius: 16, w: 32, h: 32, src: v.icon }), /* @__PURE__ */ React30.createElement(Stack20, { gap: 0 }, /* @__PURE__ */ React30.createElement(Text18, { size: "sm" }, v.name || "-"), /* @__PURE__ */ React30.createElement(Text18, { size: "xs", c: "dimmed" }, v.description || "-"))), /* @__PURE__ */ React30.createElement(Flex12, { align: "center", gap: "md" }, /* @__PURE__ */ React30.createElement(Stack20, { ta: "right", gap: 0 }, /* @__PURE__ */ React30.createElement(Text18, { size: "sm" }, numberFormatter(getDisplayDelegatedTokensFromValidator(v), 2), " ", v.currency), /* @__PURE__ */ React30.createElement(Text18, { size: "sm", c: "dimmed" }, v.commission, "% fee"), /* @__PURE__ */ React30.createElement(Text18, { size: "xs", c: "dimmed" }, v.isActive ? "Active" : "Inactive", " \u2022 ", v.isStaked ? "Staked" : "Not staked", " \u2022 ", v.isBonding ? "Bonding" : "Not bonding")), mods && /* @__PURE__ */ React30.createElement(ListItemCheckbox, { ariaLabel: `Select validator ${v.did}`, checked: isItemChecked?.(v.did), onCheck: (checked) => onItemCheck?.(v.did, checked) }))));
|
|
2382
2487
|
return /* @__PURE__ */ React30.createElement(Box12, { flex: 1 }, /* @__PURE__ */ React30.createElement(Stack20, null, rows));
|
|
2383
2488
|
};
|
|
2384
2489
|
|
|
2385
2490
|
// src/mantine/blocks/list/ListActionsMenu.tsx
|
|
2386
2491
|
import React31 from "react";
|
|
2387
|
-
import { Menu, Text as Text19 } from "@mantine/core";
|
|
2388
|
-
import { IconArrowDown, IconArrowUp, IconAdjustments, IconCheckbox as IconCheckbox2, IconAdjustmentsHorizontal } from "@tabler/icons-react";
|
|
2389
|
-
var ListActionsMenu = ({ options, selectionMode, onSelectActionClick, value, onChange }) => {
|
|
2492
|
+
import { Menu, Text as Text19, ActionIcon as ActionIcon4 } from "@mantine/core";
|
|
2493
|
+
import { IconArrowDown, IconArrowUp, IconAdjustments, IconCheckbox as IconCheckbox2, IconAdjustmentsHorizontal, IconDownload } from "@tabler/icons-react";
|
|
2494
|
+
var ListActionsMenu = ({ options, selectionMode, onSelectActionClick, value, onChange, onDownloadCsv }) => {
|
|
2390
2495
|
const renderItem = (opt, direction) => {
|
|
2391
2496
|
const isActive = value?.key === opt.key && value?.direction === direction;
|
|
2392
2497
|
const Icon = direction === "asc" ? IconArrowUp : IconArrowDown;
|
|
@@ -2403,7 +2508,7 @@ var ListActionsMenu = ({ options, selectionMode, onSelectActionClick, value, onC
|
|
|
2403
2508
|
opt.label
|
|
2404
2509
|
);
|
|
2405
2510
|
};
|
|
2406
|
-
return /* @__PURE__ */ React31.createElement(Menu, { shadow: "md", width: 220 }, /* @__PURE__ */ React31.createElement(Menu.Target, null, /* @__PURE__ */ React31.createElement(
|
|
2511
|
+
return /* @__PURE__ */ React31.createElement(Menu, { shadow: "md", width: 220 }, /* @__PURE__ */ React31.createElement(Menu.Target, null, /* @__PURE__ */ React31.createElement(ActionIcon4, { variant: "subtle", size: "sm", "aria-label": "List actions", title: "List actions" }, /* @__PURE__ */ React31.createElement(IconAdjustmentsHorizontal, { size: 18 }))), /* @__PURE__ */ React31.createElement(Menu.Dropdown, null, /* @__PURE__ */ React31.createElement(Menu.Label, null, /* @__PURE__ */ React31.createElement(Text19, { c: "dimmed" }, "Order By")), options.map((opt) => /* @__PURE__ */ React31.createElement(React31.Fragment, { key: opt.key }, renderItem(opt, "desc"), renderItem(opt, "asc"))), /* @__PURE__ */ React31.createElement(Menu.Divider, null), /* @__PURE__ */ React31.createElement(Menu.Item, { leftSection: /* @__PURE__ */ React31.createElement(IconAdjustments, { size: 16 }) }, "Smart Filter"), /* @__PURE__ */ React31.createElement(Menu.Divider, null), /* @__PURE__ */ React31.createElement(Menu.Item, { onClick: () => onSelectActionClick(selectionMode === "single" ? null : "single"), leftSection: /* @__PURE__ */ React31.createElement(IconCheckbox2, { size: 16 }) }, "Single Select"), /* @__PURE__ */ React31.createElement(Menu.Item, { onClick: () => onSelectActionClick(selectionMode === "multi" ? null : "multi"), leftSection: /* @__PURE__ */ React31.createElement(IconCheckbox2, { size: 16 }) }, "Multi Select"), onDownloadCsv && /* @__PURE__ */ React31.createElement(React31.Fragment, null, /* @__PURE__ */ React31.createElement(Menu.Divider, null), /* @__PURE__ */ React31.createElement(Menu.Item, { onClick: onDownloadCsv, leftSection: /* @__PURE__ */ React31.createElement(IconDownload, { size: 16 }) }, "Download CSV"))));
|
|
2407
2512
|
};
|
|
2408
2513
|
|
|
2409
2514
|
// src/core/lib/sortListItems.ts
|
|
@@ -2477,7 +2582,7 @@ function filterListItems(items, filterOption) {
|
|
|
2477
2582
|
}
|
|
2478
2583
|
|
|
2479
2584
|
// src/mantine/blocks/list/flow/FlowView.tsx
|
|
2480
|
-
import { IconArrowDown as IconArrowDown2, IconArrowRight as IconArrowRight2, IconArrowUp as IconArrowUp2 } from "@tabler/icons-react";
|
|
2585
|
+
import { IconArrowDown as IconArrowDown2, IconArrowRight as IconArrowRight2, IconArrowUp as IconArrowUp2, IconChevronDown, IconChevronUp, IconRefresh, IconSettings, IconAlertCircle } from "@tabler/icons-react";
|
|
2481
2586
|
|
|
2482
2587
|
// src/mantine/blocks/list/ListPagination.tsx
|
|
2483
2588
|
import React33 from "react";
|
|
@@ -2707,16 +2812,94 @@ var ListSelectionPanel = ({ selectedIds, listType }) => {
|
|
|
2707
2812
|
);
|
|
2708
2813
|
};
|
|
2709
2814
|
|
|
2815
|
+
// src/mantine/blocks/list/projects/ProjectsList.tsx
|
|
2816
|
+
import React37 from "react";
|
|
2817
|
+
import { Text as Text24, Box as Box14, Image as Image11, Stack as Stack24, Flex as Flex15 } from "@mantine/core";
|
|
2818
|
+
var ProjectsList = ({ items, mods, isItemChecked, onItemCheck }) => {
|
|
2819
|
+
if (!items || items.length === 0) {
|
|
2820
|
+
return /* @__PURE__ */ React37.createElement(Text24, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No Projects found");
|
|
2821
|
+
}
|
|
2822
|
+
const rows = items.map((project) => /* @__PURE__ */ React37.createElement(ListItemContainer, { key: project.did }, /* @__PURE__ */ React37.createElement(Flex15, { align: "center", gap: "sm" }, /* @__PURE__ */ React37.createElement(Image11, { radius: 16, w: 32, h: 32, src: project.icon }), /* @__PURE__ */ React37.createElement(Stack24, { gap: 0 }, /* @__PURE__ */ React37.createElement(Text24, { size: "sm" }, project.name || "-"), /* @__PURE__ */ React37.createElement(Text24, { size: "sm", c: "dimmed" }, shortStr(project.description, 50, 0) || "-"))), /* @__PURE__ */ React37.createElement(Flex15, { align: "center", gap: "md" }, mods && /* @__PURE__ */ React37.createElement(ListItemCheckbox, { ariaLabel: `Select request ${project.did}`, checked: isItemChecked?.(project.did), onCheck: (checked) => onItemCheck?.(project.did, checked) }))));
|
|
2823
|
+
return /* @__PURE__ */ React37.createElement(Box14, { flex: 1 }, /* @__PURE__ */ React37.createElement(Stack24, null, rows));
|
|
2824
|
+
};
|
|
2825
|
+
|
|
2826
|
+
// src/mantine/blocks/list/daos/DaosList.tsx
|
|
2827
|
+
import React38 from "react";
|
|
2828
|
+
import { Text as Text25, Box as Box15, Image as Image12, Stack as Stack25, Flex as Flex16 } from "@mantine/core";
|
|
2829
|
+
var DaosList = ({ items, mods, isItemChecked, onItemCheck }) => {
|
|
2830
|
+
if (!items || items.length === 0) {
|
|
2831
|
+
return /* @__PURE__ */ React38.createElement(Text25, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No Daos found");
|
|
2832
|
+
}
|
|
2833
|
+
const rows = items.map((dao) => /* @__PURE__ */ React38.createElement(ListItemContainer, { key: dao.did }, /* @__PURE__ */ React38.createElement(Flex16, { align: "center", gap: "sm" }, /* @__PURE__ */ React38.createElement(Image12, { radius: 16, w: 32, h: 32, src: dao.icon }), /* @__PURE__ */ React38.createElement(Stack25, { gap: 0 }, /* @__PURE__ */ React38.createElement(Text25, { size: "sm" }, dao.name || "-"), /* @__PURE__ */ React38.createElement(Text25, { size: "sm", c: "dimmed" }, shortStr(dao.description, 50, 0) || "-"))), /* @__PURE__ */ React38.createElement(Flex16, { align: "center", gap: "md" }, mods && /* @__PURE__ */ React38.createElement(ListItemCheckbox, { ariaLabel: `Select request ${dao.did}`, checked: isItemChecked?.(dao.did), onCheck: (checked) => onItemCheck?.(dao.did, checked) }))));
|
|
2834
|
+
return /* @__PURE__ */ React38.createElement(Box15, { flex: 1 }, /* @__PURE__ */ React38.createElement(Stack25, null, rows));
|
|
2835
|
+
};
|
|
2836
|
+
|
|
2837
|
+
// src/core/utils/files.ts
|
|
2838
|
+
function downloadArrayAsCsv(rows, options) {
|
|
2839
|
+
const safeString = (value) => {
|
|
2840
|
+
if (value === null || value === void 0) return "";
|
|
2841
|
+
if (typeof value === "string") return value;
|
|
2842
|
+
if (typeof value === "number" || typeof value === "boolean") return String(value);
|
|
2843
|
+
try {
|
|
2844
|
+
return JSON.stringify(value);
|
|
2845
|
+
} catch {
|
|
2846
|
+
return String(value);
|
|
2847
|
+
}
|
|
2848
|
+
};
|
|
2849
|
+
const csvEscape = (field) => {
|
|
2850
|
+
const needsQuotes = /[",\n\r]/.test(field) || field.includes(",");
|
|
2851
|
+
const out = field.replace(/"/g, '""');
|
|
2852
|
+
return needsQuotes ? `"${out}"` : out;
|
|
2853
|
+
};
|
|
2854
|
+
const isObjectRow = (r) => r !== null && typeof r === "object" && !Array.isArray(r);
|
|
2855
|
+
let headers = [];
|
|
2856
|
+
if (rows.length > 0 && isObjectRow(rows[0])) {
|
|
2857
|
+
const keySet = /* @__PURE__ */ new Set();
|
|
2858
|
+
for (const r of rows) {
|
|
2859
|
+
if (isObjectRow(r)) {
|
|
2860
|
+
for (const k of Object.keys(r)) keySet.add(k);
|
|
2861
|
+
}
|
|
2862
|
+
}
|
|
2863
|
+
headers = Array.from(keySet);
|
|
2864
|
+
} else {
|
|
2865
|
+
headers = ["value"];
|
|
2866
|
+
}
|
|
2867
|
+
const csvLines = [];
|
|
2868
|
+
csvLines.push(headers.map((h) => csvEscape(h)).join(","));
|
|
2869
|
+
for (const row of rows) {
|
|
2870
|
+
if (isObjectRow(row)) {
|
|
2871
|
+
const obj = row;
|
|
2872
|
+
const line = headers.map((h) => csvEscape(safeString(Object.prototype.hasOwnProperty.call(obj, h) ? obj[h] : ""))).join(",");
|
|
2873
|
+
csvLines.push(line);
|
|
2874
|
+
} else {
|
|
2875
|
+
csvLines.push(csvEscape(safeString(row)));
|
|
2876
|
+
}
|
|
2877
|
+
}
|
|
2878
|
+
const csvContent = csvLines.join("\r\n");
|
|
2879
|
+
const bom = "\uFEFF";
|
|
2880
|
+
const blob = new Blob([bom + csvContent], { type: "text/csv;charset=utf-8;" });
|
|
2881
|
+
const url = URL.createObjectURL(blob);
|
|
2882
|
+
const a = document.createElement("a");
|
|
2883
|
+
const pad = (n) => String(n).padStart(2, "0");
|
|
2884
|
+
const d = /* @__PURE__ */ new Date();
|
|
2885
|
+
const defaultName = `list-export-${d.getFullYear()}${pad(d.getMonth() + 1)}${pad(d.getDate())}-${pad(d.getHours())}${pad(d.getMinutes())}${pad(d.getSeconds())}.csv`;
|
|
2886
|
+
a.href = url;
|
|
2887
|
+
a.download = options?.filename || defaultName;
|
|
2888
|
+
document.body.appendChild(a);
|
|
2889
|
+
a.click();
|
|
2890
|
+
document.body.removeChild(a);
|
|
2891
|
+
URL.revokeObjectURL(url);
|
|
2892
|
+
}
|
|
2893
|
+
|
|
2710
2894
|
// src/mantine/blocks/list/flow/FlowView.tsx
|
|
2711
|
-
|
|
2712
|
-
var IconSettings = () => /* @__PURE__ */ React37.createElement("span", null, "\u2699\uFE0F");
|
|
2713
|
-
var IconAlertCircle = () => /* @__PURE__ */ React37.createElement("span", null, "\u26A0\uFE0F");
|
|
2895
|
+
import { useDisclosure } from "@mantine/hooks";
|
|
2714
2896
|
var LIST_FLOW_PANEL_ID = "list-flow-panel";
|
|
2715
2897
|
var LIST_SELECTION_FLOW_PANEL_ID = "list-selection-flow-panel";
|
|
2716
2898
|
var ListFlowView = ({ block, editor }) => {
|
|
2717
2899
|
const { editable } = useBlocknoteContext();
|
|
2718
2900
|
const [data, setData] = useState6(null);
|
|
2719
2901
|
const [loading, setLoading] = useState6(false);
|
|
2902
|
+
const [opened, { toggle }] = useDisclosure(true);
|
|
2720
2903
|
const [error, setError] = useState6(null);
|
|
2721
2904
|
const [showErrorDetails, setShowErrorDetails] = useState6(false);
|
|
2722
2905
|
const [page, setPage] = useState6(1);
|
|
@@ -2724,13 +2907,13 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
2724
2907
|
const [totalPages, setTotalPages] = useState6(0);
|
|
2725
2908
|
const [selectedIds, setSelectedIds] = useState6(/* @__PURE__ */ new Set());
|
|
2726
2909
|
const panelId = `${LIST_FLOW_PANEL_ID}-${block.id}`;
|
|
2727
|
-
const panelContent = useMemo8(() => /* @__PURE__ */
|
|
2910
|
+
const panelContent = useMemo8(() => /* @__PURE__ */ React39.createElement(TemplateConfig2, { editor, block }), [editor, block]);
|
|
2728
2911
|
const { open: openPanel } = usePanel(panelId, panelContent);
|
|
2729
2912
|
const handlers = useBlocknoteHandlers();
|
|
2730
2913
|
const listType = block.props.listType && block.props.listType !== "" ? block.props.listType : null;
|
|
2731
2914
|
const selectionPanelId = `${LIST_SELECTION_FLOW_PANEL_ID}-${block.id}`;
|
|
2732
2915
|
const selectionPanelContent = useMemo8(
|
|
2733
|
-
() => /* @__PURE__ */
|
|
2916
|
+
() => /* @__PURE__ */ React39.createElement(ListSelectionPanel, { editor, block, selectedIds, listType }),
|
|
2734
2917
|
[editor, block, selectedIds, listType]
|
|
2735
2918
|
);
|
|
2736
2919
|
const { open: openSelectionPanel } = usePanel(selectionPanelId, selectionPanelContent);
|
|
@@ -2865,18 +3048,21 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
2865
3048
|
relayerDid = handlers.getRelayerDid();
|
|
2866
3049
|
if (!relayerDid && !listConfig.relayedNodeDid) throw new Error("Relayer is required");
|
|
2867
3050
|
result = await handlers.getCollections(listConfig.relayedNodeDid || relayerDid, page);
|
|
3051
|
+
setTotalPages(Math.ceil(result.totalCount / DEFAULT_PAGE_SIZE));
|
|
2868
3052
|
setData({ items: result.data });
|
|
2869
3053
|
break;
|
|
2870
3054
|
case "investments":
|
|
2871
3055
|
relayerDid = handlers.getRelayerDid();
|
|
2872
3056
|
if (!relayerDid && !listConfig.relayedNodeDid) throw new Error("Relayer is required");
|
|
2873
3057
|
result = await handlers.getInvestments(listConfig.relayedNodeDid || relayerDid, page);
|
|
3058
|
+
setTotalPages(Math.ceil(result.totalCount / DEFAULT_PAGE_SIZE));
|
|
2874
3059
|
setData({ items: result.data });
|
|
2875
3060
|
break;
|
|
2876
3061
|
case "oracles":
|
|
2877
3062
|
relayerDid = handlers.getRelayerDid();
|
|
2878
3063
|
if (!relayerDid && !listConfig.relayedNodeDid) throw new Error("Relayer is required");
|
|
2879
3064
|
result = await handlers.getOracles(listConfig.relayedNodeDid || relayerDid, page);
|
|
3065
|
+
setTotalPages(Math.ceil(result.totalCount / DEFAULT_PAGE_SIZE));
|
|
2880
3066
|
setData({ items: result.data });
|
|
2881
3067
|
break;
|
|
2882
3068
|
case "pods":
|
|
@@ -2886,15 +3072,29 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
2886
3072
|
setData({ items: result.data });
|
|
2887
3073
|
break;
|
|
2888
3074
|
case "proposals":
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
result = await handlers.getProposals(listConfig.relayedNodeDid || relayerDid, page);
|
|
3075
|
+
if (!listConfig.groupCoreAddress) throw new Error("GroupCoreAddress is required");
|
|
3076
|
+
result = await handlers.getProposals(listConfig.groupCoreAddress, page);
|
|
2892
3077
|
setData({ items: result.data });
|
|
2893
3078
|
break;
|
|
2894
3079
|
case "requests":
|
|
2895
3080
|
relayerDid = handlers.getRelayerDid();
|
|
2896
3081
|
if (!relayerDid && !listConfig.relayedNodeDid) throw new Error("Relayer is required");
|
|
2897
3082
|
result = await handlers.getRequests(listConfig.relayedNodeDid || relayerDid, page);
|
|
3083
|
+
setTotalPages(Math.ceil(result.totalCount / DEFAULT_PAGE_SIZE));
|
|
3084
|
+
setData({ items: result.data });
|
|
3085
|
+
break;
|
|
3086
|
+
case "projects":
|
|
3087
|
+
relayerDid = handlers.getRelayerDid();
|
|
3088
|
+
if (!relayerDid && !listConfig.relayedNodeDid) throw new Error("Relayer is required");
|
|
3089
|
+
result = await handlers.getProjects(listConfig.relayedNodeDid || relayerDid, page);
|
|
3090
|
+
setTotalPages(Math.ceil(result.totalCount / DEFAULT_PAGE_SIZE));
|
|
3091
|
+
setData({ items: result.data });
|
|
3092
|
+
break;
|
|
3093
|
+
case "daos":
|
|
3094
|
+
relayerDid = handlers.getRelayerDid();
|
|
3095
|
+
if (!relayerDid && !listConfig.relayedNodeDid) throw new Error("Relayer is required");
|
|
3096
|
+
result = await handlers.getDaos(listConfig.relayedNodeDid || relayerDid, page);
|
|
3097
|
+
setTotalPages(Math.ceil(result.totalCount / DEFAULT_PAGE_SIZE));
|
|
2898
3098
|
setData({ items: result.data });
|
|
2899
3099
|
break;
|
|
2900
3100
|
case "group_members":
|
|
@@ -2956,40 +3156,44 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
2956
3156
|
if (!filteredData || !listType) return null;
|
|
2957
3157
|
switch (listType) {
|
|
2958
3158
|
case "linked_resources":
|
|
2959
|
-
return /* @__PURE__ */
|
|
3159
|
+
return /* @__PURE__ */ React39.createElement(LinkedResourcesList, { items: filteredData, config: listConfig, mods: selectionMode, isItemChecked, onItemCheck });
|
|
2960
3160
|
case "assets":
|
|
2961
|
-
return /* @__PURE__ */
|
|
3161
|
+
return /* @__PURE__ */ React39.createElement(AssetsList, { items: filteredData, config: listConfig, mods: selectionMode, isItemChecked, onItemCheck });
|
|
2962
3162
|
case "transactions":
|
|
2963
|
-
return /* @__PURE__ */
|
|
3163
|
+
return /* @__PURE__ */ React39.createElement(TransactionsList, { items: filteredData, config: listConfig, mods: selectionMode, isItemChecked, onItemCheck });
|
|
2964
3164
|
case "collections":
|
|
2965
|
-
return /* @__PURE__ */
|
|
3165
|
+
return /* @__PURE__ */ React39.createElement(CollectionsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
|
|
2966
3166
|
case "investments":
|
|
2967
|
-
return /* @__PURE__ */
|
|
3167
|
+
return /* @__PURE__ */ React39.createElement(InvestmentsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
|
|
2968
3168
|
case "oracles":
|
|
2969
|
-
return /* @__PURE__ */
|
|
3169
|
+
return /* @__PURE__ */ React39.createElement(OraclesList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
|
|
2970
3170
|
case "pods":
|
|
2971
|
-
return /* @__PURE__ */
|
|
3171
|
+
return /* @__PURE__ */ React39.createElement(PodsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
|
|
2972
3172
|
case "proposals":
|
|
2973
|
-
return /* @__PURE__ */
|
|
3173
|
+
return /* @__PURE__ */ React39.createElement(ProposalsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
|
|
2974
3174
|
case "requests":
|
|
2975
|
-
return /* @__PURE__ */
|
|
3175
|
+
return /* @__PURE__ */ React39.createElement(RequestsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
|
|
3176
|
+
case "projects":
|
|
3177
|
+
return /* @__PURE__ */ React39.createElement(ProjectsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
|
|
3178
|
+
case "daos":
|
|
3179
|
+
return /* @__PURE__ */ React39.createElement(DaosList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
|
|
2976
3180
|
case "group_members":
|
|
2977
|
-
return /* @__PURE__ */
|
|
3181
|
+
return /* @__PURE__ */ React39.createElement(MembersList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
|
|
2978
3182
|
case "dao_members":
|
|
2979
|
-
return /* @__PURE__ */
|
|
3183
|
+
return /* @__PURE__ */ React39.createElement(DaoMembersList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
|
|
2980
3184
|
case "validators":
|
|
2981
|
-
return /* @__PURE__ */
|
|
3185
|
+
return /* @__PURE__ */ React39.createElement(ValidatorsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
|
|
2982
3186
|
default:
|
|
2983
3187
|
return null;
|
|
2984
3188
|
}
|
|
2985
3189
|
};
|
|
2986
3190
|
if (!listType) {
|
|
2987
|
-
return /* @__PURE__ */
|
|
3191
|
+
return /* @__PURE__ */ React39.createElement(Center2, { py: "xl" }, /* @__PURE__ */ React39.createElement(Text26, { size: "sm", c: "dimmed" }, "List not configured"));
|
|
2988
3192
|
}
|
|
2989
|
-
return /* @__PURE__ */
|
|
3193
|
+
return /* @__PURE__ */ React39.createElement(Stack26, { w: "100%" }, /* @__PURE__ */ React39.createElement(Flex17, { px: 5, align: "center", justify: "space-between" }, /* @__PURE__ */ React39.createElement(Title4, { order: 4 }, getListNameByType(listType)), /* @__PURE__ */ React39.createElement(ActionIcon5, { variant: "subtle", size: "sm", onClick: toggle, "aria-label": opened ? "Collapse" : "Expand", title: opened ? "Collapse" : "Expand" }, opened ? /* @__PURE__ */ React39.createElement(IconChevronUp, { size: 18 }) : /* @__PURE__ */ React39.createElement(IconChevronDown, { size: 18 }))), /* @__PURE__ */ React39.createElement(Collapse, { pb: 5, px: 5, in: opened }, /* @__PURE__ */ React39.createElement(Stack26, { mih: totalPages !== 1 ? 500 : void 0, w: "100%" }, /* @__PURE__ */ React39.createElement(Flex17, { align: "center", gap: "xs" }, listSortConfig?.key && /* @__PURE__ */ React39.createElement(Flex17, { align: "center" }, /* @__PURE__ */ React39.createElement(Text26, { size: "xs", c: "dimmed" }, listSortConfig.key?.replace(/([A-Z])/g, " $1").replace(
|
|
2990
3194
|
/^./,
|
|
2991
3195
|
(str) => str.toUpperCase()
|
|
2992
|
-
), " "), /* @__PURE__ */
|
|
3196
|
+
), " "), /* @__PURE__ */ React39.createElement(Text26, { lh: 0.5, c: "dimmed" }, listSortConfig.direction === "asc" && /* @__PURE__ */ React39.createElement(IconArrowUp2, { size: 18 }), listSortConfig.direction === "desc" && /* @__PURE__ */ React39.createElement(IconArrowDown2, { size: 18 }))), selectionMode && /* @__PURE__ */ React39.createElement(Text26, { lh: 0.5, c: "dimmed" }, selectionMode === "single" ? "Single Selection" : "Multi Selection")), /* @__PURE__ */ React39.createElement(Flex17, { justify: "space-between" }, /* @__PURE__ */ React39.createElement(Flex17, { gap: "xs", align: "center" }, /* @__PURE__ */ React39.createElement(FilterTab, { key: "All", label: "All", isActive: !listFilterConfig?.key, onClick: () => handleFilterChange(null) }), Array.isArray(listFilterConfigOptions) && listFilterConfigOptions.length > 0 && listFilterConfigOptions.map(({ key, label, type }) => /* @__PURE__ */ React39.createElement(
|
|
2993
3197
|
FilterTab,
|
|
2994
3198
|
{
|
|
2995
3199
|
key: label,
|
|
@@ -2997,16 +3201,17 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
2997
3201
|
isActive: listFilterConfig?.key === key && listFilterConfig?.value === type,
|
|
2998
3202
|
onClick: () => handleFilterChange({ key, value: type })
|
|
2999
3203
|
}
|
|
3000
|
-
))), /* @__PURE__ */
|
|
3204
|
+
))), /* @__PURE__ */ React39.createElement(Flex17, { gap: "xs" }, /* @__PURE__ */ React39.createElement(ActionIcon5, { variant: "subtle", size: "sm", onClick: fetchData, loading }, /* @__PURE__ */ React39.createElement(IconRefresh, { size: 18 })), editable && /* @__PURE__ */ React39.createElement(ActionIcon5, { variant: "subtle", size: "sm", onClick: openPanel }, /* @__PURE__ */ React39.createElement(IconSettings, { size: 18 })), selectedIds.size > 0 && /* @__PURE__ */ React39.createElement(ActionIcon5, { variant: "subtle", size: "sm", onClick: openSelectionPanel }, /* @__PURE__ */ React39.createElement(IconArrowRight2, null)), listConfig && listSortConfigOptions && listSortConfigOptions?.length > 0 && /* @__PURE__ */ React39.createElement(
|
|
3001
3205
|
ListActionsMenu,
|
|
3002
3206
|
{
|
|
3003
3207
|
onSelectActionClick: (mode) => setSelectionMode(mode),
|
|
3004
3208
|
selectionMode,
|
|
3005
3209
|
options: listSortConfigOptions,
|
|
3006
3210
|
value: listSortConfig,
|
|
3007
|
-
onChange: (sortOption) => handleSortChange(sortOption)
|
|
3211
|
+
onChange: (sortOption) => handleSortChange(sortOption),
|
|
3212
|
+
onDownloadCsv: data?.items ? () => downloadArrayAsCsv(data.items) : void 0
|
|
3008
3213
|
}
|
|
3009
|
-
))), /* @__PURE__ */
|
|
3214
|
+
))), /* @__PURE__ */ React39.createElement(Flex17, { flex: 1 }, loading ? /* @__PURE__ */ React39.createElement(Center2, { py: "xl", w: "100%" }, /* @__PURE__ */ React39.createElement(Loader2, { size: "md", mx: "auto" })) : error ? /* @__PURE__ */ React39.createElement(Alert4, { color: "red", title: "Failed to load data", icon: /* @__PURE__ */ React39.createElement(IconAlertCircle, { size: 18 }) }, /* @__PURE__ */ React39.createElement(Stack26, { gap: "xs" }, /* @__PURE__ */ React39.createElement(Text26, { size: "sm" }, showErrorDetails ? error : "Unable to fetch list data"), /* @__PURE__ */ React39.createElement(Group7, { gap: "xs" }, /* @__PURE__ */ React39.createElement(Button5, { size: "xs", variant: "subtle", onClick: fetchData }, "Retry"), /* @__PURE__ */ React39.createElement(Button5, { size: "xs", variant: "subtle", onClick: () => setShowErrorDetails(!showErrorDetails) }, showErrorDetails ? "Hide" : "Show", " Details")))) : /* @__PURE__ */ React39.createElement(Stack26, { flex: 1 }, /* @__PURE__ */ React39.createElement(Stack26, { gap: "md" }, renderListComponent(), /* @__PURE__ */ React39.createElement(
|
|
3010
3215
|
ListPagination,
|
|
3011
3216
|
{
|
|
3012
3217
|
page,
|
|
@@ -3015,7 +3220,7 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
3015
3220
|
},
|
|
3016
3221
|
totalPages
|
|
3017
3222
|
}
|
|
3018
|
-
))));
|
|
3223
|
+
)))))));
|
|
3019
3224
|
};
|
|
3020
3225
|
|
|
3021
3226
|
// src/mantine/blocks/list/ListBlock.tsx
|
|
@@ -3024,9 +3229,9 @@ function ListBlock({ editor, block }) {
|
|
|
3024
3229
|
const listType = block.props.listType && block.props.listType !== "";
|
|
3025
3230
|
const isConfigured = listType;
|
|
3026
3231
|
if (editable && !isConfigured) {
|
|
3027
|
-
return /* @__PURE__ */
|
|
3232
|
+
return /* @__PURE__ */ React40.createElement(ListTemplateView, { editor, block });
|
|
3028
3233
|
}
|
|
3029
|
-
return /* @__PURE__ */
|
|
3234
|
+
return /* @__PURE__ */ React40.createElement(ListFlowView, { block, editor });
|
|
3030
3235
|
}
|
|
3031
3236
|
|
|
3032
3237
|
// src/mantine/blocks/list/ListBlockSpec.tsx
|
|
@@ -3061,16 +3266,16 @@ var ListBlockSpec = createReactBlockSpec2(
|
|
|
3061
3266
|
{
|
|
3062
3267
|
render: (props) => {
|
|
3063
3268
|
const ixoProps = props;
|
|
3064
|
-
return /* @__PURE__ */
|
|
3269
|
+
return /* @__PURE__ */ React41.createElement(ListBlock, { ...ixoProps });
|
|
3065
3270
|
}
|
|
3066
3271
|
}
|
|
3067
3272
|
);
|
|
3068
3273
|
|
|
3069
3274
|
// src/mantine/blocks/overview/OverviewBlock.tsx
|
|
3070
|
-
import
|
|
3275
|
+
import React42 from "react";
|
|
3071
3276
|
import { createReactBlockSpec as createReactBlockSpec3 } from "@blocknote/react";
|
|
3072
3277
|
var OverviewBlockContent = ({ block, editor }) => {
|
|
3073
|
-
return /* @__PURE__ */
|
|
3278
|
+
return /* @__PURE__ */ React42.createElement(
|
|
3074
3279
|
"div",
|
|
3075
3280
|
{
|
|
3076
3281
|
style: {
|
|
@@ -3082,7 +3287,7 @@ var OverviewBlockContent = ({ block, editor }) => {
|
|
|
3082
3287
|
border: "1px solid #e5e7eb"
|
|
3083
3288
|
}
|
|
3084
3289
|
},
|
|
3085
|
-
/* @__PURE__ */
|
|
3290
|
+
/* @__PURE__ */ React42.createElement("div", { style: { marginBottom: "12px" } }, /* @__PURE__ */ React42.createElement(
|
|
3086
3291
|
"input",
|
|
3087
3292
|
{
|
|
3088
3293
|
type: "text",
|
|
@@ -3108,7 +3313,7 @@ var OverviewBlockContent = ({ block, editor }) => {
|
|
|
3108
3313
|
}
|
|
3109
3314
|
}
|
|
3110
3315
|
)),
|
|
3111
|
-
/* @__PURE__ */
|
|
3316
|
+
/* @__PURE__ */ React42.createElement("div", { style: { minHeight: "40px", color: "#6b7280" } }, block.props.did ? /* @__PURE__ */ React42.createElement("p", null, "Loading overview for DID: ", block.props.did) : /* @__PURE__ */ React42.createElement("p", null, "Enter a DID to load overview data"))
|
|
3112
3317
|
);
|
|
3113
3318
|
};
|
|
3114
3319
|
var OverviewBlock = createReactBlockSpec3(
|
|
@@ -3122,7 +3327,7 @@ var OverviewBlock = createReactBlockSpec3(
|
|
|
3122
3327
|
content: "none"
|
|
3123
3328
|
},
|
|
3124
3329
|
{
|
|
3125
|
-
render: (props) => /* @__PURE__ */
|
|
3330
|
+
render: (props) => /* @__PURE__ */ React42.createElement(OverviewBlockContent, { ...props })
|
|
3126
3331
|
}
|
|
3127
3332
|
);
|
|
3128
3333
|
|
|
@@ -3178,22 +3383,22 @@ var useSharedProposal = ({ proposalId, contractAddress, autoFetch = true }) => {
|
|
|
3178
3383
|
};
|
|
3179
3384
|
|
|
3180
3385
|
// src/mantine/blocks/proposal/ProposalBlockSpec.tsx
|
|
3181
|
-
import
|
|
3386
|
+
import React86 from "react";
|
|
3182
3387
|
import { createReactBlockSpec as createReactBlockSpec4 } from "@blocknote/react";
|
|
3183
3388
|
|
|
3184
3389
|
// src/mantine/blocks/proposal/ProposalBlock.tsx
|
|
3185
|
-
import
|
|
3390
|
+
import React85 from "react";
|
|
3186
3391
|
|
|
3187
3392
|
// src/mantine/blocks/proposal/template/TemplateView.tsx
|
|
3188
|
-
import
|
|
3393
|
+
import React79, { useMemo as useMemo10 } from "react";
|
|
3189
3394
|
|
|
3190
3395
|
// src/mantine/blocks/proposal/template/TemplateConfig.tsx
|
|
3191
|
-
import
|
|
3192
|
-
import { Paper as Paper6, CloseButton as CloseButton4, Title as
|
|
3396
|
+
import React78, { useCallback as useCallback12 } from "react";
|
|
3397
|
+
import { Paper as Paper6, CloseButton as CloseButton4, Title as Title5 } from "@mantine/core";
|
|
3193
3398
|
|
|
3194
3399
|
// src/mantine/blocks/proposal/template/GeneralTab.tsx
|
|
3195
|
-
import
|
|
3196
|
-
import { Stack as
|
|
3400
|
+
import React43, { useEffect as useEffect8, useState as useState8 } from "react";
|
|
3401
|
+
import { Stack as Stack27, Text as Text27, TextInput as TextInput5, Textarea as Textarea2, Select as Select3, Loader as Loader3 } from "@mantine/core";
|
|
3197
3402
|
var GeneralTab3 = ({ title, description, coreAddress, onTitleChange, onDescriptionChange, onGroupChange }) => {
|
|
3198
3403
|
const handlers = useBlocknoteHandlers();
|
|
3199
3404
|
const [localTitle, setLocalTitle] = useState8(title || "");
|
|
@@ -3224,7 +3429,7 @@ var GeneralTab3 = ({ title, description, coreAddress, onTitleChange, onDescripti
|
|
|
3224
3429
|
};
|
|
3225
3430
|
fetchGroups();
|
|
3226
3431
|
}, [handlers]);
|
|
3227
|
-
return /* @__PURE__ */
|
|
3432
|
+
return /* @__PURE__ */ React43.createElement(Stack27, { gap: "lg" }, /* @__PURE__ */ React43.createElement(Stack27, { gap: "xs" }, /* @__PURE__ */ React43.createElement(Text27, { size: "sm", fw: 600 }, "Title"), /* @__PURE__ */ React43.createElement(
|
|
3228
3433
|
TextInput5,
|
|
3229
3434
|
{
|
|
3230
3435
|
placeholder: "e.g. Proposal Title",
|
|
@@ -3235,7 +3440,7 @@ var GeneralTab3 = ({ title, description, coreAddress, onTitleChange, onDescripti
|
|
|
3235
3440
|
onTitleChange(newTitle);
|
|
3236
3441
|
}
|
|
3237
3442
|
}
|
|
3238
|
-
)), /* @__PURE__ */
|
|
3443
|
+
)), /* @__PURE__ */ React43.createElement(Stack27, { gap: "xs" }, /* @__PURE__ */ React43.createElement(Text27, { size: "sm", fw: 600 }, "Description"), /* @__PURE__ */ React43.createElement(
|
|
3239
3444
|
Textarea2,
|
|
3240
3445
|
{
|
|
3241
3446
|
placeholder: "Describe what this proposal is about",
|
|
@@ -3247,7 +3452,7 @@ var GeneralTab3 = ({ title, description, coreAddress, onTitleChange, onDescripti
|
|
|
3247
3452
|
onDescriptionChange(newDescription);
|
|
3248
3453
|
}
|
|
3249
3454
|
}
|
|
3250
|
-
)), /* @__PURE__ */
|
|
3455
|
+
)), /* @__PURE__ */ React43.createElement(Stack27, { gap: "xs" }, /* @__PURE__ */ React43.createElement(Text27, { size: "sm", fw: 600 }, "Group"), /* @__PURE__ */ React43.createElement(
|
|
3251
3456
|
Select3,
|
|
3252
3457
|
{
|
|
3253
3458
|
placeholder: loadingGroups ? "Loading groups..." : "Select a DAO group",
|
|
@@ -3265,19 +3470,19 @@ var GeneralTab3 = ({ title, description, coreAddress, onTitleChange, onDescripti
|
|
|
3265
3470
|
label: group.name
|
|
3266
3471
|
})),
|
|
3267
3472
|
disabled: loadingGroups,
|
|
3268
|
-
rightSection: loadingGroups ? /* @__PURE__ */
|
|
3473
|
+
rightSection: loadingGroups ? /* @__PURE__ */ React43.createElement(Loader3, { size: "xs" }) : void 0,
|
|
3269
3474
|
searchable: true
|
|
3270
3475
|
}
|
|
3271
3476
|
)));
|
|
3272
3477
|
};
|
|
3273
3478
|
|
|
3274
3479
|
// src/mantine/blocks/proposal/template/ActionsTab.tsx
|
|
3275
|
-
import
|
|
3276
|
-
import { Card as Card13, Stack as
|
|
3480
|
+
import React76, { useCallback as useCallback11, useEffect as useEffect11, useState as useState16 } from "react";
|
|
3481
|
+
import { Card as Card13, Stack as Stack60 } from "@mantine/core";
|
|
3277
3482
|
|
|
3278
3483
|
// src/mantine/blocks/proposal/actions-components/ActionsCard.tsx
|
|
3279
|
-
import
|
|
3280
|
-
import { Card as Card6, Group as Group8, Text as
|
|
3484
|
+
import React44 from "react";
|
|
3485
|
+
import { Card as Card6, Group as Group8, Text as Text28, Badge as Badge5, Stack as Stack28, ActionIcon as ActionIcon6, ScrollArea } from "@mantine/core";
|
|
3281
3486
|
var getActionSummary = (action) => {
|
|
3282
3487
|
switch (action.type) {
|
|
3283
3488
|
case "Spend":
|
|
@@ -3309,7 +3514,7 @@ var ActionsCard = ({ actions, isSelected, onClick, onEditAction, onRemoveAction,
|
|
|
3309
3514
|
}
|
|
3310
3515
|
onClick();
|
|
3311
3516
|
};
|
|
3312
|
-
return /* @__PURE__ */
|
|
3517
|
+
return /* @__PURE__ */ React44.createElement(
|
|
3313
3518
|
Card6,
|
|
3314
3519
|
{
|
|
3315
3520
|
shadow: "sm",
|
|
@@ -3326,7 +3531,7 @@ var ActionsCard = ({ actions, isSelected, onClick, onEditAction, onRemoveAction,
|
|
|
3326
3531
|
},
|
|
3327
3532
|
onClick: handleCardClick
|
|
3328
3533
|
},
|
|
3329
|
-
/* @__PURE__ */
|
|
3534
|
+
/* @__PURE__ */ React44.createElement(Group8, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React44.createElement(Stack28, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React44.createElement(Text28, { size: "md", fw: 600, style: { color: "#f1f3f5" } }, "Proposal Actions (", actions.length, ")"), actions.length === 0 ? /* @__PURE__ */ React44.createElement(Text28, { size: "sm", style: { color: "#868e96" } }, "No actions added yet.") : /* @__PURE__ */ React44.createElement(ScrollArea, { h: actions.length > 3 ? 150 : void 0, style: { marginTop: 8 } }, /* @__PURE__ */ React44.createElement(Stack28, { gap: "xs" }, actions.map((action, index) => /* @__PURE__ */ React44.createElement(
|
|
3330
3535
|
Card6,
|
|
3331
3536
|
{
|
|
3332
3537
|
key: index,
|
|
@@ -3337,7 +3542,7 @@ var ActionsCard = ({ actions, isSelected, onClick, onEditAction, onRemoveAction,
|
|
|
3337
3542
|
borderColor: "#333"
|
|
3338
3543
|
}
|
|
3339
3544
|
},
|
|
3340
|
-
/* @__PURE__ */
|
|
3545
|
+
/* @__PURE__ */ React44.createElement(Group8, { justify: "space-between", align: "center" }, /* @__PURE__ */ React44.createElement(Group8, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React44.createElement(
|
|
3341
3546
|
Badge5,
|
|
3342
3547
|
{
|
|
3343
3548
|
size: "sm",
|
|
@@ -3348,8 +3553,8 @@ var ActionsCard = ({ actions, isSelected, onClick, onEditAction, onRemoveAction,
|
|
|
3348
3553
|
}
|
|
3349
3554
|
},
|
|
3350
3555
|
action.type
|
|
3351
|
-
), /* @__PURE__ */
|
|
3352
|
-
|
|
3556
|
+
), /* @__PURE__ */ React44.createElement(Text28, { size: "sm", style: { color: "#adb5bd" } }, getActionSummary(action))), !disabled && /* @__PURE__ */ React44.createElement(Group8, { gap: 4 }, /* @__PURE__ */ React44.createElement(
|
|
3557
|
+
ActionIcon6,
|
|
3353
3558
|
{
|
|
3354
3559
|
size: "sm",
|
|
3355
3560
|
variant: "subtle",
|
|
@@ -3361,8 +3566,8 @@ var ActionsCard = ({ actions, isSelected, onClick, onEditAction, onRemoveAction,
|
|
|
3361
3566
|
style: { color: "#4dabf7" }
|
|
3362
3567
|
},
|
|
3363
3568
|
"\u270F\uFE0F"
|
|
3364
|
-
), /* @__PURE__ */
|
|
3365
|
-
|
|
3569
|
+
), /* @__PURE__ */ React44.createElement(
|
|
3570
|
+
ActionIcon6,
|
|
3366
3571
|
{
|
|
3367
3572
|
size: "sm",
|
|
3368
3573
|
variant: "subtle",
|
|
@@ -3380,14 +3585,14 @@ var ActionsCard = ({ actions, isSelected, onClick, onEditAction, onRemoveAction,
|
|
|
3380
3585
|
};
|
|
3381
3586
|
|
|
3382
3587
|
// src/mantine/blocks/proposal/ActionsPanel.tsx
|
|
3383
|
-
import
|
|
3384
|
-
import { Stack as
|
|
3588
|
+
import React75, { useState as useState15, useEffect as useEffect10, useMemo as useMemo9 } from "react";
|
|
3589
|
+
import { Stack as Stack59, Button as Button11, Group as Group19, Text as Text36, Card as Card12, Badge as Badge8, Divider as Divider4, ScrollArea as ScrollArea3, Alert as Alert7, Tabs as Tabs2, SimpleGrid, Paper as Paper5 } from "@mantine/core";
|
|
3385
3590
|
|
|
3386
3591
|
// src/mantine/blocks/proposal/actions-components/SpendActionForm.tsx
|
|
3387
|
-
import
|
|
3388
|
-
import { TextInput as TextInput6, Stack as
|
|
3592
|
+
import React45 from "react";
|
|
3593
|
+
import { TextInput as TextInput6, Stack as Stack29 } from "@mantine/core";
|
|
3389
3594
|
var SpendActionForm = ({ data, onChange }) => {
|
|
3390
|
-
return /* @__PURE__ */
|
|
3595
|
+
return /* @__PURE__ */ React45.createElement(Stack29, null, /* @__PURE__ */ React45.createElement(
|
|
3391
3596
|
TextInput6,
|
|
3392
3597
|
{
|
|
3393
3598
|
label: "Recipient Address",
|
|
@@ -3407,7 +3612,7 @@ var SpendActionForm = ({ data, onChange }) => {
|
|
|
3407
3612
|
}
|
|
3408
3613
|
}
|
|
3409
3614
|
}
|
|
3410
|
-
), /* @__PURE__ */
|
|
3615
|
+
), /* @__PURE__ */ React45.createElement(
|
|
3411
3616
|
TextInput6,
|
|
3412
3617
|
{
|
|
3413
3618
|
label: "Denomination",
|
|
@@ -3427,7 +3632,7 @@ var SpendActionForm = ({ data, onChange }) => {
|
|
|
3427
3632
|
}
|
|
3428
3633
|
}
|
|
3429
3634
|
}
|
|
3430
|
-
), /* @__PURE__ */
|
|
3635
|
+
), /* @__PURE__ */ React45.createElement(
|
|
3431
3636
|
TextInput6,
|
|
3432
3637
|
{
|
|
3433
3638
|
label: "Amount",
|
|
@@ -3451,8 +3656,8 @@ var SpendActionForm = ({ data, onChange }) => {
|
|
|
3451
3656
|
};
|
|
3452
3657
|
|
|
3453
3658
|
// src/mantine/blocks/proposal/actions-components/UpdateMembersActionForm.tsx
|
|
3454
|
-
import
|
|
3455
|
-
import { Stack as
|
|
3659
|
+
import React46, { useState as useState9 } from "react";
|
|
3660
|
+
import { Stack as Stack30, TextInput as TextInput7, NumberInput as NumberInput2, Button as Button6, Group as Group9, Text as Text29, Card as Card7, Badge as Badge6, ActionIcon as ActionIcon7, Divider as Divider3, ScrollArea as ScrollArea2 } from "@mantine/core";
|
|
3456
3661
|
var UpdateMembersActionForm = ({ data, onChange }) => {
|
|
3457
3662
|
const [newMember, setNewMember] = useState9({ addr: "", weight: 1 });
|
|
3458
3663
|
const [newRemoveAddress, setNewRemoveAddress] = useState9("");
|
|
@@ -3495,7 +3700,7 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
|
|
|
3495
3700
|
}
|
|
3496
3701
|
}
|
|
3497
3702
|
};
|
|
3498
|
-
return /* @__PURE__ */
|
|
3703
|
+
return /* @__PURE__ */ React46.createElement(Stack30, null, /* @__PURE__ */ React46.createElement(Stack30, { gap: "xs" }, /* @__PURE__ */ React46.createElement(Text29, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Members to Add"), /* @__PURE__ */ React46.createElement(ScrollArea2, { h: 150 }, /* @__PURE__ */ React46.createElement(Stack30, { gap: "xs" }, (data.add || []).map((member, index) => /* @__PURE__ */ React46.createElement(
|
|
3499
3704
|
Card7,
|
|
3500
3705
|
{
|
|
3501
3706
|
key: index,
|
|
@@ -3506,7 +3711,7 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
|
|
|
3506
3711
|
borderColor: "#333"
|
|
3507
3712
|
}
|
|
3508
3713
|
},
|
|
3509
|
-
/* @__PURE__ */
|
|
3714
|
+
/* @__PURE__ */ React46.createElement(Group9, { justify: "space-between" }, /* @__PURE__ */ React46.createElement("div", null, /* @__PURE__ */ React46.createElement(Text29, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, member.addr.slice(0, 20), "..."), /* @__PURE__ */ React46.createElement(
|
|
3510
3715
|
Badge6,
|
|
3511
3716
|
{
|
|
3512
3717
|
size: "sm",
|
|
@@ -3517,8 +3722,8 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
|
|
|
3517
3722
|
},
|
|
3518
3723
|
"Weight: ",
|
|
3519
3724
|
member.weight
|
|
3520
|
-
)), /* @__PURE__ */
|
|
3521
|
-
)))), /* @__PURE__ */
|
|
3725
|
+
)), /* @__PURE__ */ React46.createElement(ActionIcon7, { size: "sm", variant: "subtle", onClick: () => handleRemoveMember(index), style: { color: "#ff6b6b" } }, "\u{1F5D1}\uFE0F"))
|
|
3726
|
+
)))), /* @__PURE__ */ React46.createElement(Group9, { grow: true }, /* @__PURE__ */ React46.createElement(TextInput7, { placeholder: "Member address", value: newMember.addr, onChange: (e) => setNewMember({ ...newMember, addr: e.currentTarget.value }), styles: inputStyles29 }), /* @__PURE__ */ React46.createElement(
|
|
3522
3727
|
NumberInput2,
|
|
3523
3728
|
{
|
|
3524
3729
|
placeholder: "Weight",
|
|
@@ -3527,7 +3732,7 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
|
|
|
3527
3732
|
min: 1,
|
|
3528
3733
|
styles: inputStyles29
|
|
3529
3734
|
}
|
|
3530
|
-
), /* @__PURE__ */
|
|
3735
|
+
), /* @__PURE__ */ React46.createElement(
|
|
3531
3736
|
Button6,
|
|
3532
3737
|
{
|
|
3533
3738
|
size: "sm",
|
|
@@ -3540,7 +3745,7 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
|
|
|
3540
3745
|
}
|
|
3541
3746
|
},
|
|
3542
3747
|
"\u2795 Add"
|
|
3543
|
-
))), /* @__PURE__ */
|
|
3748
|
+
))), /* @__PURE__ */ React46.createElement(Divider3, { color: "#333" }), /* @__PURE__ */ React46.createElement(Stack30, { gap: "xs" }, /* @__PURE__ */ React46.createElement(Text29, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Members to Remove"), /* @__PURE__ */ React46.createElement(ScrollArea2, { h: 100 }, /* @__PURE__ */ React46.createElement(Stack30, { gap: "xs" }, (data.remove || []).map((item, index) => /* @__PURE__ */ React46.createElement(
|
|
3544
3749
|
Card7,
|
|
3545
3750
|
{
|
|
3546
3751
|
key: index,
|
|
@@ -3551,8 +3756,8 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
|
|
|
3551
3756
|
borderColor: "#333"
|
|
3552
3757
|
}
|
|
3553
3758
|
},
|
|
3554
|
-
/* @__PURE__ */
|
|
3555
|
-
)))), /* @__PURE__ */
|
|
3759
|
+
/* @__PURE__ */ React46.createElement(Group9, { justify: "space-between" }, /* @__PURE__ */ React46.createElement(Text29, { size: "sm", style: { color: "#adb5bd" } }, item.addr.slice(0, 30), "..."), /* @__PURE__ */ React46.createElement(ActionIcon7, { size: "sm", variant: "subtle", onClick: () => handleRemoveRemoveAddress(index), style: { color: "#ff6b6b" } }, "\u{1F5D1}\uFE0F"))
|
|
3760
|
+
)))), /* @__PURE__ */ React46.createElement(Group9, { grow: true }, /* @__PURE__ */ React46.createElement(TextInput7, { placeholder: "Address to remove", value: newRemoveAddress, onChange: (e) => setNewRemoveAddress(e.currentTarget.value), styles: inputStyles29 }), /* @__PURE__ */ React46.createElement(
|
|
3556
3761
|
Button6,
|
|
3557
3762
|
{
|
|
3558
3763
|
size: "sm",
|
|
@@ -3569,8 +3774,8 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
|
|
|
3569
3774
|
};
|
|
3570
3775
|
|
|
3571
3776
|
// src/mantine/blocks/proposal/actions-components/StakeActionForm.tsx
|
|
3572
|
-
import
|
|
3573
|
-
import { Stack as
|
|
3777
|
+
import React47 from "react";
|
|
3778
|
+
import { Stack as Stack31, TextInput as TextInput8, Select as Select4, NumberInput as NumberInput3 } from "@mantine/core";
|
|
3574
3779
|
var stakeTypeOptions = [
|
|
3575
3780
|
{ value: StakeType.Delegate, label: "Delegate" },
|
|
3576
3781
|
{ value: StakeType.Undelegate, label: "Undelegate" },
|
|
@@ -3615,7 +3820,7 @@ var selectStyles = {
|
|
|
3615
3820
|
var StakeActionForm = ({ data, onChange }) => {
|
|
3616
3821
|
const isRedelegate = data.stakeType === StakeType.Redelegate;
|
|
3617
3822
|
const needsAmount = data.stakeType !== StakeType.WithdrawDelegatorReward;
|
|
3618
|
-
return /* @__PURE__ */
|
|
3823
|
+
return /* @__PURE__ */ React47.createElement(Stack31, { gap: "md" }, /* @__PURE__ */ React47.createElement(
|
|
3619
3824
|
Select4,
|
|
3620
3825
|
{
|
|
3621
3826
|
label: "Stake Type",
|
|
@@ -3625,7 +3830,7 @@ var StakeActionForm = ({ data, onChange }) => {
|
|
|
3625
3830
|
required: true,
|
|
3626
3831
|
styles: selectStyles
|
|
3627
3832
|
}
|
|
3628
|
-
), /* @__PURE__ */
|
|
3833
|
+
), /* @__PURE__ */ React47.createElement(
|
|
3629
3834
|
TextInput8,
|
|
3630
3835
|
{
|
|
3631
3836
|
label: "Validator Address",
|
|
@@ -3635,7 +3840,7 @@ var StakeActionForm = ({ data, onChange }) => {
|
|
|
3635
3840
|
required: true,
|
|
3636
3841
|
styles: inputStyles
|
|
3637
3842
|
}
|
|
3638
|
-
), isRedelegate && /* @__PURE__ */
|
|
3843
|
+
), isRedelegate && /* @__PURE__ */ React47.createElement(
|
|
3639
3844
|
TextInput8,
|
|
3640
3845
|
{
|
|
3641
3846
|
label: "Destination Validator Address",
|
|
@@ -3645,7 +3850,7 @@ var StakeActionForm = ({ data, onChange }) => {
|
|
|
3645
3850
|
required: true,
|
|
3646
3851
|
styles: inputStyles
|
|
3647
3852
|
}
|
|
3648
|
-
), needsAmount && /* @__PURE__ */
|
|
3853
|
+
), needsAmount && /* @__PURE__ */ React47.createElement(React47.Fragment, null, /* @__PURE__ */ React47.createElement(
|
|
3649
3854
|
NumberInput3,
|
|
3650
3855
|
{
|
|
3651
3856
|
label: "Amount",
|
|
@@ -3657,7 +3862,7 @@ var StakeActionForm = ({ data, onChange }) => {
|
|
|
3657
3862
|
required: true,
|
|
3658
3863
|
styles: inputStyles
|
|
3659
3864
|
}
|
|
3660
|
-
), /* @__PURE__ */
|
|
3865
|
+
), /* @__PURE__ */ React47.createElement(
|
|
3661
3866
|
Select4,
|
|
3662
3867
|
{
|
|
3663
3868
|
label: "Denomination",
|
|
@@ -3674,8 +3879,8 @@ var StakeActionForm = ({ data, onChange }) => {
|
|
|
3674
3879
|
};
|
|
3675
3880
|
|
|
3676
3881
|
// src/mantine/blocks/proposal/actions-components/JoinActionForm.tsx
|
|
3677
|
-
import
|
|
3678
|
-
import { Stack as
|
|
3882
|
+
import React48 from "react";
|
|
3883
|
+
import { Stack as Stack32, TextInput as TextInput9 } from "@mantine/core";
|
|
3679
3884
|
var inputStyles2 = {
|
|
3680
3885
|
label: { color: "#adb5bd" },
|
|
3681
3886
|
input: {
|
|
@@ -3688,7 +3893,7 @@ var inputStyles2 = {
|
|
|
3688
3893
|
}
|
|
3689
3894
|
};
|
|
3690
3895
|
var JoinActionForm = ({ data, onChange }) => {
|
|
3691
|
-
return /* @__PURE__ */
|
|
3896
|
+
return /* @__PURE__ */ React48.createElement(Stack32, { gap: "md" }, /* @__PURE__ */ React48.createElement(TextInput9, { label: "ID", placeholder: "did:ixo:entity:abc123...", value: data.id, onChange: (e) => onChange({ ...data, id: e.target.value }), required: true, styles: inputStyles2 }), /* @__PURE__ */ React48.createElement(
|
|
3692
3897
|
TextInput9,
|
|
3693
3898
|
{
|
|
3694
3899
|
label: "Core Address",
|
|
@@ -3698,12 +3903,12 @@ var JoinActionForm = ({ data, onChange }) => {
|
|
|
3698
3903
|
required: true,
|
|
3699
3904
|
styles: inputStyles2
|
|
3700
3905
|
}
|
|
3701
|
-
), /* @__PURE__ */
|
|
3906
|
+
), /* @__PURE__ */ React48.createElement(TextInput9, { label: "Address", placeholder: "ixo1...", value: data.address, onChange: (e) => onChange({ ...data, address: e.target.value }), required: true, styles: inputStyles2 }));
|
|
3702
3907
|
};
|
|
3703
3908
|
|
|
3704
3909
|
// src/mantine/blocks/proposal/actions-components/forms/MintActionForm.tsx
|
|
3705
|
-
import
|
|
3706
|
-
import { Stack as
|
|
3910
|
+
import React49 from "react";
|
|
3911
|
+
import { Stack as Stack33, TextInput as TextInput10, NumberInput as NumberInput4 } from "@mantine/core";
|
|
3707
3912
|
var inputStyles3 = {
|
|
3708
3913
|
label: { color: "#adb5bd" },
|
|
3709
3914
|
input: {
|
|
@@ -3716,7 +3921,7 @@ var inputStyles3 = {
|
|
|
3716
3921
|
}
|
|
3717
3922
|
};
|
|
3718
3923
|
var MintActionForm = ({ data, onChange }) => {
|
|
3719
|
-
return /* @__PURE__ */
|
|
3924
|
+
return /* @__PURE__ */ React49.createElement(Stack33, { gap: "md" }, /* @__PURE__ */ React49.createElement(TextInput10, { label: "Recipient Address", placeholder: "ixo1...", value: data.to, onChange: (e) => onChange({ ...data, to: e.currentTarget.value }), required: true, styles: inputStyles3 }), /* @__PURE__ */ React49.createElement(
|
|
3720
3925
|
NumberInput4,
|
|
3721
3926
|
{
|
|
3722
3927
|
label: "Amount",
|
|
@@ -3732,8 +3937,8 @@ var MintActionForm = ({ data, onChange }) => {
|
|
|
3732
3937
|
};
|
|
3733
3938
|
|
|
3734
3939
|
// src/mantine/blocks/proposal/actions-components/forms/ExecuteActionForm.tsx
|
|
3735
|
-
import
|
|
3736
|
-
import { Stack as
|
|
3940
|
+
import React50, { useState as useState10 } from "react";
|
|
3941
|
+
import { Stack as Stack34, TextInput as TextInput11, Textarea as Textarea3, Button as Button7, Group as Group10, Text as Text30, Card as Card8 } from "@mantine/core";
|
|
3737
3942
|
var inputStyles4 = {
|
|
3738
3943
|
label: { color: "#adb5bd" },
|
|
3739
3944
|
input: {
|
|
@@ -3770,7 +3975,7 @@ var ExecuteActionForm = ({ data, onChange }) => {
|
|
|
3770
3975
|
return data.message;
|
|
3771
3976
|
}
|
|
3772
3977
|
};
|
|
3773
|
-
return /* @__PURE__ */
|
|
3978
|
+
return /* @__PURE__ */ React50.createElement(Stack34, { gap: "md" }, /* @__PURE__ */ React50.createElement(
|
|
3774
3979
|
TextInput11,
|
|
3775
3980
|
{
|
|
3776
3981
|
label: "Contract Address",
|
|
@@ -3780,7 +3985,7 @@ var ExecuteActionForm = ({ data, onChange }) => {
|
|
|
3780
3985
|
required: true,
|
|
3781
3986
|
styles: inputStyles4
|
|
3782
3987
|
}
|
|
3783
|
-
), /* @__PURE__ */
|
|
3988
|
+
), /* @__PURE__ */ React50.createElement(
|
|
3784
3989
|
Textarea3,
|
|
3785
3990
|
{
|
|
3786
3991
|
label: "Message (JSON)",
|
|
@@ -3791,7 +3996,7 @@ var ExecuteActionForm = ({ data, onChange }) => {
|
|
|
3791
3996
|
required: true,
|
|
3792
3997
|
styles: inputStyles4
|
|
3793
3998
|
}
|
|
3794
|
-
), /* @__PURE__ */
|
|
3999
|
+
), /* @__PURE__ */ React50.createElement(Stack34, { gap: "xs" }, /* @__PURE__ */ React50.createElement(Text30, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Funds (Optional)"), (data.funds || []).map((fund, index) => /* @__PURE__ */ React50.createElement(Card8, { key: index, withBorder: true, padding: "xs", style: { backgroundColor: "#2a2a2a", borderColor: "#333" } }, /* @__PURE__ */ React50.createElement(Group10, { justify: "space-between" }, /* @__PURE__ */ React50.createElement(Text30, { size: "sm", style: { color: "#f1f3f5" } }, fund.amount, " ", fund.denom), /* @__PURE__ */ React50.createElement(Button7, { size: "xs", variant: "subtle", onClick: () => handleRemoveFund(index), style: { color: "#ff6b6b" } }, "Remove")))), /* @__PURE__ */ React50.createElement(Group10, { grow: true }, /* @__PURE__ */ React50.createElement(TextInput11, { placeholder: "Amount", value: newFund.amount, onChange: (e) => setNewFund({ ...newFund, amount: e.currentTarget.value }), styles: inputStyles4 }), /* @__PURE__ */ React50.createElement(TextInput11, { placeholder: "Denom (e.g., uixo)", value: newFund.denom, onChange: (e) => setNewFund({ ...newFund, denom: e.currentTarget.value }), styles: inputStyles4 }), /* @__PURE__ */ React50.createElement(
|
|
3795
4000
|
Button7,
|
|
3796
4001
|
{
|
|
3797
4002
|
size: "sm",
|
|
@@ -3806,8 +4011,8 @@ var ExecuteActionForm = ({ data, onChange }) => {
|
|
|
3806
4011
|
};
|
|
3807
4012
|
|
|
3808
4013
|
// src/mantine/blocks/proposal/actions-components/forms/CustomActionForm.tsx
|
|
3809
|
-
import
|
|
3810
|
-
import { Stack as
|
|
4014
|
+
import React51, { useState as useState11, useEffect as useEffect9 } from "react";
|
|
4015
|
+
import { Stack as Stack35, Textarea as Textarea4, Alert as Alert5, Text as Text31, Badge as Badge7 } from "@mantine/core";
|
|
3811
4016
|
import { Group as Group11 } from "@mantine/core";
|
|
3812
4017
|
var inputStyles5 = {
|
|
3813
4018
|
label: { color: "#adb5bd" },
|
|
@@ -3844,7 +4049,7 @@ var CustomActionForm = ({ data, onChange }) => {
|
|
|
3844
4049
|
return data.message;
|
|
3845
4050
|
}
|
|
3846
4051
|
};
|
|
3847
|
-
return /* @__PURE__ */
|
|
4052
|
+
return /* @__PURE__ */ React51.createElement(Stack35, { gap: "md" }, /* @__PURE__ */ React51.createElement(Alert5, { color: "yellow", style: { backgroundColor: "#2a2a2a", borderColor: "#ffd43b" } }, /* @__PURE__ */ React51.createElement(Text31, { size: "sm", style: { color: "#ffd43b" } }, "\u26A0\uFE0F Custom actions require valid JSON messages. Supports both Wasm and Stargate message formats.")), /* @__PURE__ */ React51.createElement("div", null, /* @__PURE__ */ React51.createElement(Group11, { gap: "xs", mb: "xs" }, /* @__PURE__ */ React51.createElement(Text31, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Custom Message (JSON)"), /* @__PURE__ */ React51.createElement(
|
|
3848
4053
|
Badge7,
|
|
3849
4054
|
{
|
|
3850
4055
|
size: "sm",
|
|
@@ -3854,7 +4059,7 @@ var CustomActionForm = ({ data, onChange }) => {
|
|
|
3854
4059
|
}
|
|
3855
4060
|
},
|
|
3856
4061
|
isValid ? "Valid JSON" : "Invalid JSON"
|
|
3857
|
-
)), /* @__PURE__ */
|
|
4062
|
+
)), /* @__PURE__ */ React51.createElement(
|
|
3858
4063
|
Textarea4,
|
|
3859
4064
|
{
|
|
3860
4065
|
placeholder: `Example Wasm message:
|
|
@@ -3887,8 +4092,8 @@ Example Stargate message:
|
|
|
3887
4092
|
};
|
|
3888
4093
|
|
|
3889
4094
|
// src/mantine/blocks/proposal/actions-components/forms/AuthzExecActionForm.tsx
|
|
3890
|
-
import
|
|
3891
|
-
import { Stack as
|
|
4095
|
+
import React52 from "react";
|
|
4096
|
+
import { Stack as Stack36, Select as Select5, TextInput as TextInput12, Textarea as Textarea5 } from "@mantine/core";
|
|
3892
4097
|
var inputStyles6 = {
|
|
3893
4098
|
label: { color: "#adb5bd" },
|
|
3894
4099
|
input: {
|
|
@@ -3923,7 +4128,7 @@ var AuthzExecActionForm = ({ data, onChange }) => {
|
|
|
3923
4128
|
onChange({ ...data, [field]: value });
|
|
3924
4129
|
}
|
|
3925
4130
|
};
|
|
3926
|
-
return /* @__PURE__ */
|
|
4131
|
+
return /* @__PURE__ */ React52.createElement(Stack36, { gap: "md" }, /* @__PURE__ */ React52.createElement(
|
|
3927
4132
|
Select5,
|
|
3928
4133
|
{
|
|
3929
4134
|
label: "Action Type",
|
|
@@ -3934,7 +4139,7 @@ var AuthzExecActionForm = ({ data, onChange }) => {
|
|
|
3934
4139
|
required: true,
|
|
3935
4140
|
styles: inputStyles6
|
|
3936
4141
|
}
|
|
3937
|
-
), data.authzExecActionType === AuthzExecActionTypes.Delegate && /* @__PURE__ */
|
|
4142
|
+
), data.authzExecActionType === AuthzExecActionTypes.Delegate && /* @__PURE__ */ React52.createElement(
|
|
3938
4143
|
Textarea5,
|
|
3939
4144
|
{
|
|
3940
4145
|
label: "Delegate Message (JSON)",
|
|
@@ -3944,7 +4149,7 @@ var AuthzExecActionForm = ({ data, onChange }) => {
|
|
|
3944
4149
|
minRows: 4,
|
|
3945
4150
|
styles: inputStyles6
|
|
3946
4151
|
}
|
|
3947
|
-
), data.authzExecActionType === AuthzExecActionTypes.Undelegate && /* @__PURE__ */
|
|
4152
|
+
), data.authzExecActionType === AuthzExecActionTypes.Undelegate && /* @__PURE__ */ React52.createElement(
|
|
3948
4153
|
Textarea5,
|
|
3949
4154
|
{
|
|
3950
4155
|
label: "Undelegate Message (JSON)",
|
|
@@ -3954,7 +4159,7 @@ var AuthzExecActionForm = ({ data, onChange }) => {
|
|
|
3954
4159
|
minRows: 4,
|
|
3955
4160
|
styles: inputStyles6
|
|
3956
4161
|
}
|
|
3957
|
-
), data.authzExecActionType === AuthzExecActionTypes.Redelegate && /* @__PURE__ */
|
|
4162
|
+
), data.authzExecActionType === AuthzExecActionTypes.Redelegate && /* @__PURE__ */ React52.createElement(
|
|
3958
4163
|
Textarea5,
|
|
3959
4164
|
{
|
|
3960
4165
|
label: "Redelegate Message (JSON)",
|
|
@@ -3964,7 +4169,7 @@ var AuthzExecActionForm = ({ data, onChange }) => {
|
|
|
3964
4169
|
minRows: 4,
|
|
3965
4170
|
styles: inputStyles6
|
|
3966
4171
|
}
|
|
3967
|
-
), data.authzExecActionType === AuthzExecActionTypes.ClaimRewards && /* @__PURE__ */
|
|
4172
|
+
), data.authzExecActionType === AuthzExecActionTypes.ClaimRewards && /* @__PURE__ */ React52.createElement(
|
|
3968
4173
|
Textarea5,
|
|
3969
4174
|
{
|
|
3970
4175
|
label: "Claim Rewards Message (JSON)",
|
|
@@ -3974,7 +4179,7 @@ var AuthzExecActionForm = ({ data, onChange }) => {
|
|
|
3974
4179
|
minRows: 3,
|
|
3975
4180
|
styles: inputStyles6
|
|
3976
4181
|
}
|
|
3977
|
-
), data.authzExecActionType === AuthzExecActionTypes.Custom && /* @__PURE__ */
|
|
4182
|
+
), data.authzExecActionType === AuthzExecActionTypes.Custom && /* @__PURE__ */ React52.createElement(
|
|
3978
4183
|
TextInput12,
|
|
3979
4184
|
{
|
|
3980
4185
|
label: "Custom Message",
|
|
@@ -3987,8 +4192,8 @@ var AuthzExecActionForm = ({ data, onChange }) => {
|
|
|
3987
4192
|
};
|
|
3988
4193
|
|
|
3989
4194
|
// src/mantine/blocks/proposal/actions-components/forms/AuthzGrantActionForm.tsx
|
|
3990
|
-
import
|
|
3991
|
-
import { Stack as
|
|
4195
|
+
import React53 from "react";
|
|
4196
|
+
import { Stack as Stack37, TextInput as TextInput13 } from "@mantine/core";
|
|
3992
4197
|
var inputStyles7 = {
|
|
3993
4198
|
label: { color: "#adb5bd" },
|
|
3994
4199
|
input: {
|
|
@@ -4001,7 +4206,7 @@ var inputStyles7 = {
|
|
|
4001
4206
|
}
|
|
4002
4207
|
};
|
|
4003
4208
|
var AuthzGrantActionForm = ({ data, onChange }) => {
|
|
4004
|
-
return /* @__PURE__ */
|
|
4209
|
+
return /* @__PURE__ */ React53.createElement(Stack37, { gap: "md" }, /* @__PURE__ */ React53.createElement(
|
|
4005
4210
|
TextInput13,
|
|
4006
4211
|
{
|
|
4007
4212
|
label: "Type URL",
|
|
@@ -4011,7 +4216,7 @@ var AuthzGrantActionForm = ({ data, onChange }) => {
|
|
|
4011
4216
|
required: true,
|
|
4012
4217
|
styles: inputStyles7
|
|
4013
4218
|
}
|
|
4014
|
-
), /* @__PURE__ */
|
|
4219
|
+
), /* @__PURE__ */ React53.createElement(
|
|
4015
4220
|
TextInput13,
|
|
4016
4221
|
{
|
|
4017
4222
|
label: "Grantee Address",
|
|
@@ -4024,7 +4229,7 @@ var AuthzGrantActionForm = ({ data, onChange }) => {
|
|
|
4024
4229
|
required: true,
|
|
4025
4230
|
styles: inputStyles7
|
|
4026
4231
|
}
|
|
4027
|
-
), /* @__PURE__ */
|
|
4232
|
+
), /* @__PURE__ */ React53.createElement(
|
|
4028
4233
|
TextInput13,
|
|
4029
4234
|
{
|
|
4030
4235
|
label: "Message Type URL",
|
|
@@ -4041,8 +4246,8 @@ var AuthzGrantActionForm = ({ data, onChange }) => {
|
|
|
4041
4246
|
};
|
|
4042
4247
|
|
|
4043
4248
|
// src/mantine/blocks/proposal/actions-components/forms/BurnNftActionForm.tsx
|
|
4044
|
-
import
|
|
4045
|
-
import { Stack as
|
|
4249
|
+
import React54 from "react";
|
|
4250
|
+
import { Stack as Stack38, TextInput as TextInput14 } from "@mantine/core";
|
|
4046
4251
|
var inputStyles8 = {
|
|
4047
4252
|
label: { color: "#adb5bd" },
|
|
4048
4253
|
input: {
|
|
@@ -4055,7 +4260,7 @@ var inputStyles8 = {
|
|
|
4055
4260
|
}
|
|
4056
4261
|
};
|
|
4057
4262
|
var BurnNftActionForm = ({ data, onChange }) => {
|
|
4058
|
-
return /* @__PURE__ */
|
|
4263
|
+
return /* @__PURE__ */ React54.createElement(Stack38, { gap: "md" }, /* @__PURE__ */ React54.createElement(
|
|
4059
4264
|
TextInput14,
|
|
4060
4265
|
{
|
|
4061
4266
|
label: "Collection Address",
|
|
@@ -4065,12 +4270,12 @@ var BurnNftActionForm = ({ data, onChange }) => {
|
|
|
4065
4270
|
required: true,
|
|
4066
4271
|
styles: inputStyles8
|
|
4067
4272
|
}
|
|
4068
|
-
), /* @__PURE__ */
|
|
4273
|
+
), /* @__PURE__ */ React54.createElement(TextInput14, { label: "Token ID", placeholder: "1", value: data.tokenId, onChange: (e) => onChange({ ...data, tokenId: e.currentTarget.value }), required: true, styles: inputStyles8 }));
|
|
4069
4274
|
};
|
|
4070
4275
|
|
|
4071
4276
|
// src/mantine/blocks/proposal/actions-components/forms/TransferNftActionForm.tsx
|
|
4072
|
-
import
|
|
4073
|
-
import { Stack as
|
|
4277
|
+
import React55 from "react";
|
|
4278
|
+
import { Stack as Stack39, TextInput as TextInput15, Checkbox as Checkbox4, Textarea as Textarea6 } from "@mantine/core";
|
|
4074
4279
|
var inputStyles9 = {
|
|
4075
4280
|
label: { color: "#adb5bd" },
|
|
4076
4281
|
input: {
|
|
@@ -4083,7 +4288,7 @@ var inputStyles9 = {
|
|
|
4083
4288
|
}
|
|
4084
4289
|
};
|
|
4085
4290
|
var TransferNftActionForm = ({ data, onChange }) => {
|
|
4086
|
-
return /* @__PURE__ */
|
|
4291
|
+
return /* @__PURE__ */ React55.createElement(Stack39, { gap: "md" }, /* @__PURE__ */ React55.createElement(
|
|
4087
4292
|
TextInput15,
|
|
4088
4293
|
{
|
|
4089
4294
|
label: "Collection Address",
|
|
@@ -4093,7 +4298,7 @@ var TransferNftActionForm = ({ data, onChange }) => {
|
|
|
4093
4298
|
required: true,
|
|
4094
4299
|
styles: inputStyles9
|
|
4095
4300
|
}
|
|
4096
|
-
), /* @__PURE__ */
|
|
4301
|
+
), /* @__PURE__ */ React55.createElement(TextInput15, { label: "Token ID", placeholder: "1", value: data.tokenId, onChange: (e) => onChange({ ...data, tokenId: e.currentTarget.value }), required: true, styles: inputStyles9 }), /* @__PURE__ */ React55.createElement(
|
|
4097
4302
|
TextInput15,
|
|
4098
4303
|
{
|
|
4099
4304
|
label: "Recipient Address",
|
|
@@ -4103,7 +4308,7 @@ var TransferNftActionForm = ({ data, onChange }) => {
|
|
|
4103
4308
|
required: true,
|
|
4104
4309
|
styles: inputStyles9
|
|
4105
4310
|
}
|
|
4106
|
-
), /* @__PURE__ */
|
|
4311
|
+
), /* @__PURE__ */ React55.createElement(
|
|
4107
4312
|
Checkbox4,
|
|
4108
4313
|
{
|
|
4109
4314
|
label: "Execute Smart Contract",
|
|
@@ -4114,7 +4319,7 @@ var TransferNftActionForm = ({ data, onChange }) => {
|
|
|
4114
4319
|
input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
4115
4320
|
}
|
|
4116
4321
|
}
|
|
4117
|
-
), data.executeSmartContract && /* @__PURE__ */
|
|
4322
|
+
), data.executeSmartContract && /* @__PURE__ */ React55.createElement(
|
|
4118
4323
|
Textarea6,
|
|
4119
4324
|
{
|
|
4120
4325
|
label: "Smart Contract Message (JSON)",
|
|
@@ -4128,8 +4333,8 @@ var TransferNftActionForm = ({ data, onChange }) => {
|
|
|
4128
4333
|
};
|
|
4129
4334
|
|
|
4130
4335
|
// src/mantine/blocks/proposal/actions-components/forms/ManageCw721ActionForm.tsx
|
|
4131
|
-
import
|
|
4132
|
-
import { Stack as
|
|
4336
|
+
import React56 from "react";
|
|
4337
|
+
import { Stack as Stack40, TextInput as TextInput16, Radio, Group as Group12 } from "@mantine/core";
|
|
4133
4338
|
var inputStyles10 = {
|
|
4134
4339
|
label: { color: "#adb5bd" },
|
|
4135
4340
|
input: {
|
|
@@ -4142,7 +4347,7 @@ var inputStyles10 = {
|
|
|
4142
4347
|
}
|
|
4143
4348
|
};
|
|
4144
4349
|
var ManageCw721ActionForm = ({ data, onChange }) => {
|
|
4145
|
-
return /* @__PURE__ */
|
|
4350
|
+
return /* @__PURE__ */ React56.createElement(Stack40, { gap: "md" }, /* @__PURE__ */ React56.createElement(Radio.Group, { label: "Action", value: data.adding ? "add" : "remove", onChange: (value) => onChange({ ...data, adding: value === "add" }) }, /* @__PURE__ */ React56.createElement(Group12, { mt: "xs" }, /* @__PURE__ */ React56.createElement(
|
|
4146
4351
|
Radio,
|
|
4147
4352
|
{
|
|
4148
4353
|
value: "add",
|
|
@@ -4152,7 +4357,7 @@ var ManageCw721ActionForm = ({ data, onChange }) => {
|
|
|
4152
4357
|
radio: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
4153
4358
|
}
|
|
4154
4359
|
}
|
|
4155
|
-
), /* @__PURE__ */
|
|
4360
|
+
), /* @__PURE__ */ React56.createElement(
|
|
4156
4361
|
Radio,
|
|
4157
4362
|
{
|
|
4158
4363
|
value: "remove",
|
|
@@ -4162,7 +4367,7 @@ var ManageCw721ActionForm = ({ data, onChange }) => {
|
|
|
4162
4367
|
radio: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
4163
4368
|
}
|
|
4164
4369
|
}
|
|
4165
|
-
))), /* @__PURE__ */
|
|
4370
|
+
))), /* @__PURE__ */ React56.createElement(
|
|
4166
4371
|
TextInput16,
|
|
4167
4372
|
{
|
|
4168
4373
|
label: "NFT Contract Address",
|
|
@@ -4176,8 +4381,8 @@ var ManageCw721ActionForm = ({ data, onChange }) => {
|
|
|
4176
4381
|
};
|
|
4177
4382
|
|
|
4178
4383
|
// src/mantine/blocks/proposal/actions-components/forms/InstantiateActionForm.tsx
|
|
4179
|
-
import
|
|
4180
|
-
import { Stack as
|
|
4384
|
+
import React57, { useState as useState12 } from "react";
|
|
4385
|
+
import { Stack as Stack41, TextInput as TextInput17, Textarea as Textarea7, NumberInput as NumberInput5, Button as Button8, Group as Group13, Text as Text32, Card as Card9 } from "@mantine/core";
|
|
4181
4386
|
var inputStyles11 = {
|
|
4182
4387
|
label: { color: "#adb5bd" },
|
|
4183
4388
|
input: {
|
|
@@ -4214,7 +4419,7 @@ var InstantiateActionForm = ({ data, onChange }) => {
|
|
|
4214
4419
|
return data.message;
|
|
4215
4420
|
}
|
|
4216
4421
|
};
|
|
4217
|
-
return /* @__PURE__ */
|
|
4422
|
+
return /* @__PURE__ */ React57.createElement(Stack41, { gap: "md" }, /* @__PURE__ */ React57.createElement(
|
|
4218
4423
|
TextInput17,
|
|
4219
4424
|
{
|
|
4220
4425
|
label: "Admin Address",
|
|
@@ -4224,7 +4429,7 @@ var InstantiateActionForm = ({ data, onChange }) => {
|
|
|
4224
4429
|
required: true,
|
|
4225
4430
|
styles: inputStyles11
|
|
4226
4431
|
}
|
|
4227
|
-
), /* @__PURE__ */
|
|
4432
|
+
), /* @__PURE__ */ React57.createElement(
|
|
4228
4433
|
NumberInput5,
|
|
4229
4434
|
{
|
|
4230
4435
|
label: "Code ID",
|
|
@@ -4235,7 +4440,7 @@ var InstantiateActionForm = ({ data, onChange }) => {
|
|
|
4235
4440
|
required: true,
|
|
4236
4441
|
styles: inputStyles11
|
|
4237
4442
|
}
|
|
4238
|
-
), /* @__PURE__ */
|
|
4443
|
+
), /* @__PURE__ */ React57.createElement(TextInput17, { label: "Label", placeholder: "My Contract", value: data.label, onChange: (e) => onChange({ ...data, label: e.currentTarget.value }), required: true, styles: inputStyles11 }), /* @__PURE__ */ React57.createElement(
|
|
4239
4444
|
Textarea7,
|
|
4240
4445
|
{
|
|
4241
4446
|
label: "Instantiate Message (JSON)",
|
|
@@ -4246,7 +4451,7 @@ var InstantiateActionForm = ({ data, onChange }) => {
|
|
|
4246
4451
|
required: true,
|
|
4247
4452
|
styles: inputStyles11
|
|
4248
4453
|
}
|
|
4249
|
-
), /* @__PURE__ */
|
|
4454
|
+
), /* @__PURE__ */ React57.createElement(Stack41, { gap: "xs" }, /* @__PURE__ */ React57.createElement(Text32, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Funds (Optional)"), (data.funds || []).map((fund, index) => /* @__PURE__ */ React57.createElement(Card9, { key: index, withBorder: true, padding: "xs", style: { backgroundColor: "#2a2a2a", borderColor: "#333" } }, /* @__PURE__ */ React57.createElement(Group13, { justify: "space-between" }, /* @__PURE__ */ React57.createElement(Text32, { size: "sm", style: { color: "#f1f3f5" } }, fund.amount, " ", fund.denom), /* @__PURE__ */ React57.createElement(Button8, { size: "xs", variant: "subtle", onClick: () => handleRemoveFund(index), style: { color: "#ff6b6b" } }, "Remove")))), /* @__PURE__ */ React57.createElement(Group13, { grow: true }, /* @__PURE__ */ React57.createElement(TextInput17, { placeholder: "Amount", value: newFund.amount, onChange: (e) => setNewFund({ ...newFund, amount: e.currentTarget.value }), styles: inputStyles11 }), /* @__PURE__ */ React57.createElement(TextInput17, { placeholder: "Denom (e.g., uixo)", value: newFund.denom, onChange: (e) => setNewFund({ ...newFund, denom: e.currentTarget.value }), styles: inputStyles11 }), /* @__PURE__ */ React57.createElement(
|
|
4250
4455
|
Button8,
|
|
4251
4456
|
{
|
|
4252
4457
|
size: "sm",
|
|
@@ -4261,8 +4466,8 @@ var InstantiateActionForm = ({ data, onChange }) => {
|
|
|
4261
4466
|
};
|
|
4262
4467
|
|
|
4263
4468
|
// src/mantine/blocks/proposal/actions-components/forms/MigrateActionForm.tsx
|
|
4264
|
-
import
|
|
4265
|
-
import { Stack as
|
|
4469
|
+
import React58 from "react";
|
|
4470
|
+
import { Stack as Stack42, TextInput as TextInput18, Textarea as Textarea8, NumberInput as NumberInput6 } from "@mantine/core";
|
|
4266
4471
|
var inputStyles12 = {
|
|
4267
4472
|
label: { color: "#adb5bd" },
|
|
4268
4473
|
input: {
|
|
@@ -4283,7 +4488,7 @@ var MigrateActionForm = ({ data, onChange }) => {
|
|
|
4283
4488
|
return data.msg;
|
|
4284
4489
|
}
|
|
4285
4490
|
};
|
|
4286
|
-
return /* @__PURE__ */
|
|
4491
|
+
return /* @__PURE__ */ React58.createElement(Stack42, { gap: "md" }, /* @__PURE__ */ React58.createElement(
|
|
4287
4492
|
TextInput18,
|
|
4288
4493
|
{
|
|
4289
4494
|
label: "Contract Address",
|
|
@@ -4293,7 +4498,7 @@ var MigrateActionForm = ({ data, onChange }) => {
|
|
|
4293
4498
|
required: true,
|
|
4294
4499
|
styles: inputStyles12
|
|
4295
4500
|
}
|
|
4296
|
-
), /* @__PURE__ */
|
|
4501
|
+
), /* @__PURE__ */ React58.createElement(
|
|
4297
4502
|
NumberInput6,
|
|
4298
4503
|
{
|
|
4299
4504
|
label: "New Code ID",
|
|
@@ -4304,7 +4509,7 @@ var MigrateActionForm = ({ data, onChange }) => {
|
|
|
4304
4509
|
required: true,
|
|
4305
4510
|
styles: inputStyles12
|
|
4306
4511
|
}
|
|
4307
|
-
), /* @__PURE__ */
|
|
4512
|
+
), /* @__PURE__ */ React58.createElement(
|
|
4308
4513
|
Textarea8,
|
|
4309
4514
|
{
|
|
4310
4515
|
label: "Migration Message (JSON)",
|
|
@@ -4319,8 +4524,8 @@ var MigrateActionForm = ({ data, onChange }) => {
|
|
|
4319
4524
|
};
|
|
4320
4525
|
|
|
4321
4526
|
// src/mantine/blocks/proposal/actions-components/forms/UpdateAdminActionForm.tsx
|
|
4322
|
-
import
|
|
4323
|
-
import { Stack as
|
|
4527
|
+
import React59 from "react";
|
|
4528
|
+
import { Stack as Stack43, TextInput as TextInput19 } from "@mantine/core";
|
|
4324
4529
|
var inputStyles13 = {
|
|
4325
4530
|
label: { color: "#adb5bd" },
|
|
4326
4531
|
input: {
|
|
@@ -4333,7 +4538,7 @@ var inputStyles13 = {
|
|
|
4333
4538
|
}
|
|
4334
4539
|
};
|
|
4335
4540
|
var UpdateAdminActionForm = ({ data, onChange }) => {
|
|
4336
|
-
return /* @__PURE__ */
|
|
4541
|
+
return /* @__PURE__ */ React59.createElement(Stack43, { gap: "md" }, /* @__PURE__ */ React59.createElement(
|
|
4337
4542
|
TextInput19,
|
|
4338
4543
|
{
|
|
4339
4544
|
label: "Contract Address",
|
|
@@ -4343,7 +4548,7 @@ var UpdateAdminActionForm = ({ data, onChange }) => {
|
|
|
4343
4548
|
required: true,
|
|
4344
4549
|
styles: inputStyles13
|
|
4345
4550
|
}
|
|
4346
|
-
), /* @__PURE__ */
|
|
4551
|
+
), /* @__PURE__ */ React59.createElement(
|
|
4347
4552
|
TextInput19,
|
|
4348
4553
|
{
|
|
4349
4554
|
label: "New Admin Address",
|
|
@@ -4357,8 +4562,8 @@ var UpdateAdminActionForm = ({ data, onChange }) => {
|
|
|
4357
4562
|
};
|
|
4358
4563
|
|
|
4359
4564
|
// src/mantine/blocks/proposal/actions-components/forms/ManageCw20ActionForm.tsx
|
|
4360
|
-
import
|
|
4361
|
-
import { Stack as
|
|
4565
|
+
import React60 from "react";
|
|
4566
|
+
import { Stack as Stack44, TextInput as TextInput20, Radio as Radio2, Group as Group14 } from "@mantine/core";
|
|
4362
4567
|
var inputStyles14 = {
|
|
4363
4568
|
label: { color: "#adb5bd" },
|
|
4364
4569
|
input: {
|
|
@@ -4371,7 +4576,7 @@ var inputStyles14 = {
|
|
|
4371
4576
|
}
|
|
4372
4577
|
};
|
|
4373
4578
|
var ManageCw20ActionForm = ({ data, onChange }) => {
|
|
4374
|
-
return /* @__PURE__ */
|
|
4579
|
+
return /* @__PURE__ */ React60.createElement(Stack44, { gap: "md" }, /* @__PURE__ */ React60.createElement(Radio2.Group, { label: "Action", value: data.adding ? "add" : "remove", onChange: (value) => onChange({ ...data, adding: value === "add" }) }, /* @__PURE__ */ React60.createElement(Group14, { mt: "xs" }, /* @__PURE__ */ React60.createElement(
|
|
4375
4580
|
Radio2,
|
|
4376
4581
|
{
|
|
4377
4582
|
value: "add",
|
|
@@ -4381,7 +4586,7 @@ var ManageCw20ActionForm = ({ data, onChange }) => {
|
|
|
4381
4586
|
radio: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
4382
4587
|
}
|
|
4383
4588
|
}
|
|
4384
|
-
), /* @__PURE__ */
|
|
4589
|
+
), /* @__PURE__ */ React60.createElement(
|
|
4385
4590
|
Radio2,
|
|
4386
4591
|
{
|
|
4387
4592
|
value: "remove",
|
|
@@ -4391,7 +4596,7 @@ var ManageCw20ActionForm = ({ data, onChange }) => {
|
|
|
4391
4596
|
radio: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
4392
4597
|
}
|
|
4393
4598
|
}
|
|
4394
|
-
))), /* @__PURE__ */
|
|
4599
|
+
))), /* @__PURE__ */ React60.createElement(
|
|
4395
4600
|
TextInput20,
|
|
4396
4601
|
{
|
|
4397
4602
|
label: "Token Contract Address",
|
|
@@ -4405,8 +4610,8 @@ var ManageCw20ActionForm = ({ data, onChange }) => {
|
|
|
4405
4610
|
};
|
|
4406
4611
|
|
|
4407
4612
|
// src/mantine/blocks/proposal/actions-components/forms/ManageSubDaosActionForm.tsx
|
|
4408
|
-
import
|
|
4409
|
-
import { Stack as
|
|
4613
|
+
import React61, { useState as useState13 } from "react";
|
|
4614
|
+
import { Stack as Stack45, TextInput as TextInput21, Button as Button9, Group as Group15, Text as Text33, Card as Card10, Textarea as Textarea9 } from "@mantine/core";
|
|
4410
4615
|
var inputStyles15 = {
|
|
4411
4616
|
label: { color: "#adb5bd" },
|
|
4412
4617
|
input: {
|
|
@@ -4451,7 +4656,7 @@ var ManageSubDaosActionForm = ({ data, onChange }) => {
|
|
|
4451
4656
|
toRemove: (data.toRemove || []).filter((_, i) => i !== index)
|
|
4452
4657
|
});
|
|
4453
4658
|
};
|
|
4454
|
-
return /* @__PURE__ */
|
|
4659
|
+
return /* @__PURE__ */ React61.createElement(Stack45, { gap: "md" }, /* @__PURE__ */ React61.createElement(Stack45, { gap: "xs" }, /* @__PURE__ */ React61.createElement(Text33, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "SubDAOs to Add"), (data.toAdd || []).map((subDao, index) => /* @__PURE__ */ React61.createElement(Card10, { key: index, withBorder: true, padding: "xs", style: { backgroundColor: "#2a2a2a", borderColor: "#333" } }, /* @__PURE__ */ React61.createElement(Stack45, { gap: "xs" }, /* @__PURE__ */ React61.createElement(Group15, { justify: "space-between" }, /* @__PURE__ */ React61.createElement(Text33, { size: "sm", style: { color: "#f1f3f5" } }, subDao.addr), /* @__PURE__ */ React61.createElement(Button9, { size: "xs", variant: "subtle", onClick: () => handleRemoveFromAddList(index), style: { color: "#ff6b6b" } }, "Remove")), subDao.charter && /* @__PURE__ */ React61.createElement(Text33, { size: "xs", style: { color: "#adb5bd" } }, "Charter: ", subDao.charter)))), /* @__PURE__ */ React61.createElement(Stack45, { gap: "xs" }, /* @__PURE__ */ React61.createElement(TextInput21, { placeholder: "SubDAO Address", value: newSubDao.addr, onChange: (e) => setNewSubDao({ ...newSubDao, addr: e.currentTarget.value }), styles: inputStyles15 }), /* @__PURE__ */ React61.createElement(
|
|
4455
4660
|
Textarea9,
|
|
4456
4661
|
{
|
|
4457
4662
|
placeholder: "Charter (optional)",
|
|
@@ -4460,7 +4665,7 @@ var ManageSubDaosActionForm = ({ data, onChange }) => {
|
|
|
4460
4665
|
minRows: 2,
|
|
4461
4666
|
styles: inputStyles15
|
|
4462
4667
|
}
|
|
4463
|
-
), /* @__PURE__ */
|
|
4668
|
+
), /* @__PURE__ */ React61.createElement(
|
|
4464
4669
|
Button9,
|
|
4465
4670
|
{
|
|
4466
4671
|
size: "sm",
|
|
@@ -4471,7 +4676,7 @@ var ManageSubDaosActionForm = ({ data, onChange }) => {
|
|
|
4471
4676
|
}
|
|
4472
4677
|
},
|
|
4473
4678
|
"Add SubDAO"
|
|
4474
|
-
))), /* @__PURE__ */
|
|
4679
|
+
))), /* @__PURE__ */ React61.createElement(Stack45, { gap: "xs" }, /* @__PURE__ */ React61.createElement(Text33, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "SubDAOs to Remove"), (data.toRemove || []).map((subDao, index) => /* @__PURE__ */ React61.createElement(Card10, { key: index, withBorder: true, padding: "xs", style: { backgroundColor: "#2a2a2a", borderColor: "#333" } }, /* @__PURE__ */ React61.createElement(Group15, { justify: "space-between" }, /* @__PURE__ */ React61.createElement(Text33, { size: "sm", style: { color: "#f1f3f5" } }, subDao.address), /* @__PURE__ */ React61.createElement(Button9, { size: "xs", variant: "subtle", onClick: () => handleRemoveFromRemoveList(index), style: { color: "#ff6b6b" } }, "Remove")))), /* @__PURE__ */ React61.createElement(Group15, { grow: true }, /* @__PURE__ */ React61.createElement(TextInput21, { placeholder: "SubDAO Address to Remove", value: newRemoveAddress, onChange: (e) => setNewRemoveAddress(e.currentTarget.value), styles: inputStyles15 }), /* @__PURE__ */ React61.createElement(
|
|
4475
4680
|
Button9,
|
|
4476
4681
|
{
|
|
4477
4682
|
size: "sm",
|
|
@@ -4486,8 +4691,8 @@ var ManageSubDaosActionForm = ({ data, onChange }) => {
|
|
|
4486
4691
|
};
|
|
4487
4692
|
|
|
4488
4693
|
// src/mantine/blocks/proposal/actions-components/forms/UpdateInfoActionForm.tsx
|
|
4489
|
-
import
|
|
4490
|
-
import { Stack as
|
|
4694
|
+
import React62 from "react";
|
|
4695
|
+
import { Stack as Stack46, TextInput as TextInput22, Textarea as Textarea10, Checkbox as Checkbox5 } from "@mantine/core";
|
|
4491
4696
|
var inputStyles16 = {
|
|
4492
4697
|
label: { color: "#adb5bd" },
|
|
4493
4698
|
input: {
|
|
@@ -4500,7 +4705,7 @@ var inputStyles16 = {
|
|
|
4500
4705
|
}
|
|
4501
4706
|
};
|
|
4502
4707
|
var UpdateInfoActionForm = ({ data, onChange }) => {
|
|
4503
|
-
return /* @__PURE__ */
|
|
4708
|
+
return /* @__PURE__ */ React62.createElement(Stack46, { gap: "md" }, /* @__PURE__ */ React62.createElement(TextInput22, { label: "DAO Name", placeholder: "My DAO", value: data.name, onChange: (e) => onChange({ ...data, name: e.currentTarget.value }), required: true, styles: inputStyles16 }), /* @__PURE__ */ React62.createElement(
|
|
4504
4709
|
Textarea10,
|
|
4505
4710
|
{
|
|
4506
4711
|
label: "Description",
|
|
@@ -4510,7 +4715,7 @@ var UpdateInfoActionForm = ({ data, onChange }) => {
|
|
|
4510
4715
|
minRows: 3,
|
|
4511
4716
|
styles: inputStyles16
|
|
4512
4717
|
}
|
|
4513
|
-
), /* @__PURE__ */
|
|
4718
|
+
), /* @__PURE__ */ React62.createElement(
|
|
4514
4719
|
TextInput22,
|
|
4515
4720
|
{
|
|
4516
4721
|
label: "Image URL (Optional)",
|
|
@@ -4519,7 +4724,7 @@ var UpdateInfoActionForm = ({ data, onChange }) => {
|
|
|
4519
4724
|
onChange: (e) => onChange({ ...data, image_url: e.currentTarget.value || null }),
|
|
4520
4725
|
styles: inputStyles16
|
|
4521
4726
|
}
|
|
4522
|
-
), /* @__PURE__ */
|
|
4727
|
+
), /* @__PURE__ */ React62.createElement(
|
|
4523
4728
|
TextInput22,
|
|
4524
4729
|
{
|
|
4525
4730
|
label: "DAO URI (Optional)",
|
|
@@ -4528,7 +4733,7 @@ var UpdateInfoActionForm = ({ data, onChange }) => {
|
|
|
4528
4733
|
onChange: (e) => onChange({ ...data, dao_uri: e.currentTarget.value || null }),
|
|
4529
4734
|
styles: inputStyles16
|
|
4530
4735
|
}
|
|
4531
|
-
), /* @__PURE__ */
|
|
4736
|
+
), /* @__PURE__ */ React62.createElement(
|
|
4532
4737
|
Checkbox5,
|
|
4533
4738
|
{
|
|
4534
4739
|
label: "Automatically add CW20 tokens",
|
|
@@ -4539,7 +4744,7 @@ var UpdateInfoActionForm = ({ data, onChange }) => {
|
|
|
4539
4744
|
input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
4540
4745
|
}
|
|
4541
4746
|
}
|
|
4542
|
-
), /* @__PURE__ */
|
|
4747
|
+
), /* @__PURE__ */ React62.createElement(
|
|
4543
4748
|
Checkbox5,
|
|
4544
4749
|
{
|
|
4545
4750
|
label: "Automatically add CW721 NFTs",
|
|
@@ -4554,8 +4759,8 @@ var UpdateInfoActionForm = ({ data, onChange }) => {
|
|
|
4554
4759
|
};
|
|
4555
4760
|
|
|
4556
4761
|
// src/mantine/blocks/proposal/actions-components/forms/ManageStorageItemsActionForm.tsx
|
|
4557
|
-
import
|
|
4558
|
-
import { Stack as
|
|
4762
|
+
import React63 from "react";
|
|
4763
|
+
import { Stack as Stack47, TextInput as TextInput23, Radio as Radio3, Group as Group16, Textarea as Textarea11 } from "@mantine/core";
|
|
4559
4764
|
var inputStyles17 = {
|
|
4560
4765
|
label: { color: "#adb5bd" },
|
|
4561
4766
|
input: {
|
|
@@ -4568,7 +4773,7 @@ var inputStyles17 = {
|
|
|
4568
4773
|
}
|
|
4569
4774
|
};
|
|
4570
4775
|
var ManageStorageItemsActionForm = ({ data, onChange }) => {
|
|
4571
|
-
return /* @__PURE__ */
|
|
4776
|
+
return /* @__PURE__ */ React63.createElement(Stack47, { gap: "md" }, /* @__PURE__ */ React63.createElement(Radio3.Group, { label: "Action", value: data.setting ? "set" : "remove", onChange: (value) => onChange({ ...data, setting: value === "set" }) }, /* @__PURE__ */ React63.createElement(Group16, { mt: "xs" }, /* @__PURE__ */ React63.createElement(
|
|
4572
4777
|
Radio3,
|
|
4573
4778
|
{
|
|
4574
4779
|
value: "set",
|
|
@@ -4578,7 +4783,7 @@ var ManageStorageItemsActionForm = ({ data, onChange }) => {
|
|
|
4578
4783
|
radio: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
4579
4784
|
}
|
|
4580
4785
|
}
|
|
4581
|
-
), /* @__PURE__ */
|
|
4786
|
+
), /* @__PURE__ */ React63.createElement(
|
|
4582
4787
|
Radio3,
|
|
4583
4788
|
{
|
|
4584
4789
|
value: "remove",
|
|
@@ -4588,7 +4793,7 @@ var ManageStorageItemsActionForm = ({ data, onChange }) => {
|
|
|
4588
4793
|
radio: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
4589
4794
|
}
|
|
4590
4795
|
}
|
|
4591
|
-
))), /* @__PURE__ */
|
|
4796
|
+
))), /* @__PURE__ */ React63.createElement(TextInput23, { label: "Storage Key", placeholder: "config_key", value: data.key, onChange: (e) => onChange({ ...data, key: e.currentTarget.value }), required: true, styles: inputStyles17 }), data.setting && /* @__PURE__ */ React63.createElement(
|
|
4592
4797
|
Textarea11,
|
|
4593
4798
|
{
|
|
4594
4799
|
label: "Storage Value",
|
|
@@ -4603,8 +4808,8 @@ var ManageStorageItemsActionForm = ({ data, onChange }) => {
|
|
|
4603
4808
|
};
|
|
4604
4809
|
|
|
4605
4810
|
// src/mantine/blocks/proposal/actions-components/forms/DaoAdminExecActionForm.tsx
|
|
4606
|
-
import
|
|
4607
|
-
import { Stack as
|
|
4811
|
+
import React64, { useState as useState14 } from "react";
|
|
4812
|
+
import { Stack as Stack48, TextInput as TextInput24, Button as Button10, Group as Group17, Text as Text34, Card as Card11, Textarea as Textarea12 } from "@mantine/core";
|
|
4608
4813
|
var inputStyles18 = {
|
|
4609
4814
|
label: { color: "#adb5bd" },
|
|
4610
4815
|
input: {
|
|
@@ -4637,7 +4842,7 @@ var DaoAdminExecActionForm = ({ data, onChange }) => {
|
|
|
4637
4842
|
msgs: (data.msgs || []).filter((_, i) => i !== index)
|
|
4638
4843
|
});
|
|
4639
4844
|
};
|
|
4640
|
-
return /* @__PURE__ */
|
|
4845
|
+
return /* @__PURE__ */ React64.createElement(Stack48, { gap: "md" }, /* @__PURE__ */ React64.createElement(
|
|
4641
4846
|
TextInput24,
|
|
4642
4847
|
{
|
|
4643
4848
|
label: "Core Address",
|
|
@@ -4647,7 +4852,7 @@ var DaoAdminExecActionForm = ({ data, onChange }) => {
|
|
|
4647
4852
|
required: true,
|
|
4648
4853
|
styles: inputStyles18
|
|
4649
4854
|
}
|
|
4650
|
-
), /* @__PURE__ */
|
|
4855
|
+
), /* @__PURE__ */ React64.createElement(Stack48, { gap: "xs" }, /* @__PURE__ */ React64.createElement(Text34, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Messages to Execute"), (data.msgs || []).map((msg, index) => /* @__PURE__ */ React64.createElement(Card11, { key: index, withBorder: true, padding: "xs", style: { backgroundColor: "#2a2a2a", borderColor: "#333" } }, /* @__PURE__ */ React64.createElement(Group17, { justify: "space-between" }, /* @__PURE__ */ React64.createElement(Text34, { size: "sm", style: { color: "#f1f3f5" } }, "Message ", index + 1), /* @__PURE__ */ React64.createElement(Button10, { size: "xs", variant: "subtle", onClick: () => handleRemoveMessage(index), style: { color: "#ff6b6b" } }, "Remove")), /* @__PURE__ */ React64.createElement(Text34, { size: "xs", style: { color: "#adb5bd", fontFamily: "monospace" } }, JSON.stringify(msg, null, 2).substring(0, 100), "..."))), /* @__PURE__ */ React64.createElement(
|
|
4651
4856
|
Textarea12,
|
|
4652
4857
|
{
|
|
4653
4858
|
placeholder: 'Add cosmos message as JSON:\\n{"bank": {"send": {"to_address": "ixo1...", "amount": [{"denom": "uixo", "amount": "1000"}]}}}',
|
|
@@ -4656,7 +4861,7 @@ var DaoAdminExecActionForm = ({ data, onChange }) => {
|
|
|
4656
4861
|
minRows: 4,
|
|
4657
4862
|
styles: inputStyles18
|
|
4658
4863
|
}
|
|
4659
|
-
), /* @__PURE__ */
|
|
4864
|
+
), /* @__PURE__ */ React64.createElement(
|
|
4660
4865
|
Button10,
|
|
4661
4866
|
{
|
|
4662
4867
|
size: "sm",
|
|
@@ -4671,8 +4876,8 @@ var DaoAdminExecActionForm = ({ data, onChange }) => {
|
|
|
4671
4876
|
};
|
|
4672
4877
|
|
|
4673
4878
|
// src/mantine/blocks/proposal/actions-components/forms/AcceptToMarketplaceActionForm.tsx
|
|
4674
|
-
import
|
|
4675
|
-
import { Stack as
|
|
4879
|
+
import React65 from "react";
|
|
4880
|
+
import { Stack as Stack49, TextInput as TextInput25 } from "@mantine/core";
|
|
4676
4881
|
var inputStyles19 = {
|
|
4677
4882
|
label: { color: "#adb5bd" },
|
|
4678
4883
|
input: {
|
|
@@ -4685,7 +4890,7 @@ var inputStyles19 = {
|
|
|
4685
4890
|
}
|
|
4686
4891
|
};
|
|
4687
4892
|
var AcceptToMarketplaceActionForm = ({ data, onChange }) => {
|
|
4688
|
-
return /* @__PURE__ */
|
|
4893
|
+
return /* @__PURE__ */ React65.createElement(Stack49, { gap: "md" }, /* @__PURE__ */ React65.createElement(TextInput25, { label: "DID", placeholder: "did:ixo:...", value: data.did, onChange: (e) => onChange({ ...data, did: e.currentTarget.value }), required: true, styles: inputStyles19 }), /* @__PURE__ */ React65.createElement(
|
|
4689
4894
|
TextInput25,
|
|
4690
4895
|
{
|
|
4691
4896
|
label: "Relayer Node DID",
|
|
@@ -4695,7 +4900,7 @@ var AcceptToMarketplaceActionForm = ({ data, onChange }) => {
|
|
|
4695
4900
|
required: true,
|
|
4696
4901
|
styles: inputStyles19
|
|
4697
4902
|
}
|
|
4698
|
-
), /* @__PURE__ */
|
|
4903
|
+
), /* @__PURE__ */ React65.createElement(
|
|
4699
4904
|
TextInput25,
|
|
4700
4905
|
{
|
|
4701
4906
|
label: "Relayer Node Address",
|
|
@@ -4709,8 +4914,8 @@ var AcceptToMarketplaceActionForm = ({ data, onChange }) => {
|
|
|
4709
4914
|
};
|
|
4710
4915
|
|
|
4711
4916
|
// src/mantine/blocks/proposal/actions-components/forms/CreateEntityActionForm.tsx
|
|
4712
|
-
import
|
|
4713
|
-
import { Stack as
|
|
4917
|
+
import React66 from "react";
|
|
4918
|
+
import { Stack as Stack50, Textarea as Textarea13, Alert as Alert6, Text as Text35 } from "@mantine/core";
|
|
4714
4919
|
var inputStyles20 = {
|
|
4715
4920
|
label: { color: "#adb5bd" },
|
|
4716
4921
|
input: {
|
|
@@ -4730,7 +4935,7 @@ var CreateEntityActionForm = ({ data, onChange }) => {
|
|
|
4730
4935
|
} catch {
|
|
4731
4936
|
}
|
|
4732
4937
|
};
|
|
4733
|
-
return /* @__PURE__ */
|
|
4938
|
+
return /* @__PURE__ */ React66.createElement(Stack50, { gap: "md" }, /* @__PURE__ */ React66.createElement(Alert6, { color: "blue", style: { backgroundColor: "#2a2a2a", borderColor: "#4dabf7" } }, /* @__PURE__ */ React66.createElement(Text35, { size: "sm", style: { color: "#4dabf7" } }, "This is a complex entity creation action. Please provide the complete entity data as JSON.")), /* @__PURE__ */ React66.createElement(
|
|
4734
4939
|
Textarea13,
|
|
4735
4940
|
{
|
|
4736
4941
|
label: "Entity Data (JSON)",
|
|
@@ -4745,8 +4950,8 @@ var CreateEntityActionForm = ({ data, onChange }) => {
|
|
|
4745
4950
|
};
|
|
4746
4951
|
|
|
4747
4952
|
// src/mantine/blocks/proposal/actions-components/forms/UpdateVotingConfigActionForm.tsx
|
|
4748
|
-
import
|
|
4749
|
-
import { Stack as
|
|
4953
|
+
import React67 from "react";
|
|
4954
|
+
import { Stack as Stack51, Checkbox as Checkbox6, Select as Select6, NumberInput as NumberInput7, Group as Group18 } from "@mantine/core";
|
|
4750
4955
|
var inputStyles21 = {
|
|
4751
4956
|
label: { color: "#adb5bd" },
|
|
4752
4957
|
input: {
|
|
@@ -4759,7 +4964,7 @@ var inputStyles21 = {
|
|
|
4759
4964
|
}
|
|
4760
4965
|
};
|
|
4761
4966
|
var UpdateVotingConfigActionForm = ({ data, onChange }) => {
|
|
4762
|
-
return /* @__PURE__ */
|
|
4967
|
+
return /* @__PURE__ */ React67.createElement(Stack51, { gap: "md" }, /* @__PURE__ */ React67.createElement(
|
|
4763
4968
|
Checkbox6,
|
|
4764
4969
|
{
|
|
4765
4970
|
label: "Only members can execute",
|
|
@@ -4770,7 +4975,7 @@ var UpdateVotingConfigActionForm = ({ data, onChange }) => {
|
|
|
4770
4975
|
input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
4771
4976
|
}
|
|
4772
4977
|
}
|
|
4773
|
-
), /* @__PURE__ */
|
|
4978
|
+
), /* @__PURE__ */ React67.createElement(
|
|
4774
4979
|
Select6,
|
|
4775
4980
|
{
|
|
4776
4981
|
label: "Threshold Type",
|
|
@@ -4782,7 +4987,7 @@ var UpdateVotingConfigActionForm = ({ data, onChange }) => {
|
|
|
4782
4987
|
],
|
|
4783
4988
|
styles: inputStyles21
|
|
4784
4989
|
}
|
|
4785
|
-
), data.thresholdType === "%" && /* @__PURE__ */
|
|
4990
|
+
), data.thresholdType === "%" && /* @__PURE__ */ React67.createElement(
|
|
4786
4991
|
NumberInput7,
|
|
4787
4992
|
{
|
|
4788
4993
|
label: "Threshold Percentage",
|
|
@@ -4794,7 +4999,7 @@ var UpdateVotingConfigActionForm = ({ data, onChange }) => {
|
|
|
4794
4999
|
suffix: "%",
|
|
4795
5000
|
styles: inputStyles21
|
|
4796
5001
|
}
|
|
4797
|
-
), /* @__PURE__ */
|
|
5002
|
+
), /* @__PURE__ */ React67.createElement(
|
|
4798
5003
|
Checkbox6,
|
|
4799
5004
|
{
|
|
4800
5005
|
label: "Enable Quorum",
|
|
@@ -4805,7 +5010,7 @@ var UpdateVotingConfigActionForm = ({ data, onChange }) => {
|
|
|
4805
5010
|
input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
4806
5011
|
}
|
|
4807
5012
|
}
|
|
4808
|
-
), data.quorumEnabled && /* @__PURE__ */
|
|
5013
|
+
), data.quorumEnabled && /* @__PURE__ */ React67.createElement(React67.Fragment, null, /* @__PURE__ */ React67.createElement(
|
|
4809
5014
|
Select6,
|
|
4810
5015
|
{
|
|
4811
5016
|
label: "Quorum Type",
|
|
@@ -4817,7 +5022,7 @@ var UpdateVotingConfigActionForm = ({ data, onChange }) => {
|
|
|
4817
5022
|
],
|
|
4818
5023
|
styles: inputStyles21
|
|
4819
5024
|
}
|
|
4820
|
-
), data.quorumType === "%" && /* @__PURE__ */
|
|
5025
|
+
), data.quorumType === "%" && /* @__PURE__ */ React67.createElement(
|
|
4821
5026
|
NumberInput7,
|
|
4822
5027
|
{
|
|
4823
5028
|
label: "Quorum Percentage",
|
|
@@ -4829,7 +5034,7 @@ var UpdateVotingConfigActionForm = ({ data, onChange }) => {
|
|
|
4829
5034
|
suffix: "%",
|
|
4830
5035
|
styles: inputStyles21
|
|
4831
5036
|
}
|
|
4832
|
-
)), /* @__PURE__ */
|
|
5037
|
+
)), /* @__PURE__ */ React67.createElement(Group18, { grow: true }, /* @__PURE__ */ React67.createElement(
|
|
4833
5038
|
NumberInput7,
|
|
4834
5039
|
{
|
|
4835
5040
|
label: "Proposal Duration",
|
|
@@ -4839,7 +5044,7 @@ var UpdateVotingConfigActionForm = ({ data, onChange }) => {
|
|
|
4839
5044
|
min: 1,
|
|
4840
5045
|
styles: inputStyles21
|
|
4841
5046
|
}
|
|
4842
|
-
), /* @__PURE__ */
|
|
5047
|
+
), /* @__PURE__ */ React67.createElement(
|
|
4843
5048
|
Select6,
|
|
4844
5049
|
{
|
|
4845
5050
|
label: "Duration Units",
|
|
@@ -4853,7 +5058,7 @@ var UpdateVotingConfigActionForm = ({ data, onChange }) => {
|
|
|
4853
5058
|
],
|
|
4854
5059
|
styles: inputStyles21
|
|
4855
5060
|
}
|
|
4856
|
-
)), /* @__PURE__ */
|
|
5061
|
+
)), /* @__PURE__ */ React67.createElement(
|
|
4857
5062
|
Checkbox6,
|
|
4858
5063
|
{
|
|
4859
5064
|
label: "Allow revoting",
|
|
@@ -4868,8 +5073,8 @@ var UpdateVotingConfigActionForm = ({ data, onChange }) => {
|
|
|
4868
5073
|
};
|
|
4869
5074
|
|
|
4870
5075
|
// src/mantine/blocks/proposal/actions-components/forms/UpdatePreProposeConfigActionForm.tsx
|
|
4871
|
-
import
|
|
4872
|
-
import { Stack as
|
|
5076
|
+
import React68 from "react";
|
|
5077
|
+
import { Stack as Stack52, Checkbox as Checkbox7, TextInput as TextInput26, Select as Select7, Textarea as Textarea14 } from "@mantine/core";
|
|
4873
5078
|
var inputStyles22 = {
|
|
4874
5079
|
label: { color: "#adb5bd" },
|
|
4875
5080
|
input: {
|
|
@@ -4882,7 +5087,7 @@ var inputStyles22 = {
|
|
|
4882
5087
|
}
|
|
4883
5088
|
};
|
|
4884
5089
|
var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
|
|
4885
|
-
return /* @__PURE__ */
|
|
5090
|
+
return /* @__PURE__ */ React68.createElement(Stack52, { gap: "md" }, /* @__PURE__ */ React68.createElement(
|
|
4886
5091
|
Checkbox7,
|
|
4887
5092
|
{
|
|
4888
5093
|
label: "Anyone can propose",
|
|
@@ -4893,7 +5098,7 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
|
|
|
4893
5098
|
input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
4894
5099
|
}
|
|
4895
5100
|
}
|
|
4896
|
-
), /* @__PURE__ */
|
|
5101
|
+
), /* @__PURE__ */ React68.createElement(
|
|
4897
5102
|
Checkbox7,
|
|
4898
5103
|
{
|
|
4899
5104
|
label: "Deposit required",
|
|
@@ -4904,7 +5109,7 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
|
|
|
4904
5109
|
input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
4905
5110
|
}
|
|
4906
5111
|
}
|
|
4907
|
-
), data.depositRequired && /* @__PURE__ */
|
|
5112
|
+
), data.depositRequired && /* @__PURE__ */ React68.createElement(React68.Fragment, null, /* @__PURE__ */ React68.createElement(
|
|
4908
5113
|
TextInput26,
|
|
4909
5114
|
{
|
|
4910
5115
|
label: "Deposit Amount",
|
|
@@ -4917,7 +5122,7 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
|
|
|
4917
5122
|
required: true,
|
|
4918
5123
|
styles: inputStyles22
|
|
4919
5124
|
}
|
|
4920
|
-
), /* @__PURE__ */
|
|
5125
|
+
), /* @__PURE__ */ React68.createElement(
|
|
4921
5126
|
Select7,
|
|
4922
5127
|
{
|
|
4923
5128
|
label: "Deposit Type",
|
|
@@ -4933,7 +5138,7 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
|
|
|
4933
5138
|
],
|
|
4934
5139
|
styles: inputStyles22
|
|
4935
5140
|
}
|
|
4936
|
-
), /* @__PURE__ */
|
|
5141
|
+
), /* @__PURE__ */ React68.createElement(
|
|
4937
5142
|
TextInput26,
|
|
4938
5143
|
{
|
|
4939
5144
|
label: "Token Denomination or Address",
|
|
@@ -4946,7 +5151,7 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
|
|
|
4946
5151
|
required: true,
|
|
4947
5152
|
styles: inputStyles22
|
|
4948
5153
|
}
|
|
4949
|
-
), /* @__PURE__ */
|
|
5154
|
+
), /* @__PURE__ */ React68.createElement(
|
|
4950
5155
|
TextInput26,
|
|
4951
5156
|
{
|
|
4952
5157
|
label: "Refund Policy",
|
|
@@ -4959,7 +5164,7 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
|
|
|
4959
5164
|
required: true,
|
|
4960
5165
|
styles: inputStyles22
|
|
4961
5166
|
}
|
|
4962
|
-
), data.depositInfo.type !== "native" && /* @__PURE__ */
|
|
5167
|
+
), data.depositInfo.type !== "native" && /* @__PURE__ */ React68.createElement(
|
|
4963
5168
|
Textarea14,
|
|
4964
5169
|
{
|
|
4965
5170
|
label: "Token Configuration (JSON)",
|
|
@@ -4982,8 +5187,8 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
|
|
|
4982
5187
|
};
|
|
4983
5188
|
|
|
4984
5189
|
// src/mantine/blocks/proposal/actions-components/forms/GovernanceVoteActionForm.tsx
|
|
4985
|
-
import
|
|
4986
|
-
import { Stack as
|
|
5190
|
+
import React69 from "react";
|
|
5191
|
+
import { Stack as Stack53, TextInput as TextInput27, Select as Select8 } from "@mantine/core";
|
|
4987
5192
|
var inputStyles23 = {
|
|
4988
5193
|
label: { color: "#adb5bd" },
|
|
4989
5194
|
input: {
|
|
@@ -5002,7 +5207,7 @@ var GovernanceVoteActionForm = ({ data, onChange }) => {
|
|
|
5002
5207
|
{ value: "3", label: "No" },
|
|
5003
5208
|
{ value: "4", label: "No with Veto" }
|
|
5004
5209
|
];
|
|
5005
|
-
return /* @__PURE__ */
|
|
5210
|
+
return /* @__PURE__ */ React69.createElement(Stack53, { gap: "md" }, /* @__PURE__ */ React69.createElement(
|
|
5006
5211
|
TextInput27,
|
|
5007
5212
|
{
|
|
5008
5213
|
label: "Proposal ID",
|
|
@@ -5012,7 +5217,7 @@ var GovernanceVoteActionForm = ({ data, onChange }) => {
|
|
|
5012
5217
|
required: true,
|
|
5013
5218
|
styles: inputStyles23
|
|
5014
5219
|
}
|
|
5015
|
-
), /* @__PURE__ */
|
|
5220
|
+
), /* @__PURE__ */ React69.createElement(
|
|
5016
5221
|
Select8,
|
|
5017
5222
|
{
|
|
5018
5223
|
label: "Vote Option",
|
|
@@ -5026,8 +5231,8 @@ var GovernanceVoteActionForm = ({ data, onChange }) => {
|
|
|
5026
5231
|
};
|
|
5027
5232
|
|
|
5028
5233
|
// src/mantine/blocks/proposal/actions-components/forms/WithdrawTokenSwapActionForm.tsx
|
|
5029
|
-
import
|
|
5030
|
-
import { Stack as
|
|
5234
|
+
import React70 from "react";
|
|
5235
|
+
import { Stack as Stack54, TextInput as TextInput28, Checkbox as Checkbox8 } from "@mantine/core";
|
|
5031
5236
|
var inputStyles24 = {
|
|
5032
5237
|
label: { color: "#adb5bd" },
|
|
5033
5238
|
input: {
|
|
@@ -5040,7 +5245,7 @@ var inputStyles24 = {
|
|
|
5040
5245
|
}
|
|
5041
5246
|
};
|
|
5042
5247
|
var WithdrawTokenSwapActionForm = ({ data, onChange }) => {
|
|
5043
|
-
return /* @__PURE__ */
|
|
5248
|
+
return /* @__PURE__ */ React70.createElement(Stack54, { gap: "md" }, /* @__PURE__ */ React70.createElement(
|
|
5044
5249
|
Checkbox8,
|
|
5045
5250
|
{
|
|
5046
5251
|
label: "Contract chosen",
|
|
@@ -5051,7 +5256,7 @@ var WithdrawTokenSwapActionForm = ({ data, onChange }) => {
|
|
|
5051
5256
|
input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
5052
5257
|
}
|
|
5053
5258
|
}
|
|
5054
|
-
), data.contractChosen && /* @__PURE__ */
|
|
5259
|
+
), data.contractChosen && /* @__PURE__ */ React70.createElement(
|
|
5055
5260
|
TextInput28,
|
|
5056
5261
|
{
|
|
5057
5262
|
label: "Token Swap Contract Address",
|
|
@@ -5065,8 +5270,8 @@ var WithdrawTokenSwapActionForm = ({ data, onChange }) => {
|
|
|
5065
5270
|
};
|
|
5066
5271
|
|
|
5067
5272
|
// src/mantine/blocks/proposal/actions-components/forms/PerformTokenSwapActionForm.tsx
|
|
5068
|
-
import
|
|
5069
|
-
import { Stack as
|
|
5273
|
+
import React71 from "react";
|
|
5274
|
+
import { Stack as Stack55, TextInput as TextInput29, Checkbox as Checkbox9, Textarea as Textarea15 } from "@mantine/core";
|
|
5070
5275
|
var inputStyles25 = {
|
|
5071
5276
|
label: { color: "#adb5bd" },
|
|
5072
5277
|
input: {
|
|
@@ -5079,7 +5284,7 @@ var inputStyles25 = {
|
|
|
5079
5284
|
}
|
|
5080
5285
|
};
|
|
5081
5286
|
var PerformTokenSwapActionForm = ({ data, onChange }) => {
|
|
5082
|
-
return /* @__PURE__ */
|
|
5287
|
+
return /* @__PURE__ */ React71.createElement(Stack55, { gap: "md" }, /* @__PURE__ */ React71.createElement(
|
|
5083
5288
|
Checkbox9,
|
|
5084
5289
|
{
|
|
5085
5290
|
label: "Contract chosen",
|
|
@@ -5090,7 +5295,7 @@ var PerformTokenSwapActionForm = ({ data, onChange }) => {
|
|
|
5090
5295
|
input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
5091
5296
|
}
|
|
5092
5297
|
}
|
|
5093
|
-
), data.contractChosen && /* @__PURE__ */
|
|
5298
|
+
), data.contractChosen && /* @__PURE__ */ React71.createElement(React71.Fragment, null, /* @__PURE__ */ React71.createElement(
|
|
5094
5299
|
TextInput29,
|
|
5095
5300
|
{
|
|
5096
5301
|
label: "Token Swap Contract Address",
|
|
@@ -5100,7 +5305,7 @@ var PerformTokenSwapActionForm = ({ data, onChange }) => {
|
|
|
5100
5305
|
required: true,
|
|
5101
5306
|
styles: inputStyles25
|
|
5102
5307
|
}
|
|
5103
|
-
), /* @__PURE__ */
|
|
5308
|
+
), /* @__PURE__ */ React71.createElement(
|
|
5104
5309
|
Textarea15,
|
|
5105
5310
|
{
|
|
5106
5311
|
label: "Self Party Information (JSON)",
|
|
@@ -5116,7 +5321,7 @@ var PerformTokenSwapActionForm = ({ data, onChange }) => {
|
|
|
5116
5321
|
minRows: 4,
|
|
5117
5322
|
styles: inputStyles25
|
|
5118
5323
|
}
|
|
5119
|
-
), /* @__PURE__ */
|
|
5324
|
+
), /* @__PURE__ */ React71.createElement(
|
|
5120
5325
|
Textarea15,
|
|
5121
5326
|
{
|
|
5122
5327
|
label: "Counterparty Information (JSON)",
|
|
@@ -5136,8 +5341,8 @@ var PerformTokenSwapActionForm = ({ data, onChange }) => {
|
|
|
5136
5341
|
};
|
|
5137
5342
|
|
|
5138
5343
|
// src/mantine/blocks/proposal/actions-components/forms/StakeToGroupActionForm.tsx
|
|
5139
|
-
import
|
|
5140
|
-
import { Stack as
|
|
5344
|
+
import React72 from "react";
|
|
5345
|
+
import { Stack as Stack56, TextInput as TextInput30 } from "@mantine/core";
|
|
5141
5346
|
var inputStyles26 = {
|
|
5142
5347
|
label: { color: "#adb5bd" },
|
|
5143
5348
|
input: {
|
|
@@ -5150,7 +5355,7 @@ var inputStyles26 = {
|
|
|
5150
5355
|
}
|
|
5151
5356
|
};
|
|
5152
5357
|
var StakeToGroupActionForm = ({ data, onChange }) => {
|
|
5153
|
-
return /* @__PURE__ */
|
|
5358
|
+
return /* @__PURE__ */ React72.createElement(Stack56, { gap: "md" }, /* @__PURE__ */ React72.createElement(
|
|
5154
5359
|
TextInput30,
|
|
5155
5360
|
{
|
|
5156
5361
|
label: "Token Contract Address",
|
|
@@ -5160,7 +5365,7 @@ var StakeToGroupActionForm = ({ data, onChange }) => {
|
|
|
5160
5365
|
required: true,
|
|
5161
5366
|
styles: inputStyles26
|
|
5162
5367
|
}
|
|
5163
|
-
), /* @__PURE__ */
|
|
5368
|
+
), /* @__PURE__ */ React72.createElement(
|
|
5164
5369
|
TextInput30,
|
|
5165
5370
|
{
|
|
5166
5371
|
label: "Staking Contract Address",
|
|
@@ -5170,12 +5375,12 @@ var StakeToGroupActionForm = ({ data, onChange }) => {
|
|
|
5170
5375
|
required: true,
|
|
5171
5376
|
styles: inputStyles26
|
|
5172
5377
|
}
|
|
5173
|
-
), /* @__PURE__ */
|
|
5378
|
+
), /* @__PURE__ */ React72.createElement(TextInput30, { label: "Amount", placeholder: "1000", value: data.amount, onChange: (e) => onChange({ ...data, amount: e.currentTarget.value }), required: true, styles: inputStyles26 }));
|
|
5174
5379
|
};
|
|
5175
5380
|
|
|
5176
5381
|
// src/mantine/blocks/proposal/actions-components/forms/SendGroupTokenActionForm.tsx
|
|
5177
|
-
import
|
|
5178
|
-
import { Stack as
|
|
5382
|
+
import React73 from "react";
|
|
5383
|
+
import { Stack as Stack57, TextInput as TextInput31 } from "@mantine/core";
|
|
5179
5384
|
var inputStyles27 = {
|
|
5180
5385
|
label: { color: "#adb5bd" },
|
|
5181
5386
|
input: {
|
|
@@ -5188,7 +5393,7 @@ var inputStyles27 = {
|
|
|
5188
5393
|
}
|
|
5189
5394
|
};
|
|
5190
5395
|
var SendGroupTokenActionForm = ({ data, onChange }) => {
|
|
5191
|
-
return /* @__PURE__ */
|
|
5396
|
+
return /* @__PURE__ */ React73.createElement(Stack57, { gap: "md" }, /* @__PURE__ */ React73.createElement(
|
|
5192
5397
|
TextInput31,
|
|
5193
5398
|
{
|
|
5194
5399
|
label: "Contract Address",
|
|
@@ -5198,7 +5403,7 @@ var SendGroupTokenActionForm = ({ data, onChange }) => {
|
|
|
5198
5403
|
required: true,
|
|
5199
5404
|
styles: inputStyles27
|
|
5200
5405
|
}
|
|
5201
|
-
), /* @__PURE__ */
|
|
5406
|
+
), /* @__PURE__ */ React73.createElement(
|
|
5202
5407
|
TextInput31,
|
|
5203
5408
|
{
|
|
5204
5409
|
label: "Recipient Address",
|
|
@@ -5208,12 +5413,12 @@ var SendGroupTokenActionForm = ({ data, onChange }) => {
|
|
|
5208
5413
|
required: true,
|
|
5209
5414
|
styles: inputStyles27
|
|
5210
5415
|
}
|
|
5211
|
-
), /* @__PURE__ */
|
|
5416
|
+
), /* @__PURE__ */ React73.createElement(TextInput31, { label: "Amount", placeholder: "1000", value: data.amount, onChange: (e) => onChange({ ...data, amount: e.currentTarget.value }), required: true, styles: inputStyles27 }));
|
|
5212
5417
|
};
|
|
5213
5418
|
|
|
5214
5419
|
// src/mantine/blocks/proposal/actions-components/forms/ValidatorActionsActionForm.tsx
|
|
5215
|
-
import
|
|
5216
|
-
import { Stack as
|
|
5420
|
+
import React74 from "react";
|
|
5421
|
+
import { Stack as Stack58, Select as Select9, Textarea as Textarea16 } from "@mantine/core";
|
|
5217
5422
|
var inputStyles28 = {
|
|
5218
5423
|
label: { color: "#adb5bd" },
|
|
5219
5424
|
input: {
|
|
@@ -5232,7 +5437,7 @@ var ValidatorActionsActionForm = ({ data, onChange }) => {
|
|
|
5232
5437
|
{ value: "/cosmos.slashing.v1beta1.MsgUnjail" /* UnjailValidator */, label: "Unjail Validator" },
|
|
5233
5438
|
{ value: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission" /* WithdrawValidatorCommission */, label: "Withdraw Commission" }
|
|
5234
5439
|
];
|
|
5235
|
-
return /* @__PURE__ */
|
|
5440
|
+
return /* @__PURE__ */ React74.createElement(Stack58, { gap: "md" }, /* @__PURE__ */ React74.createElement(
|
|
5236
5441
|
Select9,
|
|
5237
5442
|
{
|
|
5238
5443
|
label: "Validator Action Type",
|
|
@@ -5242,7 +5447,7 @@ var ValidatorActionsActionForm = ({ data, onChange }) => {
|
|
|
5242
5447
|
required: true,
|
|
5243
5448
|
styles: inputStyles28
|
|
5244
5449
|
}
|
|
5245
|
-
), data.validatorActionType === "/cosmos.staking.v1beta1.MsgCreateValidator" /* CreateValidator */ && /* @__PURE__ */
|
|
5450
|
+
), data.validatorActionType === "/cosmos.staking.v1beta1.MsgCreateValidator" /* CreateValidator */ && /* @__PURE__ */ React74.createElement(
|
|
5246
5451
|
Textarea16,
|
|
5247
5452
|
{
|
|
5248
5453
|
label: "Create Validator Message (JSON)",
|
|
@@ -5253,7 +5458,7 @@ var ValidatorActionsActionForm = ({ data, onChange }) => {
|
|
|
5253
5458
|
required: true,
|
|
5254
5459
|
styles: inputStyles28
|
|
5255
5460
|
}
|
|
5256
|
-
), data.validatorActionType === "/cosmos.staking.v1beta1.MsgEditValidator" /* EditValidator */ && /* @__PURE__ */
|
|
5461
|
+
), data.validatorActionType === "/cosmos.staking.v1beta1.MsgEditValidator" /* EditValidator */ && /* @__PURE__ */ React74.createElement(
|
|
5257
5462
|
Textarea16,
|
|
5258
5463
|
{
|
|
5259
5464
|
label: "Edit Validator Message (JSON)",
|
|
@@ -5958,10 +6163,10 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
|
|
|
5958
6163
|
};
|
|
5959
6164
|
const renderActionForm = () => {
|
|
5960
6165
|
if (!currentActionConfig) {
|
|
5961
|
-
return /* @__PURE__ */
|
|
6166
|
+
return /* @__PURE__ */ React75.createElement(Alert7, { color: "red", style: { backgroundColor: "#2a2a2a", borderColor: "#ff6b6b" } }, /* @__PURE__ */ React75.createElement(Text36, { size: "sm", style: { color: "#ff6b6b" } }, "Unknown action type selected"));
|
|
5962
6167
|
}
|
|
5963
6168
|
const FormComponent = currentActionConfig.FormComponent;
|
|
5964
|
-
return /* @__PURE__ */
|
|
6169
|
+
return /* @__PURE__ */ React75.createElement(FormComponent, { data: actionData, onChange: setActionData, isTemplateMode });
|
|
5965
6170
|
};
|
|
5966
6171
|
const getCategoryColor = (category) => {
|
|
5967
6172
|
const colors = {
|
|
@@ -5976,7 +6181,7 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
|
|
|
5976
6181
|
};
|
|
5977
6182
|
return colors[category] || "#6b7280";
|
|
5978
6183
|
};
|
|
5979
|
-
return /* @__PURE__ */
|
|
6184
|
+
return /* @__PURE__ */ React75.createElement(Stack59, { style: { backgroundColor: "#1a1a1a", color: "#f1f3f5", height: "100%" } }, /* @__PURE__ */ React75.createElement(Text36, { size: "lg", fw: 600, style: { color: "#f1f3f5" } }, isEditing ? "Edit Action" : "Add New Action"), !isEditing ? /* @__PURE__ */ React75.createElement(Stack59, { gap: "md" }, /* @__PURE__ */ React75.createElement(Text36, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Select Action Type"), /* @__PURE__ */ React75.createElement(
|
|
5980
6185
|
Tabs2,
|
|
5981
6186
|
{
|
|
5982
6187
|
defaultValue: ACTION_CATEGORIES[0].id,
|
|
@@ -5997,8 +6202,8 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
|
|
|
5997
6202
|
panel: { paddingTop: "md" }
|
|
5998
6203
|
}
|
|
5999
6204
|
},
|
|
6000
|
-
/* @__PURE__ */
|
|
6001
|
-
ACTION_CATEGORIES.map((category) => /* @__PURE__ */
|
|
6205
|
+
/* @__PURE__ */ React75.createElement(Tabs2.List, null, ACTION_CATEGORIES.map((category) => /* @__PURE__ */ React75.createElement(Tabs2.Tab, { key: category.id, value: category.id }, /* @__PURE__ */ React75.createElement(Group19, { gap: "xs" }, /* @__PURE__ */ React75.createElement("span", null, category.icon), /* @__PURE__ */ React75.createElement("span", null, category.label))))),
|
|
6206
|
+
ACTION_CATEGORIES.map((category) => /* @__PURE__ */ React75.createElement(Tabs2.Panel, { key: category.id, value: category.id, mt: 10 }, /* @__PURE__ */ React75.createElement(SimpleGrid, { cols: 2, spacing: "xs" }, (categorizedActions.get(category.id) || []).map((config) => /* @__PURE__ */ React75.createElement(
|
|
6002
6207
|
Paper5,
|
|
6003
6208
|
{
|
|
6004
6209
|
key: config.value,
|
|
@@ -6012,9 +6217,9 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
|
|
|
6012
6217
|
},
|
|
6013
6218
|
onClick: () => setSelectedActionType(config.value)
|
|
6014
6219
|
},
|
|
6015
|
-
/* @__PURE__ */
|
|
6220
|
+
/* @__PURE__ */ React75.createElement(Stack59, { gap: "xs" }, /* @__PURE__ */ React75.createElement(Group19, { justify: "space-between" }, /* @__PURE__ */ React75.createElement(Text36, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, config.label), selectedActionType === config.value && /* @__PURE__ */ React75.createElement(Badge8, { size: "xs", style: { backgroundColor: "#4dabf7" } }, "Selected")), config.description && /* @__PURE__ */ React75.createElement(Text36, { size: "xs", style: { color: "#adb5bd" } }, config.description))
|
|
6016
6221
|
)))))
|
|
6017
|
-
)) : /* @__PURE__ */
|
|
6222
|
+
)) : /* @__PURE__ */ React75.createElement(
|
|
6018
6223
|
Card12,
|
|
6019
6224
|
{
|
|
6020
6225
|
withBorder: true,
|
|
@@ -6024,7 +6229,7 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
|
|
|
6024
6229
|
borderColor: "#333"
|
|
6025
6230
|
}
|
|
6026
6231
|
},
|
|
6027
|
-
/* @__PURE__ */
|
|
6232
|
+
/* @__PURE__ */ React75.createElement(Group19, { justify: "space-between" }, /* @__PURE__ */ React75.createElement(Group19, { gap: "xs" }, /* @__PURE__ */ React75.createElement(
|
|
6028
6233
|
Badge8,
|
|
6029
6234
|
{
|
|
6030
6235
|
size: "sm",
|
|
@@ -6034,10 +6239,10 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
|
|
|
6034
6239
|
}
|
|
6035
6240
|
},
|
|
6036
6241
|
currentActionConfig?.label || selectedActionType
|
|
6037
|
-
), /* @__PURE__ */
|
|
6038
|
-
), /* @__PURE__ */
|
|
6242
|
+
), /* @__PURE__ */ React75.createElement(Text36, { size: "sm", style: { color: "#adb5bd" } }, "(Editing)")))
|
|
6243
|
+
), /* @__PURE__ */ React75.createElement(Divider4, { color: "#333" }), /* @__PURE__ */ React75.createElement(ScrollArea3, { style: { flex: 1 } }, renderActionForm()), /* @__PURE__ */ React75.createElement(Divider4, { color: "#333" }), /* @__PURE__ */ React75.createElement(Stack59, { gap: "xs" }, /* @__PURE__ */ React75.createElement(Text36, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Current Actions (", actions.length, ")"), /* @__PURE__ */ React75.createElement(ScrollArea3, { h: 100 }, /* @__PURE__ */ React75.createElement(Stack59, { gap: "xs" }, actions.map((action, index) => {
|
|
6039
6244
|
const config = getActionConfig(action.type);
|
|
6040
|
-
return /* @__PURE__ */
|
|
6245
|
+
return /* @__PURE__ */ React75.createElement(
|
|
6041
6246
|
Card12,
|
|
6042
6247
|
{
|
|
6043
6248
|
key: index,
|
|
@@ -6050,7 +6255,7 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
|
|
|
6050
6255
|
opacity: index === editingIndex ? 0.7 : 1
|
|
6051
6256
|
}
|
|
6052
6257
|
},
|
|
6053
|
-
/* @__PURE__ */
|
|
6258
|
+
/* @__PURE__ */ React75.createElement(Group19, { gap: "xs" }, /* @__PURE__ */ React75.createElement(
|
|
6054
6259
|
Badge8,
|
|
6055
6260
|
{
|
|
6056
6261
|
size: "sm",
|
|
@@ -6060,9 +6265,9 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
|
|
|
6060
6265
|
}
|
|
6061
6266
|
},
|
|
6062
6267
|
config?.label || action.type
|
|
6063
|
-
), /* @__PURE__ */
|
|
6268
|
+
), /* @__PURE__ */ React75.createElement(Text36, { size: "sm", style: { color: "#adb5bd" } }, config?.getSummary(action.data) || "Action"), index === editingIndex && /* @__PURE__ */ React75.createElement(Badge8, { size: "xs", style: { backgroundColor: "#4dabf7", color: "#fff" } }, "Editing"))
|
|
6064
6269
|
);
|
|
6065
|
-
})))), /* @__PURE__ */
|
|
6270
|
+
})))), /* @__PURE__ */ React75.createElement(Group19, { justify: "flex-end", mt: "md" }, /* @__PURE__ */ React75.createElement(
|
|
6066
6271
|
Button11,
|
|
6067
6272
|
{
|
|
6068
6273
|
variant: "default",
|
|
@@ -6077,7 +6282,7 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
|
|
|
6077
6282
|
}
|
|
6078
6283
|
},
|
|
6079
6284
|
"Cancel"
|
|
6080
|
-
), /* @__PURE__ */
|
|
6285
|
+
), /* @__PURE__ */ React75.createElement(
|
|
6081
6286
|
Button11,
|
|
6082
6287
|
{
|
|
6083
6288
|
onClick: handleSave,
|
|
@@ -6150,8 +6355,8 @@ var ActionsTab = ({ actions, onActionsChange, editor, block }) => {
|
|
|
6150
6355
|
setIsEditorVisible(false);
|
|
6151
6356
|
setEditingIndex(null);
|
|
6152
6357
|
}, []);
|
|
6153
|
-
return /* @__PURE__ */
|
|
6154
|
-
}, onEditAction: handleEditAction, onRemoveAction: handleRemoveAction }), isEditorVisible && /* @__PURE__ */
|
|
6358
|
+
return /* @__PURE__ */ React76.createElement(Stack60, { gap: "md" }, /* @__PURE__ */ React76.createElement(ActionsCard, { actions: currentActions, isSelected: false, onClick: () => {
|
|
6359
|
+
}, onEditAction: handleEditAction, onRemoveAction: handleRemoveAction }), isEditorVisible && /* @__PURE__ */ React76.createElement(
|
|
6155
6360
|
Card13,
|
|
6156
6361
|
{
|
|
6157
6362
|
withBorder: true,
|
|
@@ -6162,15 +6367,15 @@ var ActionsTab = ({ actions, onActionsChange, editor, block }) => {
|
|
|
6162
6367
|
borderColor: "#333"
|
|
6163
6368
|
}
|
|
6164
6369
|
},
|
|
6165
|
-
/* @__PURE__ */
|
|
6370
|
+
/* @__PURE__ */ React76.createElement(ActionsPanel, { actions: currentActions, editingIndex, onSave: handleSaveAction, onCancel: handleCancelEditor, isTemplateMode: true })
|
|
6166
6371
|
));
|
|
6167
6372
|
};
|
|
6168
6373
|
|
|
6169
6374
|
// src/mantine/blocks/proposal/template/VoteTab.tsx
|
|
6170
|
-
import
|
|
6171
|
-
import { Stack as
|
|
6375
|
+
import React77 from "react";
|
|
6376
|
+
import { Stack as Stack61, TextInput as TextInput32 } from "@mantine/core";
|
|
6172
6377
|
var VoteTab = ({ voteTitle, voteSubtitle, voteIcon, onVoteTitleChange, onVoteSubtitleChange, onVoteIconChange }) => {
|
|
6173
|
-
return /* @__PURE__ */
|
|
6378
|
+
return /* @__PURE__ */ React77.createElement(Stack61, { gap: "md" }, /* @__PURE__ */ React77.createElement(TextInput32, { label: "Vote Button Title", placeholder: "Vote on this proposal", value: voteTitle, onChange: (event) => onVoteTitleChange(event.currentTarget.value) }), /* @__PURE__ */ React77.createElement(TextInput32, { label: "Vote Button Subtitle", placeholder: "Cast your vote", value: voteSubtitle, onChange: (event) => onVoteSubtitleChange(event.currentTarget.value) }), /* @__PURE__ */ React77.createElement(TextInput32, { label: "Vote Icon", placeholder: "checklist", value: voteIcon, onChange: (event) => onVoteIconChange(event.currentTarget.value) }));
|
|
6174
6379
|
};
|
|
6175
6380
|
|
|
6176
6381
|
// src/mantine/blocks/proposal/template/TemplateConfig.tsx
|
|
@@ -6187,7 +6392,7 @@ var TemplateConfig3 = ({ editor, block }) => {
|
|
|
6187
6392
|
},
|
|
6188
6393
|
[editor, block]
|
|
6189
6394
|
);
|
|
6190
|
-
return /* @__PURE__ */
|
|
6395
|
+
return /* @__PURE__ */ React78.createElement(
|
|
6191
6396
|
Paper6,
|
|
6192
6397
|
{
|
|
6193
6398
|
p: "md",
|
|
@@ -6198,7 +6403,7 @@ var TemplateConfig3 = ({ editor, block }) => {
|
|
|
6198
6403
|
flexDirection: "column"
|
|
6199
6404
|
}
|
|
6200
6405
|
},
|
|
6201
|
-
/* @__PURE__ */
|
|
6406
|
+
/* @__PURE__ */ React78.createElement(
|
|
6202
6407
|
"div",
|
|
6203
6408
|
{
|
|
6204
6409
|
style: {
|
|
@@ -6208,17 +6413,17 @@ var TemplateConfig3 = ({ editor, block }) => {
|
|
|
6208
6413
|
marginBottom: "1rem"
|
|
6209
6414
|
}
|
|
6210
6415
|
},
|
|
6211
|
-
/* @__PURE__ */
|
|
6212
|
-
/* @__PURE__ */
|
|
6416
|
+
/* @__PURE__ */ React78.createElement(Title5, { order: 3 }, "Proposal Settings"),
|
|
6417
|
+
/* @__PURE__ */ React78.createElement(CloseButton4, { onClick: closePanel })
|
|
6213
6418
|
),
|
|
6214
|
-
/* @__PURE__ */
|
|
6419
|
+
/* @__PURE__ */ React78.createElement(
|
|
6215
6420
|
ReusablePanel,
|
|
6216
6421
|
{
|
|
6217
6422
|
extraTabs: [
|
|
6218
6423
|
{
|
|
6219
6424
|
label: "General",
|
|
6220
6425
|
value: "general",
|
|
6221
|
-
content: /* @__PURE__ */
|
|
6426
|
+
content: /* @__PURE__ */ React78.createElement(
|
|
6222
6427
|
GeneralTab3,
|
|
6223
6428
|
{
|
|
6224
6429
|
title: block.props.title || "",
|
|
@@ -6233,12 +6438,12 @@ var TemplateConfig3 = ({ editor, block }) => {
|
|
|
6233
6438
|
{
|
|
6234
6439
|
label: "Actions",
|
|
6235
6440
|
value: "actions",
|
|
6236
|
-
content: /* @__PURE__ */
|
|
6441
|
+
content: /* @__PURE__ */ React78.createElement(ActionsTab, { actions: block.props.actions || "[]", onActionsChange: (actions) => updateProp("actions", JSON.stringify(actions)), editor, block })
|
|
6237
6442
|
},
|
|
6238
6443
|
{
|
|
6239
6444
|
label: "Vote",
|
|
6240
6445
|
value: "vote",
|
|
6241
|
-
content: /* @__PURE__ */
|
|
6446
|
+
content: /* @__PURE__ */ React78.createElement(
|
|
6242
6447
|
VoteTab,
|
|
6243
6448
|
{
|
|
6244
6449
|
voteTitle: block.props.voteTitle || "",
|
|
@@ -6258,21 +6463,21 @@ var TemplateConfig3 = ({ editor, block }) => {
|
|
|
6258
6463
|
};
|
|
6259
6464
|
|
|
6260
6465
|
// src/mantine/blocks/proposal/template/TemplateView.tsx
|
|
6261
|
-
import { Card as Card14, Group as Group20, Stack as
|
|
6466
|
+
import { Card as Card14, Group as Group20, Stack as Stack62, Text as Text37, ActionIcon as ActionIcon8 } from "@mantine/core";
|
|
6262
6467
|
var PROPOSAL_TEMPLATE_PANEL_ID = "proposal-template-panel";
|
|
6263
6468
|
var ProposalTemplateView = ({ editor, block }) => {
|
|
6264
6469
|
const panelId = `${PROPOSAL_TEMPLATE_PANEL_ID}-${block.id}`;
|
|
6265
|
-
const panelContent = useMemo10(() => /* @__PURE__ */
|
|
6470
|
+
const panelContent = useMemo10(() => /* @__PURE__ */ React79.createElement(TemplateConfig3, { editor, block }), [editor, block]);
|
|
6266
6471
|
const { open } = usePanel(panelId, panelContent);
|
|
6267
|
-
return /* @__PURE__ */
|
|
6472
|
+
return /* @__PURE__ */ React79.createElement(Card14, { withBorder: true, padding: "md", radius: "md", style: { width: "100%", cursor: "pointer" }, onClick: open }, /* @__PURE__ */ React79.createElement(Group20, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React79.createElement(Group20, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React79.createElement(ActionIcon8, { variant: "light", color: "blue", size: "lg", radius: "xl", style: { flexShrink: 0 } }, getIcon(block.props.icon, 18, 1.5, "file-text")), /* @__PURE__ */ React79.createElement(Stack62, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React79.createElement(Text37, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Proposal Title"), /* @__PURE__ */ React79.createElement(Text37, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description || "Proposal description"))), /* @__PURE__ */ React79.createElement(Text37, { size: "xs", c: "dimmed", contentEditable: false }, block.props.status || "draft")));
|
|
6268
6473
|
};
|
|
6269
6474
|
|
|
6270
6475
|
// src/mantine/blocks/proposal/flow/FlowView.tsx
|
|
6271
|
-
import
|
|
6476
|
+
import React84, { useMemo as useMemo11 } from "react";
|
|
6272
6477
|
|
|
6273
6478
|
// src/mantine/blocks/proposal/components/OnChainProposalCard.tsx
|
|
6274
|
-
import
|
|
6275
|
-
import { Card as Card15, Group as Group21, Stack as
|
|
6479
|
+
import React80 from "react";
|
|
6480
|
+
import { Card as Card15, Group as Group21, Stack as Stack63, Text as Text38, Skeleton, Badge as Badge9, Button as Button13, ActionIcon as ActionIcon9 } from "@mantine/core";
|
|
6276
6481
|
var statusColor = {
|
|
6277
6482
|
open: "#4dabf7",
|
|
6278
6483
|
passed: "#51cf66",
|
|
@@ -6301,7 +6506,7 @@ var OnChainProposalCard = ({
|
|
|
6301
6506
|
onVote,
|
|
6302
6507
|
voteEnabled = false
|
|
6303
6508
|
}) => {
|
|
6304
|
-
return /* @__PURE__ */
|
|
6509
|
+
return /* @__PURE__ */ React80.createElement(
|
|
6305
6510
|
Card15,
|
|
6306
6511
|
{
|
|
6307
6512
|
shadow: "sm",
|
|
@@ -6314,9 +6519,9 @@ var OnChainProposalCard = ({
|
|
|
6314
6519
|
},
|
|
6315
6520
|
onClick
|
|
6316
6521
|
},
|
|
6317
|
-
isFetching && /* @__PURE__ */
|
|
6318
|
-
error && /* @__PURE__ */
|
|
6319
|
-
!isFetching && /* @__PURE__ */
|
|
6522
|
+
isFetching && /* @__PURE__ */ React80.createElement(Stack63, null, /* @__PURE__ */ React80.createElement(Skeleton, { height: 20, width: "70%" }), /* @__PURE__ */ React80.createElement(Skeleton, { height: 16 }), /* @__PURE__ */ React80.createElement(Skeleton, { height: 16, width: "40%" })),
|
|
6523
|
+
error && /* @__PURE__ */ React80.createElement(Text38, { size: "sm", c: "red" }, typeof error === "string" ? error : error.message || "An error occurred while loading the proposal."),
|
|
6524
|
+
!isFetching && /* @__PURE__ */ React80.createElement(Group21, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React80.createElement(Group21, { align: "flex-start", gap: "md", style: { flex: 1 } }, /* @__PURE__ */ React80.createElement(ActionIcon9, { variant: "light", color: "blue", size: "xl", radius: "xl", style: { flexShrink: 0 } }, getIcon(icon, 24, 1.5, "file-text")), /* @__PURE__ */ React80.createElement(Stack63, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React80.createElement(Group21, { gap: "xs" }, /* @__PURE__ */ React80.createElement(Text38, { size: "md", fw: 600 }, title || "Proposal"), /* @__PURE__ */ React80.createElement(Badge9, { color: statusColor[status], variant: "filled", size: "sm", radius: "sm" }, status.replace(/_/g, " ").toUpperCase())), /* @__PURE__ */ React80.createElement(Text38, { size: "sm", c: "dimmed" }, getDisplayDescription(description)))), /* @__PURE__ */ React80.createElement(Group21, { gap: "xs" }, voteEnabled && onVote && status === "open" && /* @__PURE__ */ React80.createElement(
|
|
6320
6525
|
Button13,
|
|
6321
6526
|
{
|
|
6322
6527
|
size: "sm",
|
|
@@ -6329,7 +6534,7 @@ var OnChainProposalCard = ({
|
|
|
6329
6534
|
style: { flexShrink: 0 }
|
|
6330
6535
|
},
|
|
6331
6536
|
"Vote"
|
|
6332
|
-
), status === "passed" && onExecute && /* @__PURE__ */
|
|
6537
|
+
), status === "passed" && onExecute && /* @__PURE__ */ React80.createElement(
|
|
6333
6538
|
Button13,
|
|
6334
6539
|
{
|
|
6335
6540
|
size: "sm",
|
|
@@ -6348,8 +6553,8 @@ var OnChainProposalCard = ({
|
|
|
6348
6553
|
};
|
|
6349
6554
|
|
|
6350
6555
|
// src/mantine/blocks/proposal/flow/FlowConfig.tsx
|
|
6351
|
-
import
|
|
6352
|
-
import { Paper as Paper7, CloseButton as CloseButton5, Title as
|
|
6556
|
+
import React83, { useCallback as useCallback14, useState as useState21 } from "react";
|
|
6557
|
+
import { Paper as Paper7, CloseButton as CloseButton5, Title as Title6, Stack as Stack66, TextInput as TextInput33, Textarea as Textarea18, Button as Button16, Text as Text41, Card as Card18 } from "@mantine/core";
|
|
6353
6558
|
|
|
6354
6559
|
// src/mantine/blocks/proposal/flow/useFlowBusinessLogic.ts
|
|
6355
6560
|
import { useEffect as useEffect12, useState as useState17 } from "react";
|
|
@@ -6589,8 +6794,8 @@ var useVoteBusinessLogic = ({ block, editor }) => {
|
|
|
6589
6794
|
};
|
|
6590
6795
|
|
|
6591
6796
|
// src/mantine/blocks/proposal/flow/VoteGeneralTab.tsx
|
|
6592
|
-
import
|
|
6593
|
-
import { Stack as
|
|
6797
|
+
import React81, { useState as useState19 } from "react";
|
|
6798
|
+
import { Stack as Stack64, Text as Text39, Group as Group22, Card as Card16, Button as Button14, Progress as Progress2, Box as Box16, Textarea as Textarea17, Tooltip as Tooltip3 } from "@mantine/core";
|
|
6594
6799
|
var getVoteIcon = (voteType) => {
|
|
6595
6800
|
switch (voteType) {
|
|
6596
6801
|
case "yes":
|
|
@@ -6632,7 +6837,7 @@ var FlowGeneralTab = ({
|
|
|
6632
6837
|
setRationale("");
|
|
6633
6838
|
}
|
|
6634
6839
|
};
|
|
6635
|
-
return /* @__PURE__ */
|
|
6840
|
+
return /* @__PURE__ */ React81.createElement(Stack64, { gap: "lg" }, !hasSubmittedProposal && /* @__PURE__ */ React81.createElement(
|
|
6636
6841
|
Card16,
|
|
6637
6842
|
{
|
|
6638
6843
|
padding: "md",
|
|
@@ -6643,8 +6848,8 @@ var FlowGeneralTab = ({
|
|
|
6643
6848
|
color: "#f1f3f5"
|
|
6644
6849
|
}
|
|
6645
6850
|
},
|
|
6646
|
-
/* @__PURE__ */
|
|
6647
|
-
|
|
6851
|
+
/* @__PURE__ */ React81.createElement(Group22, { gap: "xs", align: "center" }, /* @__PURE__ */ React81.createElement(
|
|
6852
|
+
Box16,
|
|
6648
6853
|
{
|
|
6649
6854
|
style: {
|
|
6650
6855
|
width: 8,
|
|
@@ -6653,9 +6858,9 @@ var FlowGeneralTab = ({
|
|
|
6653
6858
|
borderRadius: "50%"
|
|
6654
6859
|
}
|
|
6655
6860
|
}
|
|
6656
|
-
), /* @__PURE__ */
|
|
6657
|
-
/* @__PURE__ */
|
|
6658
|
-
), /* @__PURE__ */
|
|
6861
|
+
), /* @__PURE__ */ React81.createElement(Text39, { size: "sm", fw: 500, style: { color: "#ffd43b" } }, "Waiting for Proposal Submission")),
|
|
6862
|
+
/* @__PURE__ */ React81.createElement(Text39, { size: "xs", style: { color: "#adb5bd", marginTop: 4 } }, "The connected proposal needs to be submitted before voting can begin.")
|
|
6863
|
+
), /* @__PURE__ */ React81.createElement(
|
|
6659
6864
|
Card16,
|
|
6660
6865
|
{
|
|
6661
6866
|
padding: "lg",
|
|
@@ -6667,8 +6872,8 @@ var FlowGeneralTab = ({
|
|
|
6667
6872
|
opacity: !hasSubmittedProposal ? 0.6 : 1
|
|
6668
6873
|
}
|
|
6669
6874
|
},
|
|
6670
|
-
/* @__PURE__ */
|
|
6671
|
-
|
|
6875
|
+
/* @__PURE__ */ React81.createElement(Stack64, { gap: "xs" }, /* @__PURE__ */ React81.createElement(Group22, { justify: "space-between" }, /* @__PURE__ */ React81.createElement(Group22, { gap: "xs" }, /* @__PURE__ */ React81.createElement(
|
|
6876
|
+
Box16,
|
|
6672
6877
|
{
|
|
6673
6878
|
w: 8,
|
|
6674
6879
|
h: 8,
|
|
@@ -6677,8 +6882,8 @@ var FlowGeneralTab = ({
|
|
|
6677
6882
|
borderRadius: "50%"
|
|
6678
6883
|
}
|
|
6679
6884
|
}
|
|
6680
|
-
), /* @__PURE__ */
|
|
6681
|
-
|
|
6885
|
+
), /* @__PURE__ */ React81.createElement(Text39, { size: "sm", style: { color: "#adb5bd" } }, "Status")), /* @__PURE__ */ React81.createElement(Text39, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, hasSubmittedProposal ? proposalStatus === "open" ? "Active" : proposalStatus || "Active" : "Waiting")), /* @__PURE__ */ React81.createElement(Group22, { justify: "space-between" }, /* @__PURE__ */ React81.createElement(Group22, { gap: "xs" }, /* @__PURE__ */ React81.createElement(Box16, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React81.createElement(Text39, { size: "sm", style: { color: "#adb5bd" } }, "Proposal ID")), /* @__PURE__ */ React81.createElement(Text39, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, hasSubmittedProposal ? `#${proposalId}` : "TBD")), /* @__PURE__ */ React81.createElement(Group22, { justify: "space-between" }, /* @__PURE__ */ React81.createElement(Group22, { gap: "xs" }, /* @__PURE__ */ React81.createElement(Box16, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React81.createElement(Text39, { size: "sm", style: { color: "#adb5bd" } }, "Title")), /* @__PURE__ */ React81.createElement(
|
|
6886
|
+
Text39,
|
|
6682
6887
|
{
|
|
6683
6888
|
size: "sm",
|
|
6684
6889
|
fw: 500,
|
|
@@ -6687,8 +6892,8 @@ var FlowGeneralTab = ({
|
|
|
6687
6892
|
}
|
|
6688
6893
|
},
|
|
6689
6894
|
hasSubmittedProposal ? proposalTitle || "Untitled" : "N/A"
|
|
6690
|
-
)), /* @__PURE__ */
|
|
6691
|
-
/* @__PURE__ */
|
|
6895
|
+
)), /* @__PURE__ */ React81.createElement(Group22, { justify: "space-between" }, /* @__PURE__ */ React81.createElement(Group22, { gap: "xs" }, /* @__PURE__ */ React81.createElement(Box16, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React81.createElement(Text39, { size: "sm", style: { color: "#adb5bd" } }, "Description")), /* @__PURE__ */ React81.createElement(Text39, { size: "sm", fw: 500, style: { color: "#f1f3f5" }, title: proposalDescription }, hasSubmittedProposal ? proposalDescription ? proposalDescription.length > 30 ? proposalDescription.substring(0, 30) + "..." : proposalDescription : "No description" : "N/A")), /* @__PURE__ */ React81.createElement(Group22, { justify: "space-between" }, /* @__PURE__ */ React81.createElement(Group22, { gap: "xs" }, /* @__PURE__ */ React81.createElement(Box16, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React81.createElement(Text39, { size: "sm", style: { color: "#adb5bd" } }, "My Vote")), /* @__PURE__ */ React81.createElement(Text39, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, hasSubmittedProposal ? userVote?.vote ? userVote.vote.vote : "Pending" : "N/A"))),
|
|
6896
|
+
/* @__PURE__ */ React81.createElement(Stack64, { gap: "xs" }, /* @__PURE__ */ React81.createElement(Text39, { size: "sm", style: { color: "#adb5bd" } }, hasSubmittedProposal ? "Voting is open" : "Voting pending"), /* @__PURE__ */ React81.createElement(
|
|
6692
6897
|
Progress2,
|
|
6693
6898
|
{
|
|
6694
6899
|
value: hasSubmittedProposal ? 75 : 0,
|
|
@@ -6701,7 +6906,7 @@ var FlowGeneralTab = ({
|
|
|
6701
6906
|
}
|
|
6702
6907
|
}
|
|
6703
6908
|
))
|
|
6704
|
-
), hasSubmittedProposal && !hasVoted && (status === "open" || proposalStatus === "open") && /* @__PURE__ */
|
|
6909
|
+
), hasSubmittedProposal && !hasVoted && (status === "open" || proposalStatus === "open") && /* @__PURE__ */ React81.createElement(Stack64, { gap: "lg" }, disabled && isDisabled?.message && /* @__PURE__ */ React81.createElement(
|
|
6705
6910
|
Card16,
|
|
6706
6911
|
{
|
|
6707
6912
|
padding: "md",
|
|
@@ -6712,8 +6917,8 @@ var FlowGeneralTab = ({
|
|
|
6712
6917
|
color: "#f1f3f5"
|
|
6713
6918
|
}
|
|
6714
6919
|
},
|
|
6715
|
-
/* @__PURE__ */
|
|
6716
|
-
|
|
6920
|
+
/* @__PURE__ */ React81.createElement(Group22, { gap: "xs", align: "center" }, /* @__PURE__ */ React81.createElement(
|
|
6921
|
+
Box16,
|
|
6717
6922
|
{
|
|
6718
6923
|
style: {
|
|
6719
6924
|
width: 8,
|
|
@@ -6722,8 +6927,8 @@ var FlowGeneralTab = ({
|
|
|
6722
6927
|
borderRadius: "50%"
|
|
6723
6928
|
}
|
|
6724
6929
|
}
|
|
6725
|
-
), /* @__PURE__ */
|
|
6726
|
-
), /* @__PURE__ */
|
|
6930
|
+
), /* @__PURE__ */ React81.createElement(Text39, { size: "sm", fw: 500, style: { color: "#ffd43b" } }, isDisabled.message))
|
|
6931
|
+
), /* @__PURE__ */ React81.createElement(Stack64, { gap: "md" }, ["yes", "no", "no_with_veto", "abstain"].map((voteType) => /* @__PURE__ */ React81.createElement(Tooltip3, { key: voteType, label: disabled ? isDisabled?.message : void 0, disabled: !disabled, position: "top" }, /* @__PURE__ */ React81.createElement(
|
|
6727
6932
|
Button14,
|
|
6728
6933
|
{
|
|
6729
6934
|
variant: "outline",
|
|
@@ -6742,8 +6947,8 @@ var FlowGeneralTab = ({
|
|
|
6742
6947
|
opacity: disabled ? 0.5 : 1
|
|
6743
6948
|
}
|
|
6744
6949
|
},
|
|
6745
|
-
/* @__PURE__ */
|
|
6746
|
-
)))), /* @__PURE__ */
|
|
6950
|
+
/* @__PURE__ */ React81.createElement(Text39, { fw: 500, tt: "capitalize", style: { textAlign: "left" } }, voteType === "no_with_veto" ? "No with Veto" : voteType)
|
|
6951
|
+
)))), /* @__PURE__ */ React81.createElement(Stack64, { gap: "xs" }, /* @__PURE__ */ React81.createElement(Text39, { size: "sm", style: { color: "#adb5bd" } }, "Rationale (optional)"), /* @__PURE__ */ React81.createElement(
|
|
6747
6952
|
Textarea17,
|
|
6748
6953
|
{
|
|
6749
6954
|
value: rationale,
|
|
@@ -6760,7 +6965,7 @@ var FlowGeneralTab = ({
|
|
|
6760
6965
|
}
|
|
6761
6966
|
}
|
|
6762
6967
|
}
|
|
6763
|
-
))), (status === "executed" || proposalStatus === "executed") && /* @__PURE__ */
|
|
6968
|
+
))), (status === "executed" || proposalStatus === "executed") && /* @__PURE__ */ React81.createElement(
|
|
6764
6969
|
Card16,
|
|
6765
6970
|
{
|
|
6766
6971
|
padding: "md",
|
|
@@ -6770,8 +6975,8 @@ var FlowGeneralTab = ({
|
|
|
6770
6975
|
border: "1px solid #333"
|
|
6771
6976
|
}
|
|
6772
6977
|
},
|
|
6773
|
-
/* @__PURE__ */
|
|
6774
|
-
), !hasSubmittedProposal && /* @__PURE__ */
|
|
6978
|
+
/* @__PURE__ */ React81.createElement(Stack64, { gap: "xs" }, /* @__PURE__ */ React81.createElement(Text39, { fw: 500, size: "sm", style: { color: "#f1f3f5" } }, "Proposal Executed"), /* @__PURE__ */ React81.createElement(Text39, { size: "sm", style: { color: "#adb5bd" } }, "This proposal has been successfully executed."))
|
|
6979
|
+
), !hasSubmittedProposal && /* @__PURE__ */ React81.createElement(Stack64, { gap: "lg" }, /* @__PURE__ */ React81.createElement(Stack64, { gap: "md" }, ["yes", "no", "no_with_veto", "abstain"].map((voteType) => /* @__PURE__ */ React81.createElement(Tooltip3, { key: voteType, label: "Proposal must be submitted before voting", position: "top" }, /* @__PURE__ */ React81.createElement(
|
|
6775
6980
|
Button14,
|
|
6776
6981
|
{
|
|
6777
6982
|
variant: "outline",
|
|
@@ -6788,8 +6993,8 @@ var FlowGeneralTab = ({
|
|
|
6788
6993
|
opacity: 0.5
|
|
6789
6994
|
}
|
|
6790
6995
|
},
|
|
6791
|
-
/* @__PURE__ */
|
|
6792
|
-
))))), hasSubmittedProposal && !hasVoted && selectedVote && (status === "open" || proposalStatus === "open") && /* @__PURE__ */
|
|
6996
|
+
/* @__PURE__ */ React81.createElement(Text39, { fw: 500, tt: "capitalize", style: { textAlign: "left" } }, voteType === "no_with_veto" ? "No with Veto" : voteType)
|
|
6997
|
+
))))), hasSubmittedProposal && !hasVoted && selectedVote && (status === "open" || proposalStatus === "open") && /* @__PURE__ */ React81.createElement(Tooltip3, { label: disabled ? isDisabled?.message : "Sign to vote", position: "top" }, /* @__PURE__ */ React81.createElement("div", null, /* @__PURE__ */ React81.createElement(
|
|
6793
6998
|
Button14,
|
|
6794
6999
|
{
|
|
6795
7000
|
size: "sm",
|
|
@@ -6805,7 +7010,7 @@ var FlowGeneralTab = ({
|
|
|
6805
7010
|
}
|
|
6806
7011
|
},
|
|
6807
7012
|
"Sign"
|
|
6808
|
-
))), hasVoted && hasSubmittedProposal && /* @__PURE__ */
|
|
7013
|
+
))), hasVoted && hasSubmittedProposal && /* @__PURE__ */ React81.createElement(
|
|
6809
7014
|
Card16,
|
|
6810
7015
|
{
|
|
6811
7016
|
padding: "md",
|
|
@@ -6816,8 +7021,8 @@ var FlowGeneralTab = ({
|
|
|
6816
7021
|
color: "#f1f3f5"
|
|
6817
7022
|
}
|
|
6818
7023
|
},
|
|
6819
|
-
/* @__PURE__ */
|
|
6820
|
-
|
|
7024
|
+
/* @__PURE__ */ React81.createElement(Stack64, { gap: "xs" }, /* @__PURE__ */ React81.createElement(Group22, { gap: "xs", align: "center" }, /* @__PURE__ */ React81.createElement(
|
|
7025
|
+
Box16,
|
|
6821
7026
|
{
|
|
6822
7027
|
style: {
|
|
6823
7028
|
width: 8,
|
|
@@ -6826,13 +7031,13 @@ var FlowGeneralTab = ({
|
|
|
6826
7031
|
borderRadius: "50%"
|
|
6827
7032
|
}
|
|
6828
7033
|
}
|
|
6829
|
-
), /* @__PURE__ */
|
|
7034
|
+
), /* @__PURE__ */ React81.createElement(Text39, { size: "sm", fw: 500, style: { color: "#51cf66" } }, "Vote Submitted")), /* @__PURE__ */ React81.createElement(Text39, { size: "xs", style: { color: "#adb5bd" } }, "You have already voted on this proposal. Your vote:", " ", /* @__PURE__ */ React81.createElement(Text39, { span: true, fw: 500, tt: "capitalize" }, userVote?.vote?.vote)))
|
|
6830
7035
|
));
|
|
6831
7036
|
};
|
|
6832
7037
|
|
|
6833
7038
|
// src/mantine/blocks/proposal/flow/ActionsTab.tsx
|
|
6834
|
-
import
|
|
6835
|
-
import { Alert as Alert8, Button as Button15, Card as Card17, Stack as
|
|
7039
|
+
import React82, { useCallback as useCallback13, useEffect as useEffect14, useState as useState20 } from "react";
|
|
7040
|
+
import { Alert as Alert8, Button as Button15, Card as Card17, Stack as Stack65, Text as Text40 } from "@mantine/core";
|
|
6836
7041
|
var ActionsTab2 = ({ actions, onActionsChange, editor, block, isProposalCreated }) => {
|
|
6837
7042
|
const [isEditorVisible, setIsEditorVisible] = useState20(false);
|
|
6838
7043
|
const [editingIndex, setEditingIndex] = useState20(null);
|
|
@@ -6891,7 +7096,7 @@ var ActionsTab2 = ({ actions, onActionsChange, editor, block, isProposalCreated
|
|
|
6891
7096
|
setIsEditorVisible(false);
|
|
6892
7097
|
setEditingIndex(null);
|
|
6893
7098
|
}, []);
|
|
6894
|
-
return /* @__PURE__ */
|
|
7099
|
+
return /* @__PURE__ */ React82.createElement(Stack65, { gap: "md" }, isProposalCreated && /* @__PURE__ */ React82.createElement(Alert8, { color: "yellow", title: "Actions Locked" }, /* @__PURE__ */ React82.createElement(Text40, { size: "sm" }, "Actions cannot be edited after the proposal has been created. These actions are now part of the on-chain proposal.")), /* @__PURE__ */ React82.createElement(Stack65, { gap: "sm" }, !isProposalCreated && /* @__PURE__ */ React82.createElement(
|
|
6895
7100
|
Button15,
|
|
6896
7101
|
{
|
|
6897
7102
|
onClick: handleAddAction,
|
|
@@ -6903,7 +7108,7 @@ var ActionsTab2 = ({ actions, onActionsChange, editor, block, isProposalCreated
|
|
|
6903
7108
|
}
|
|
6904
7109
|
},
|
|
6905
7110
|
"Add Action"
|
|
6906
|
-
), /* @__PURE__ */
|
|
7111
|
+
), /* @__PURE__ */ React82.createElement(
|
|
6907
7112
|
ActionsCard,
|
|
6908
7113
|
{
|
|
6909
7114
|
actions: currentActions,
|
|
@@ -6914,7 +7119,7 @@ var ActionsTab2 = ({ actions, onActionsChange, editor, block, isProposalCreated
|
|
|
6914
7119
|
onRemoveAction: handleRemoveAction,
|
|
6915
7120
|
disabled: isProposalCreated
|
|
6916
7121
|
}
|
|
6917
|
-
)), !isProposalCreated && isEditorVisible && /* @__PURE__ */
|
|
7122
|
+
)), !isProposalCreated && isEditorVisible && /* @__PURE__ */ React82.createElement(
|
|
6918
7123
|
Card17,
|
|
6919
7124
|
{
|
|
6920
7125
|
withBorder: true,
|
|
@@ -6925,7 +7130,7 @@ var ActionsTab2 = ({ actions, onActionsChange, editor, block, isProposalCreated
|
|
|
6925
7130
|
borderColor: "#333"
|
|
6926
7131
|
}
|
|
6927
7132
|
},
|
|
6928
|
-
/* @__PURE__ */
|
|
7133
|
+
/* @__PURE__ */ React82.createElement(ActionsPanel, { actions: currentActions, editingIndex, onSave: handleSaveAction, onCancel: handleCancelEditor, isTemplateMode: false })
|
|
6929
7134
|
));
|
|
6930
7135
|
};
|
|
6931
7136
|
|
|
@@ -6978,7 +7183,7 @@ var FlowConfig = ({ editor, block }) => {
|
|
|
6978
7183
|
setIsCreating(false);
|
|
6979
7184
|
}
|
|
6980
7185
|
};
|
|
6981
|
-
const createProposalTab = /* @__PURE__ */
|
|
7186
|
+
const createProposalTab = /* @__PURE__ */ React83.createElement(Stack66, { gap: "lg" }, coreAddress && /* @__PURE__ */ React83.createElement(Card18, { padding: "sm", radius: "md", withBorder: true }, /* @__PURE__ */ React83.createElement(Text41, { size: "xs", c: "dimmed" }, "Core Address:", " ", /* @__PURE__ */ React83.createElement(Text41, { span: true, ff: "monospace", c: "bright" }, coreAddress.slice(0, 20), "...", coreAddress.slice(-10)))), /* @__PURE__ */ React83.createElement(
|
|
6982
7187
|
TextInput33,
|
|
6983
7188
|
{
|
|
6984
7189
|
label: "Title",
|
|
@@ -6989,7 +7194,7 @@ var FlowConfig = ({ editor, block }) => {
|
|
|
6989
7194
|
required: true,
|
|
6990
7195
|
disabled: isProposalCreated
|
|
6991
7196
|
}
|
|
6992
|
-
), /* @__PURE__ */
|
|
7197
|
+
), /* @__PURE__ */ React83.createElement(
|
|
6993
7198
|
Textarea18,
|
|
6994
7199
|
{
|
|
6995
7200
|
label: "Description",
|
|
@@ -7001,7 +7206,7 @@ var FlowConfig = ({ editor, block }) => {
|
|
|
7001
7206
|
required: true,
|
|
7002
7207
|
disabled: isProposalCreated
|
|
7003
7208
|
}
|
|
7004
|
-
), errors.general && /* @__PURE__ */
|
|
7209
|
+
), errors.general && /* @__PURE__ */ React83.createElement(Text41, { size: "sm", c: "red" }, errors.general), isProposalCreated && /* @__PURE__ */ React83.createElement(Card18, { padding: "md", radius: "md", withBorder: true, style: { borderColor: "var(--mantine-color-green-6)" } }, /* @__PURE__ */ React83.createElement(Text41, { fw: 500, size: "sm", c: "green" }, "Proposal Created Successfully"), /* @__PURE__ */ React83.createElement(Text41, { size: "sm", c: "dimmed" }, "Your proposal has been created and is now open for voting.")), /* @__PURE__ */ React83.createElement(Button16, { fullWidth: true, onClick: handleCreateProposal, disabled: isProposalCreated, loading: isCreating }, isProposalCreated ? "Proposal Created" : "Create Proposal"));
|
|
7005
7210
|
const handleActionsChange = useCallback14(
|
|
7006
7211
|
(newActions) => {
|
|
7007
7212
|
updateProp("actions", JSON.stringify(newActions));
|
|
@@ -7017,12 +7222,12 @@ var FlowConfig = ({ editor, block }) => {
|
|
|
7017
7222
|
{
|
|
7018
7223
|
label: "Actions",
|
|
7019
7224
|
value: "actions",
|
|
7020
|
-
content: /* @__PURE__ */
|
|
7225
|
+
content: /* @__PURE__ */ React83.createElement(ActionsTab2, { actions: block.props.actions || "[]", onActionsChange: handleActionsChange, editor, block, isProposalCreated })
|
|
7021
7226
|
},
|
|
7022
7227
|
{
|
|
7023
7228
|
label: "Vote",
|
|
7024
7229
|
value: "vote",
|
|
7025
|
-
content: /* @__PURE__ */
|
|
7230
|
+
content: /* @__PURE__ */ React83.createElement(
|
|
7026
7231
|
FlowGeneralTab,
|
|
7027
7232
|
{
|
|
7028
7233
|
proposalId: voteLogic.proposalId,
|
|
@@ -7038,7 +7243,7 @@ var FlowConfig = ({ editor, block }) => {
|
|
|
7038
7243
|
)
|
|
7039
7244
|
}
|
|
7040
7245
|
];
|
|
7041
|
-
return /* @__PURE__ */
|
|
7246
|
+
return /* @__PURE__ */ React83.createElement(
|
|
7042
7247
|
Paper7,
|
|
7043
7248
|
{
|
|
7044
7249
|
p: "md",
|
|
@@ -7049,7 +7254,7 @@ var FlowConfig = ({ editor, block }) => {
|
|
|
7049
7254
|
flexDirection: "column"
|
|
7050
7255
|
}
|
|
7051
7256
|
},
|
|
7052
|
-
/* @__PURE__ */
|
|
7257
|
+
/* @__PURE__ */ React83.createElement(
|
|
7053
7258
|
"div",
|
|
7054
7259
|
{
|
|
7055
7260
|
style: {
|
|
@@ -7059,10 +7264,10 @@ var FlowConfig = ({ editor, block }) => {
|
|
|
7059
7264
|
marginBottom: "1rem"
|
|
7060
7265
|
}
|
|
7061
7266
|
},
|
|
7062
|
-
/* @__PURE__ */
|
|
7063
|
-
/* @__PURE__ */
|
|
7267
|
+
/* @__PURE__ */ React83.createElement(Title6, { order: 3 }, "Proposal Settings"),
|
|
7268
|
+
/* @__PURE__ */ React83.createElement(CloseButton5, { onClick: closePanel })
|
|
7064
7269
|
),
|
|
7065
|
-
/* @__PURE__ */
|
|
7270
|
+
/* @__PURE__ */ React83.createElement(ReusablePanel, { extraTabs, context: { editor, block } })
|
|
7066
7271
|
);
|
|
7067
7272
|
};
|
|
7068
7273
|
|
|
@@ -7074,13 +7279,13 @@ var ProposalFlowView = ({ block, editor }) => {
|
|
|
7074
7279
|
block,
|
|
7075
7280
|
editor
|
|
7076
7281
|
});
|
|
7077
|
-
const panelContent = useMemo11(() => /* @__PURE__ */
|
|
7282
|
+
const panelContent = useMemo11(() => /* @__PURE__ */ React84.createElement(FlowConfig, { editor, block }), [editor, block]);
|
|
7078
7283
|
const { open } = usePanel(panelId, panelContent);
|
|
7079
7284
|
const handleVote = () => {
|
|
7080
7285
|
open();
|
|
7081
7286
|
};
|
|
7082
7287
|
const showVoteButton = (block.props.voteEnabled || false) && proposalId;
|
|
7083
|
-
return /* @__PURE__ */
|
|
7288
|
+
return /* @__PURE__ */ React84.createElement(
|
|
7084
7289
|
OnChainProposalCard,
|
|
7085
7290
|
{
|
|
7086
7291
|
title,
|
|
@@ -7107,10 +7312,10 @@ function ProposalBlock({ editor, block }) {
|
|
|
7107
7312
|
console.log("[ProposalBlock] Rendering with docType:", docType);
|
|
7108
7313
|
if (docType === "template") {
|
|
7109
7314
|
console.log("[ProposalBlock] Rendering ProposalTemplateView (docType is template)");
|
|
7110
|
-
return /* @__PURE__ */
|
|
7315
|
+
return /* @__PURE__ */ React85.createElement(ProposalTemplateView, { editor, block });
|
|
7111
7316
|
}
|
|
7112
7317
|
console.log("[ProposalBlock] Rendering ProposalFlowView (docType is flow)");
|
|
7113
|
-
return /* @__PURE__ */
|
|
7318
|
+
return /* @__PURE__ */ React85.createElement(ProposalFlowView, { block, editor });
|
|
7114
7319
|
}
|
|
7115
7320
|
|
|
7116
7321
|
// src/mantine/blocks/proposal/ProposalBlockSpec.tsx
|
|
@@ -7169,28 +7374,28 @@ var ProposalBlockSpec = createReactBlockSpec4(
|
|
|
7169
7374
|
{
|
|
7170
7375
|
render: (props) => {
|
|
7171
7376
|
const ixoProps = props;
|
|
7172
|
-
return /* @__PURE__ */
|
|
7377
|
+
return /* @__PURE__ */ React86.createElement(ProposalBlock, { ...ixoProps });
|
|
7173
7378
|
}
|
|
7174
7379
|
}
|
|
7175
7380
|
);
|
|
7176
7381
|
|
|
7177
7382
|
// src/mantine/blocks/apiRequest/ApiRequestBlockSpec.tsx
|
|
7178
|
-
import
|
|
7383
|
+
import React92 from "react";
|
|
7179
7384
|
import { createReactBlockSpec as createReactBlockSpec5 } from "@blocknote/react";
|
|
7180
7385
|
|
|
7181
7386
|
// src/mantine/blocks/apiRequest/ApiRequestBlock.tsx
|
|
7182
|
-
import
|
|
7387
|
+
import React91 from "react";
|
|
7183
7388
|
|
|
7184
7389
|
// src/mantine/blocks/apiRequest/template/TemplateView.tsx
|
|
7185
|
-
import
|
|
7390
|
+
import React89, { useMemo as useMemo12 } from "react";
|
|
7186
7391
|
|
|
7187
7392
|
// src/mantine/blocks/apiRequest/template/TemplateConfig.tsx
|
|
7188
|
-
import
|
|
7189
|
-
import { Paper as Paper9, CloseButton as CloseButton6, Title as
|
|
7393
|
+
import React88, { useCallback as useCallback15 } from "react";
|
|
7394
|
+
import { Paper as Paper9, CloseButton as CloseButton6, Title as Title7 } from "@mantine/core";
|
|
7190
7395
|
|
|
7191
7396
|
// src/mantine/blocks/apiRequest/template/GeneralTab.tsx
|
|
7192
|
-
import
|
|
7193
|
-
import { Divider as Divider5, Select as Select10, Stack as
|
|
7397
|
+
import React87, { useEffect as useEffect15, useState as useState22 } from "react";
|
|
7398
|
+
import { Divider as Divider5, Select as Select10, Stack as Stack67, Text as Text42, TextInput as TextInput34, Textarea as Textarea19, Button as Button17, Group as Group23, ActionIcon as ActionIcon10, Paper as Paper8 } from "@mantine/core";
|
|
7194
7399
|
import { IconTrash, IconPlus } from "@tabler/icons-react";
|
|
7195
7400
|
var GeneralTab4 = ({
|
|
7196
7401
|
title,
|
|
@@ -7250,7 +7455,7 @@ var GeneralTab4 = ({
|
|
|
7250
7455
|
setLocalBody(newBody);
|
|
7251
7456
|
onBodyChange(newBody);
|
|
7252
7457
|
};
|
|
7253
|
-
return /* @__PURE__ */
|
|
7458
|
+
return /* @__PURE__ */ React87.createElement(Stack67, { gap: "lg" }, /* @__PURE__ */ React87.createElement(Stack67, { gap: "xs" }, /* @__PURE__ */ React87.createElement(Text42, { size: "sm", fw: 600 }, "Title"), /* @__PURE__ */ React87.createElement(
|
|
7254
7459
|
TextInput34,
|
|
7255
7460
|
{
|
|
7256
7461
|
placeholder: "e.g. Submit User Data",
|
|
@@ -7261,7 +7466,7 @@ var GeneralTab4 = ({
|
|
|
7261
7466
|
onTitleChange(newTitle);
|
|
7262
7467
|
}
|
|
7263
7468
|
}
|
|
7264
|
-
)), /* @__PURE__ */
|
|
7469
|
+
)), /* @__PURE__ */ React87.createElement(Stack67, { gap: "xs" }, /* @__PURE__ */ React87.createElement(Text42, { size: "sm", fw: 600 }, "Description"), /* @__PURE__ */ React87.createElement(
|
|
7265
7470
|
Textarea19,
|
|
7266
7471
|
{
|
|
7267
7472
|
placeholder: "Describe what this API request does",
|
|
@@ -7273,7 +7478,7 @@ var GeneralTab4 = ({
|
|
|
7273
7478
|
onDescriptionChange(newDescription);
|
|
7274
7479
|
}
|
|
7275
7480
|
}
|
|
7276
|
-
)), /* @__PURE__ */
|
|
7481
|
+
)), /* @__PURE__ */ React87.createElement(Divider5, { variant: "dashed" }), /* @__PURE__ */ React87.createElement(Stack67, { gap: "xs" }, /* @__PURE__ */ React87.createElement(Text42, { size: "sm", fw: 600 }, "HTTP Method"), /* @__PURE__ */ React87.createElement(
|
|
7277
7482
|
Select10,
|
|
7278
7483
|
{
|
|
7279
7484
|
value: localMethod,
|
|
@@ -7290,7 +7495,7 @@ var GeneralTab4 = ({
|
|
|
7290
7495
|
{ value: "PATCH", label: "PATCH" }
|
|
7291
7496
|
]
|
|
7292
7497
|
}
|
|
7293
|
-
)), /* @__PURE__ */
|
|
7498
|
+
)), /* @__PURE__ */ React87.createElement(Stack67, { gap: "xs" }, /* @__PURE__ */ React87.createElement(Text42, { size: "sm", fw: 600 }, "Endpoint URL"), /* @__PURE__ */ React87.createElement(
|
|
7294
7499
|
TextInput34,
|
|
7295
7500
|
{
|
|
7296
7501
|
placeholder: "https://api.example.com/endpoint",
|
|
@@ -7301,7 +7506,7 @@ var GeneralTab4 = ({
|
|
|
7301
7506
|
onEndpointChange(newEndpoint);
|
|
7302
7507
|
}
|
|
7303
7508
|
}
|
|
7304
|
-
)), /* @__PURE__ */
|
|
7509
|
+
)), /* @__PURE__ */ React87.createElement(Divider5, { variant: "dashed" }), /* @__PURE__ */ React87.createElement(Stack67, { gap: "xs" }, /* @__PURE__ */ React87.createElement(Group23, { justify: "space-between" }, /* @__PURE__ */ React87.createElement(Text42, { size: "sm", fw: 600 }, "Request Headers"), /* @__PURE__ */ React87.createElement(Button17, { size: "xs", variant: "light", leftSection: /* @__PURE__ */ React87.createElement(IconPlus, { size: 14 }), onClick: handleAddHeader }, "Add Header")), /* @__PURE__ */ React87.createElement(Text42, { size: "xs" }, "Add custom headers to your API request (e.g., Authorization, Content-Type)"), localHeaders.length > 0 && /* @__PURE__ */ React87.createElement(Stack67, { gap: "xs" }, localHeaders.map((header, index) => /* @__PURE__ */ React87.createElement(Paper8, { key: index, p: "xs" }, /* @__PURE__ */ React87.createElement(Group23, { gap: "xs", align: "flex-start" }, /* @__PURE__ */ React87.createElement(
|
|
7305
7510
|
TextInput34,
|
|
7306
7511
|
{
|
|
7307
7512
|
placeholder: "Header key (e.g., Authorization)",
|
|
@@ -7309,7 +7514,7 @@ var GeneralTab4 = ({
|
|
|
7309
7514
|
onChange: (event) => handleHeaderChange(index, "key", event.currentTarget.value),
|
|
7310
7515
|
style: { flex: 1 }
|
|
7311
7516
|
}
|
|
7312
|
-
), /* @__PURE__ */
|
|
7517
|
+
), /* @__PURE__ */ React87.createElement(
|
|
7313
7518
|
TextInput34,
|
|
7314
7519
|
{
|
|
7315
7520
|
placeholder: "Header value (e.g., Bearer token123)",
|
|
@@ -7317,7 +7522,7 @@ var GeneralTab4 = ({
|
|
|
7317
7522
|
onChange: (event) => handleHeaderChange(index, "value", event.currentTarget.value),
|
|
7318
7523
|
style: { flex: 1 }
|
|
7319
7524
|
}
|
|
7320
|
-
), /* @__PURE__ */
|
|
7525
|
+
), /* @__PURE__ */ React87.createElement(ActionIcon10, { color: "red", variant: "subtle", onClick: () => handleRemoveHeader(index) }, /* @__PURE__ */ React87.createElement(IconTrash, { size: 16 }))))))), /* @__PURE__ */ React87.createElement(Divider5, { variant: "dashed" }), /* @__PURE__ */ React87.createElement(Stack67, { gap: "xs" }, /* @__PURE__ */ React87.createElement(Group23, { justify: "space-between" }, /* @__PURE__ */ React87.createElement(Text42, { size: "sm", fw: 600 }, "Request Body (JSON)"), /* @__PURE__ */ React87.createElement(Button17, { size: "xs", variant: "light", leftSection: /* @__PURE__ */ React87.createElement(IconPlus, { size: 14 }), onClick: handleAddBodyField }, "Add Field")), /* @__PURE__ */ React87.createElement(Text42, { size: "xs" }, "Build your JSON request body as key-value pairs"), localBody.length > 0 && /* @__PURE__ */ React87.createElement(Stack67, { gap: "xs" }, localBody.map((field, index) => /* @__PURE__ */ React87.createElement(Paper8, { key: index, p: "xs" }, /* @__PURE__ */ React87.createElement(Group23, { gap: "xs", align: "flex-start" }, /* @__PURE__ */ React87.createElement(
|
|
7321
7526
|
TextInput34,
|
|
7322
7527
|
{
|
|
7323
7528
|
placeholder: "Field key (e.g., name)",
|
|
@@ -7325,7 +7530,7 @@ var GeneralTab4 = ({
|
|
|
7325
7530
|
onChange: (event) => handleBodyFieldChange(index, "key", event.currentTarget.value),
|
|
7326
7531
|
style: { flex: 1 }
|
|
7327
7532
|
}
|
|
7328
|
-
), /* @__PURE__ */
|
|
7533
|
+
), /* @__PURE__ */ React87.createElement(
|
|
7329
7534
|
TextInput34,
|
|
7330
7535
|
{
|
|
7331
7536
|
placeholder: "Field value (e.g., John Doe)",
|
|
@@ -7333,7 +7538,7 @@ var GeneralTab4 = ({
|
|
|
7333
7538
|
onChange: (event) => handleBodyFieldChange(index, "value", event.currentTarget.value),
|
|
7334
7539
|
style: { flex: 1 }
|
|
7335
7540
|
}
|
|
7336
|
-
), /* @__PURE__ */
|
|
7541
|
+
), /* @__PURE__ */ React87.createElement(ActionIcon10, { color: "red", variant: "subtle", onClick: () => handleRemoveBodyField(index) }, /* @__PURE__ */ React87.createElement(IconTrash, { size: 16 }))))))));
|
|
7337
7542
|
};
|
|
7338
7543
|
|
|
7339
7544
|
// src/mantine/blocks/apiRequest/template/TemplateConfig.tsx
|
|
@@ -7362,7 +7567,7 @@ var TemplateConfig4 = ({ editor, block }) => {
|
|
|
7362
7567
|
},
|
|
7363
7568
|
[updateProp]
|
|
7364
7569
|
);
|
|
7365
|
-
return /* @__PURE__ */
|
|
7570
|
+
return /* @__PURE__ */ React88.createElement(
|
|
7366
7571
|
Paper9,
|
|
7367
7572
|
{
|
|
7368
7573
|
p: "md",
|
|
@@ -7373,7 +7578,7 @@ var TemplateConfig4 = ({ editor, block }) => {
|
|
|
7373
7578
|
flexDirection: "column"
|
|
7374
7579
|
}
|
|
7375
7580
|
},
|
|
7376
|
-
/* @__PURE__ */
|
|
7581
|
+
/* @__PURE__ */ React88.createElement(
|
|
7377
7582
|
"div",
|
|
7378
7583
|
{
|
|
7379
7584
|
style: {
|
|
@@ -7383,17 +7588,17 @@ var TemplateConfig4 = ({ editor, block }) => {
|
|
|
7383
7588
|
marginBottom: "1rem"
|
|
7384
7589
|
}
|
|
7385
7590
|
},
|
|
7386
|
-
/* @__PURE__ */
|
|
7387
|
-
/* @__PURE__ */
|
|
7591
|
+
/* @__PURE__ */ React88.createElement(Title7, { order: 3 }, "API Request Settings"),
|
|
7592
|
+
/* @__PURE__ */ React88.createElement(CloseButton6, { onClick: closePanel })
|
|
7388
7593
|
),
|
|
7389
|
-
/* @__PURE__ */
|
|
7594
|
+
/* @__PURE__ */ React88.createElement(
|
|
7390
7595
|
ReusablePanel,
|
|
7391
7596
|
{
|
|
7392
7597
|
extraTabs: [
|
|
7393
7598
|
{
|
|
7394
7599
|
label: "General",
|
|
7395
7600
|
value: "general",
|
|
7396
|
-
content: /* @__PURE__ */
|
|
7601
|
+
content: /* @__PURE__ */ React88.createElement(
|
|
7397
7602
|
GeneralTab4,
|
|
7398
7603
|
{
|
|
7399
7604
|
title: block.props.title || "",
|
|
@@ -7431,11 +7636,11 @@ var TemplateConfig4 = ({ editor, block }) => {
|
|
|
7431
7636
|
};
|
|
7432
7637
|
|
|
7433
7638
|
// src/mantine/blocks/apiRequest/template/TemplateView.tsx
|
|
7434
|
-
import { Card as Card19, Group as Group24, Stack as
|
|
7639
|
+
import { Card as Card19, Group as Group24, Stack as Stack68, Text as Text43, ActionIcon as ActionIcon11, Badge as Badge10 } from "@mantine/core";
|
|
7435
7640
|
var API_REQUEST_TEMPLATE_PANEL_ID = "api-request-template-panel";
|
|
7436
7641
|
var ApiRequestTemplateView = ({ editor, block }) => {
|
|
7437
7642
|
const panelId = `${API_REQUEST_TEMPLATE_PANEL_ID}-${block.id}`;
|
|
7438
|
-
const panelContent = useMemo12(() => /* @__PURE__ */
|
|
7643
|
+
const panelContent = useMemo12(() => /* @__PURE__ */ React89.createElement(TemplateConfig4, { editor, block }), [editor, block]);
|
|
7439
7644
|
const { open } = usePanel(panelId, panelContent);
|
|
7440
7645
|
const method = block.props.method || "GET";
|
|
7441
7646
|
const endpoint = block.props.endpoint || "https://api.example.com/endpoint";
|
|
@@ -7455,13 +7660,13 @@ var ApiRequestTemplateView = ({ editor, block }) => {
|
|
|
7455
7660
|
return "gray";
|
|
7456
7661
|
}
|
|
7457
7662
|
};
|
|
7458
|
-
return /* @__PURE__ */
|
|
7663
|
+
return /* @__PURE__ */ React89.createElement(Card19, { withBorder: true, padding: "md", radius: "md", style: { width: "100%", cursor: "pointer", position: "relative" }, onClick: open }, /* @__PURE__ */ React89.createElement(Badge10, { size: "xs", variant: "light", color: "gray", style: { position: "absolute", top: 8, right: 8 } }, "Template"), /* @__PURE__ */ React89.createElement(Group24, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React89.createElement(Group24, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React89.createElement(ActionIcon11, { variant: "light", color: "violet", size: "lg", radius: "xl", style: { flexShrink: 0 } }, getIcon(block.props.icon, 18, 1.5, "square-check")), /* @__PURE__ */ React89.createElement(Stack68, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React89.createElement(Group24, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React89.createElement(Badge10, { size: "sm", variant: "filled", color: getMethodColor(method) }, method), /* @__PURE__ */ React89.createElement(Text43, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "API Request")), /* @__PURE__ */ React89.createElement(Text43, { size: "xs", c: "dimmed", contentEditable: false, lineClamp: 1 }, endpoint), block.props.description && /* @__PURE__ */ React89.createElement(Text43, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description)))));
|
|
7459
7664
|
};
|
|
7460
7665
|
|
|
7461
7666
|
// src/mantine/blocks/apiRequest/flow/FlowView.tsx
|
|
7462
|
-
import
|
|
7463
|
-
import { Card as Card20, Group as Group25, Stack as
|
|
7464
|
-
import { IconSend, IconChevronDown, IconChevronUp } from "@tabler/icons-react";
|
|
7667
|
+
import React90, { useState as useState23 } from "react";
|
|
7668
|
+
import { Card as Card20, Group as Group25, Stack as Stack69, Text as Text44, ActionIcon as ActionIcon12, Tooltip as Tooltip4, Button as Button18, Badge as Badge11, Collapse as Collapse2, Code, Loader as Loader4, Alert as Alert9 } from "@mantine/core";
|
|
7669
|
+
import { IconSend, IconChevronDown as IconChevronDown2, IconChevronUp as IconChevronUp2 } from "@tabler/icons-react";
|
|
7465
7670
|
var ApiRequestFlowView = ({ editor, block, isDisabled }) => {
|
|
7466
7671
|
const disabled = isDisabled?.isDisabled === "disable";
|
|
7467
7672
|
const [isLoading, setIsLoading] = useState23(false);
|
|
@@ -7578,21 +7783,21 @@ var ApiRequestFlowView = ({ editor, block, isDisabled }) => {
|
|
|
7578
7783
|
setIsLoading(false);
|
|
7579
7784
|
}
|
|
7580
7785
|
};
|
|
7581
|
-
const executeButton = /* @__PURE__ */
|
|
7786
|
+
const executeButton = /* @__PURE__ */ React90.createElement(
|
|
7582
7787
|
Button18,
|
|
7583
7788
|
{
|
|
7584
7789
|
size: "sm",
|
|
7585
7790
|
variant: "light",
|
|
7586
7791
|
color: getMethodColor(method),
|
|
7587
|
-
leftSection: isLoading ? /* @__PURE__ */
|
|
7792
|
+
leftSection: isLoading ? /* @__PURE__ */ React90.createElement(Loader4, { size: 14 }) : /* @__PURE__ */ React90.createElement(IconSend, { size: 14 }),
|
|
7588
7793
|
onClick: handleExecuteRequest,
|
|
7589
7794
|
disabled: disabled || isLoading || !endpoint,
|
|
7590
7795
|
style: { flexShrink: 0 }
|
|
7591
7796
|
},
|
|
7592
7797
|
isLoading ? "Sending..." : "Execute"
|
|
7593
7798
|
);
|
|
7594
|
-
return /* @__PURE__ */
|
|
7595
|
-
|
|
7799
|
+
return /* @__PURE__ */ React90.createElement(Card20, { withBorder: true, padding: "md", radius: "md", style: { width: "100%" } }, /* @__PURE__ */ React90.createElement(Stack69, { gap: "md" }, /* @__PURE__ */ React90.createElement(Group25, { wrap: "nowrap", justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React90.createElement(Group25, { wrap: "nowrap", align: "flex-start", style: { flex: 1 } }, /* @__PURE__ */ React90.createElement(ActionIcon12, { variant: "light", color: "violet", size: "lg", radius: "xl", style: { flexShrink: 0 } }, getIcon(block.props.icon, 18, 1.5, "square-check")), /* @__PURE__ */ React90.createElement(Stack69, { gap: "xs", style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React90.createElement(Group25, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React90.createElement(Badge11, { size: "sm", variant: "filled", color: getMethodColor(method) }, method), /* @__PURE__ */ React90.createElement(Text44, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "API Request"), status !== "idle" && /* @__PURE__ */ React90.createElement(Badge11, { size: "xs", variant: "dot", color: getStatusColor(status) }, status)), /* @__PURE__ */ React90.createElement(
|
|
7800
|
+
Text44,
|
|
7596
7801
|
{
|
|
7597
7802
|
size: "xs",
|
|
7598
7803
|
c: "dimmed",
|
|
@@ -7604,7 +7809,7 @@ var ApiRequestFlowView = ({ editor, block, isDisabled }) => {
|
|
|
7604
7809
|
}
|
|
7605
7810
|
},
|
|
7606
7811
|
endpoint || "No endpoint configured"
|
|
7607
|
-
), block.props.description && /* @__PURE__ */
|
|
7812
|
+
), block.props.description && /* @__PURE__ */ React90.createElement(Text44, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description))), /* @__PURE__ */ React90.createElement(Group25, { gap: "xs", style: { flexShrink: 0 } }, disabled && isDisabled?.message ? /* @__PURE__ */ React90.createElement(Tooltip4, { label: isDisabled.message, position: "left", withArrow: true }, executeButton) : executeButton, /* @__PURE__ */ React90.createElement(ActionIcon12, { variant: "subtle", onClick: () => setShowDetails(!showDetails), disabled: headers.length === 0 && body.length === 0 && !response }, showDetails ? /* @__PURE__ */ React90.createElement(IconChevronUp2, { size: 16 }) : /* @__PURE__ */ React90.createElement(IconChevronDown2, { size: 16 })))), /* @__PURE__ */ React90.createElement(Collapse2, { in: showDetails }, /* @__PURE__ */ React90.createElement(Stack69, { gap: "md" }, headers.length > 0 && /* @__PURE__ */ React90.createElement(Stack69, { gap: "xs" }, /* @__PURE__ */ React90.createElement(Text44, { size: "xs", fw: 600, c: "dimmed" }, "Headers:"), /* @__PURE__ */ React90.createElement(Code, { block: true, style: { fontSize: "11px" } }, JSON.stringify(
|
|
7608
7813
|
headers.reduce(
|
|
7609
7814
|
(acc, h) => {
|
|
7610
7815
|
if (h.key && h.value) acc[h.key] = h.value;
|
|
@@ -7614,7 +7819,7 @@ var ApiRequestFlowView = ({ editor, block, isDisabled }) => {
|
|
|
7614
7819
|
),
|
|
7615
7820
|
null,
|
|
7616
7821
|
2
|
|
7617
|
-
))), method !== "GET" && body.length > 0 && /* @__PURE__ */
|
|
7822
|
+
))), method !== "GET" && body.length > 0 && /* @__PURE__ */ React90.createElement(Stack69, { gap: "xs" }, /* @__PURE__ */ React90.createElement(Text44, { size: "xs", fw: 600, c: "dimmed" }, "Body:"), /* @__PURE__ */ React90.createElement(Code, { block: true, style: { fontSize: "11px" } }, JSON.stringify(
|
|
7618
7823
|
body.reduce(
|
|
7619
7824
|
(acc, b) => {
|
|
7620
7825
|
if (b.key && b.value) acc[b.key] = b.value;
|
|
@@ -7624,7 +7829,7 @@ var ApiRequestFlowView = ({ editor, block, isDisabled }) => {
|
|
|
7624
7829
|
),
|
|
7625
7830
|
null,
|
|
7626
7831
|
2
|
|
7627
|
-
))), response && /* @__PURE__ */
|
|
7832
|
+
))), response && /* @__PURE__ */ React90.createElement(Stack69, { gap: "xs" }, /* @__PURE__ */ React90.createElement(Text44, { size: "xs", fw: 600, c: "dimmed" }, "Response:"), status === "error" ? /* @__PURE__ */ React90.createElement(Alert9, { color: "red", title: "Error", styles: { message: { fontSize: "11px" } } }, /* @__PURE__ */ React90.createElement(Code, { block: true, style: { fontSize: "11px" } }, response)) : /* @__PURE__ */ React90.createElement(Code, { block: true, style: { fontSize: "11px", maxHeight: "300px", overflow: "auto" } }, response))))));
|
|
7628
7833
|
};
|
|
7629
7834
|
|
|
7630
7835
|
// src/mantine/blocks/apiRequest/ApiRequestBlock.tsx
|
|
@@ -7632,7 +7837,7 @@ function ApiRequestBlock({ editor, block }) {
|
|
|
7632
7837
|
const { docType } = useBlocknoteContext();
|
|
7633
7838
|
const { actions } = useBlockConditions(block, editor);
|
|
7634
7839
|
if (docType === "template") {
|
|
7635
|
-
return /* @__PURE__ */
|
|
7840
|
+
return /* @__PURE__ */ React91.createElement(ApiRequestTemplateView, { editor, block });
|
|
7636
7841
|
}
|
|
7637
7842
|
const conditionConfig = parseConditionConfig(block.props.conditions);
|
|
7638
7843
|
const hasVisibility = hasVisibilityConditions(conditionConfig);
|
|
@@ -7644,7 +7849,7 @@ function ApiRequestBlock({ editor, block }) {
|
|
|
7644
7849
|
const hasEnable = hasEnableConditions(conditionConfig);
|
|
7645
7850
|
const enableActionExists = actions.some((a) => a.action === "enable");
|
|
7646
7851
|
const shouldDisable = hasEnable && !enableActionExists;
|
|
7647
|
-
return /* @__PURE__ */
|
|
7852
|
+
return /* @__PURE__ */ React91.createElement(
|
|
7648
7853
|
ApiRequestFlowView,
|
|
7649
7854
|
{
|
|
7650
7855
|
block,
|
|
@@ -7698,36 +7903,36 @@ var ApiRequestBlockSpec = createReactBlockSpec5(
|
|
|
7698
7903
|
{
|
|
7699
7904
|
render: (props) => {
|
|
7700
7905
|
const ixoProps = props;
|
|
7701
|
-
return /* @__PURE__ */
|
|
7906
|
+
return /* @__PURE__ */ React92.createElement(ApiRequestBlock, { ...ixoProps });
|
|
7702
7907
|
}
|
|
7703
7908
|
}
|
|
7704
7909
|
);
|
|
7705
7910
|
|
|
7706
7911
|
// src/mantine/blocks/enumChecklist/EnumChecklistBlock.tsx
|
|
7707
|
-
import
|
|
7912
|
+
import React99, { useState as useState25, useEffect as useEffect16, useMemo as useMemo13, useCallback as useCallback16 } from "react";
|
|
7708
7913
|
import { createReactBlockSpec as createReactBlockSpec6 } from "@blocknote/react";
|
|
7709
|
-
import { Stack as
|
|
7914
|
+
import { Stack as Stack75, Text as Text50, Button as Button23, ActionIcon as ActionIcon13, Center as Center3, Flex as Flex19 } from "@mantine/core";
|
|
7710
7915
|
|
|
7711
7916
|
// src/mantine/blocks/enumChecklist/oracle_personalities/index.tsx
|
|
7712
|
-
import
|
|
7713
|
-
import { Box as
|
|
7917
|
+
import React93 from "react";
|
|
7918
|
+
import { Box as Box17, Flex as Flex18, Stack as Stack70, Text as Text45, Image as Image13 } from "@mantine/core";
|
|
7714
7919
|
function OraclePersonalitiesEnumList({ selectionMode, isItemChecked, onItemCheck, items }) {
|
|
7715
7920
|
if (!items || items.length === 0) {
|
|
7716
|
-
return /* @__PURE__ */
|
|
7921
|
+
return /* @__PURE__ */ React93.createElement(Text45, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No assets found");
|
|
7717
7922
|
}
|
|
7718
|
-
const rows = items.map(({ id, name, description, voice, icon }) => /* @__PURE__ */
|
|
7719
|
-
return /* @__PURE__ */
|
|
7923
|
+
const rows = items.map(({ id, name, description, voice, icon }) => /* @__PURE__ */ React93.createElement(ListItemContainer, { key: id }, /* @__PURE__ */ React93.createElement(Flex18, { align: "center", gap: "sm" }, /* @__PURE__ */ React93.createElement(Image13, { radius: 16, w: 62, h: 62, src: icon, alt: name }), /* @__PURE__ */ React93.createElement(Stack70, { gap: 0 }, /* @__PURE__ */ React93.createElement(Text45, { size: "sm", fw: 500 }, name || "-"), description !== void 0 && /* @__PURE__ */ React93.createElement(Text45, { size: "sm", c: "dimmed" }, description))), /* @__PURE__ */ React93.createElement(Flex18, { align: "center", gap: "md" }, /* @__PURE__ */ React93.createElement(Stack70, { ta: "right", gap: 0 }, /* @__PURE__ */ React93.createElement(Text45, { size: "sm", fw: 500 }, "Voice"), /* @__PURE__ */ React93.createElement(Text45, { size: "sm", c: "dimmed" }, voice)), selectionMode && /* @__PURE__ */ React93.createElement(ListItemCheckbox, { ariaLabel: `Select oracle ${name}`, checked: isItemChecked?.(id), onCheck: (checked) => onItemCheck?.(id, checked) }))));
|
|
7924
|
+
return /* @__PURE__ */ React93.createElement(Box17, { flex: 1 }, /* @__PURE__ */ React93.createElement(Stack70, null, rows));
|
|
7720
7925
|
}
|
|
7721
7926
|
|
|
7722
7927
|
// src/mantine/blocks/enumChecklist/EnumChecklistConfigModal.tsx
|
|
7723
|
-
import
|
|
7724
|
-
import { Modal, Group as Group29, Box as
|
|
7928
|
+
import React98, { useState as useState24 } from "react";
|
|
7929
|
+
import { Modal, Group as Group29, Box as Box19 } from "@mantine/core";
|
|
7725
7930
|
|
|
7726
7931
|
// src/mantine/blocks/list/modal/ModalNavigation.tsx
|
|
7727
|
-
import
|
|
7728
|
-
import { Stack as
|
|
7932
|
+
import React94 from "react";
|
|
7933
|
+
import { Stack as Stack71, Button as Button19, Text as Text46 } from "@mantine/core";
|
|
7729
7934
|
var ModalNavigation = ({ steps, activeStep, onStepChange, showUpdateButton = false, onUpdateBlock }) => {
|
|
7730
|
-
return /* @__PURE__ */
|
|
7935
|
+
return /* @__PURE__ */ React94.createElement(Stack71, { gap: "xs", style: { height: "100%" } }, /* @__PURE__ */ React94.createElement(Stack71, { gap: "xs", style: { flex: 1 } }, steps.map((step) => /* @__PURE__ */ React94.createElement(
|
|
7731
7936
|
Button19,
|
|
7732
7937
|
{
|
|
7733
7938
|
key: step.id,
|
|
@@ -7745,13 +7950,13 @@ var ModalNavigation = ({ steps, activeStep, onStepChange, showUpdateButton = fal
|
|
|
7745
7950
|
}
|
|
7746
7951
|
}
|
|
7747
7952
|
},
|
|
7748
|
-
/* @__PURE__ */
|
|
7749
|
-
))), showUpdateButton && /* @__PURE__ */
|
|
7953
|
+
/* @__PURE__ */ React94.createElement(Stack71, { gap: 2, align: "flex-start" }, /* @__PURE__ */ React94.createElement(Text46, { size: "sm", fw: 500 }, step.label), /* @__PURE__ */ React94.createElement(Text46, { size: "xs", opacity: 0.7 }, step.description))
|
|
7954
|
+
))), showUpdateButton && /* @__PURE__ */ React94.createElement(Button19, { variant: "filled", color: "blue", onClick: onUpdateBlock, style: { marginTop: "auto" } }, "Update Block"));
|
|
7750
7955
|
};
|
|
7751
7956
|
|
|
7752
7957
|
// src/mantine/blocks/enumChecklist/EnumChecklistTypeSelection.tsx
|
|
7753
|
-
import
|
|
7754
|
-
import { Stack as
|
|
7958
|
+
import React95 from "react";
|
|
7959
|
+
import { Stack as Stack72, Card as Card21, Group as Group26, Text as Text47, Box as Box18, Button as Button20 } from "@mantine/core";
|
|
7755
7960
|
|
|
7756
7961
|
// src/mantine/blocks/enumChecklist/oracle_personalities/config.ts
|
|
7757
7962
|
var oraclePersonalitiesMetadata = {
|
|
@@ -7880,7 +8085,7 @@ function getEnumListItems(type) {
|
|
|
7880
8085
|
// src/mantine/blocks/enumChecklist/EnumChecklistTypeSelection.tsx
|
|
7881
8086
|
var EnumChecklistTypeSelection = ({ selectedType, onTypeSelect, onNext }) => {
|
|
7882
8087
|
const enumListsMeta = getEnumListTypesMetadata();
|
|
7883
|
-
return /* @__PURE__ */
|
|
8088
|
+
return /* @__PURE__ */ React95.createElement(Stack72, { gap: "md" }, /* @__PURE__ */ React95.createElement("div", null, /* @__PURE__ */ React95.createElement(Text47, { size: "lg", fw: 600, mb: "xs" }, "Choose List Type"), /* @__PURE__ */ React95.createElement(Text47, { size: "sm", c: "dimmed" }, "Select the type of list you want to create")), /* @__PURE__ */ React95.createElement(Stack72, { gap: "sm" }, enumListsMeta.map((enumChecklistMeta) => /* @__PURE__ */ React95.createElement(
|
|
7884
8089
|
Card21,
|
|
7885
8090
|
{
|
|
7886
8091
|
key: enumChecklistMeta.id,
|
|
@@ -7893,8 +8098,8 @@ var EnumChecklistTypeSelection = ({ selectedType, onTypeSelect, onNext }) => {
|
|
|
7893
8098
|
},
|
|
7894
8099
|
onClick: () => onTypeSelect(enumChecklistMeta.id)
|
|
7895
8100
|
},
|
|
7896
|
-
/* @__PURE__ */
|
|
7897
|
-
|
|
8101
|
+
/* @__PURE__ */ React95.createElement(Group26, { gap: "md", align: "flex-start" }, /* @__PURE__ */ React95.createElement(
|
|
8102
|
+
Box18,
|
|
7898
8103
|
{
|
|
7899
8104
|
style: {
|
|
7900
8105
|
width: 48,
|
|
@@ -7909,35 +8114,35 @@ var EnumChecklistTypeSelection = ({ selectedType, onTypeSelect, onNext }) => {
|
|
|
7909
8114
|
}
|
|
7910
8115
|
},
|
|
7911
8116
|
enumChecklistMeta.icon
|
|
7912
|
-
), /* @__PURE__ */
|
|
7913
|
-
))), /* @__PURE__ */
|
|
8117
|
+
), /* @__PURE__ */ React95.createElement(Stack72, { gap: 2, style: { flex: 1 } }, /* @__PURE__ */ React95.createElement(Text47, { size: "md", fw: 600 }, enumChecklistMeta.name), /* @__PURE__ */ React95.createElement(Text47, { size: "sm", c: "dimmed" }, enumChecklistMeta.description)))
|
|
8118
|
+
))), /* @__PURE__ */ React95.createElement(Group26, { justify: "flex-end", mt: "md" }, /* @__PURE__ */ React95.createElement(Button20, { onClick: onNext, disabled: !selectedType }, "Next")));
|
|
7914
8119
|
};
|
|
7915
8120
|
|
|
7916
8121
|
// src/mantine/blocks/enumChecklist/EnumChecklistPreviewStep.tsx
|
|
7917
|
-
import
|
|
7918
|
-
import { Stack as
|
|
8122
|
+
import React96 from "react";
|
|
8123
|
+
import { Stack as Stack73, Text as Text48, Button as Button21, Group as Group27 } from "@mantine/core";
|
|
7919
8124
|
var EnumChecklistPreviewStep = ({ listType, onAddToBlock, onPrev }) => {
|
|
7920
8125
|
const renderListComponent = () => {
|
|
7921
8126
|
switch (listType) {
|
|
7922
8127
|
case "oracle_personalities":
|
|
7923
|
-
return /* @__PURE__ */
|
|
8128
|
+
return /* @__PURE__ */ React96.createElement(OraclePersonalitiesEnumList, { items: getEnumListItems(listType) });
|
|
7924
8129
|
default:
|
|
7925
8130
|
return null;
|
|
7926
8131
|
}
|
|
7927
8132
|
};
|
|
7928
|
-
return /* @__PURE__ */
|
|
8133
|
+
return /* @__PURE__ */ React96.createElement(Stack73, { gap: "md" }, /* @__PURE__ */ React96.createElement("div", null, /* @__PURE__ */ React96.createElement(Text48, { size: "lg", fw: 600, mb: "xs" }, "Preview ", getEnumListNameByType(listType)), /* @__PURE__ */ React96.createElement(Text48, { size: "sm", c: "dimmed" }, "Preview how your list will look with the current configuration")), /* @__PURE__ */ React96.createElement("div", { style: { maxHeight: "400px", overflow: "auto" } }, renderListComponent()), /* @__PURE__ */ React96.createElement(Group27, { justify: "space-between", mt: "md" }, /* @__PURE__ */ React96.createElement(Button21, { variant: "subtle", onClick: onPrev }, "Previous"), /* @__PURE__ */ React96.createElement(Button21, { onClick: onAddToBlock }, "Add to Block")));
|
|
7929
8134
|
};
|
|
7930
8135
|
|
|
7931
8136
|
// src/mantine/blocks/enumChecklist/EnumChecklistConfigurationStep.tsx
|
|
7932
|
-
import
|
|
7933
|
-
import { Stack as
|
|
8137
|
+
import React97 from "react";
|
|
8138
|
+
import { Stack as Stack74, TextInput as TextInput35, Text as Text49, Button as Button22, Group as Group28, Switch as Switch4, Select as Select11 } from "@mantine/core";
|
|
7934
8139
|
var EnumChecklistConfigurationStep = ({ enumChecklistType: listType, config, onConfigChange, onPrev, onNext, isValid }) => {
|
|
7935
8140
|
const typeConfig = ENUM_LIST_CONFIG[listType];
|
|
7936
8141
|
const configFields = getEnumListTypesConfigFields(listType);
|
|
7937
8142
|
const renderListConfigField = (field) => {
|
|
7938
8143
|
switch (field.type) {
|
|
7939
8144
|
case "text":
|
|
7940
|
-
return /* @__PURE__ */
|
|
8145
|
+
return /* @__PURE__ */ React97.createElement(
|
|
7941
8146
|
TextInput35,
|
|
7942
8147
|
{
|
|
7943
8148
|
label: field.label,
|
|
@@ -7949,7 +8154,7 @@ var EnumChecklistConfigurationStep = ({ enumChecklistType: listType, config, onC
|
|
|
7949
8154
|
}
|
|
7950
8155
|
);
|
|
7951
8156
|
case "switch":
|
|
7952
|
-
return /* @__PURE__ */
|
|
8157
|
+
return /* @__PURE__ */ React97.createElement(
|
|
7953
8158
|
Switch4,
|
|
7954
8159
|
{
|
|
7955
8160
|
label: field.label,
|
|
@@ -7959,7 +8164,7 @@ var EnumChecklistConfigurationStep = ({ enumChecklistType: listType, config, onC
|
|
|
7959
8164
|
}
|
|
7960
8165
|
);
|
|
7961
8166
|
case "select":
|
|
7962
|
-
return /* @__PURE__ */
|
|
8167
|
+
return /* @__PURE__ */ React97.createElement(
|
|
7963
8168
|
Select11,
|
|
7964
8169
|
{
|
|
7965
8170
|
label: field.label,
|
|
@@ -7972,7 +8177,7 @@ var EnumChecklistConfigurationStep = ({ enumChecklistType: listType, config, onC
|
|
|
7972
8177
|
}
|
|
7973
8178
|
);
|
|
7974
8179
|
default:
|
|
7975
|
-
return /* @__PURE__ */
|
|
8180
|
+
return /* @__PURE__ */ React97.createElement(
|
|
7976
8181
|
TextInput35,
|
|
7977
8182
|
{
|
|
7978
8183
|
label: field.label,
|
|
@@ -7985,7 +8190,7 @@ var EnumChecklistConfigurationStep = ({ enumChecklistType: listType, config, onC
|
|
|
7985
8190
|
);
|
|
7986
8191
|
}
|
|
7987
8192
|
};
|
|
7988
|
-
return /* @__PURE__ */
|
|
8193
|
+
return /* @__PURE__ */ React97.createElement(Stack74, { gap: "md" }, /* @__PURE__ */ React97.createElement("div", null, /* @__PURE__ */ React97.createElement(Text49, { size: "lg", fw: 600, mb: "xs" }, "Configure ", typeConfig.metadata.name), /* @__PURE__ */ React97.createElement(Text49, { size: "sm", c: "dimmed" }, typeConfig.metadata.description)), /* @__PURE__ */ React97.createElement(Stack74, { gap: "sm" }, configFields.map((field) => /* @__PURE__ */ React97.createElement("div", { key: field.key }, renderListConfigField(field)))), /* @__PURE__ */ React97.createElement(Group28, { justify: "space-between", mt: "md" }, /* @__PURE__ */ React97.createElement(Button22, { variant: "subtle", onClick: onPrev }, "Previous"), /* @__PURE__ */ React97.createElement(Button22, { onClick: onNext, disabled: !isValid }, "Next")));
|
|
7989
8194
|
};
|
|
7990
8195
|
|
|
7991
8196
|
// src/mantine/blocks/enumChecklist/EnumChecklistConfigModal.tsx
|
|
@@ -8047,9 +8252,9 @@ var EnumChecklistConfigModal = ({ opened, onClose, onSave, initialConfig }) => {
|
|
|
8047
8252
|
const renderStepContent = () => {
|
|
8048
8253
|
switch (activeStep) {
|
|
8049
8254
|
case "type":
|
|
8050
|
-
return /* @__PURE__ */
|
|
8255
|
+
return /* @__PURE__ */ React98.createElement(EnumChecklistTypeSelection, { selectedType, onTypeSelect: handleTypeSelect, onNext: () => setActiveStep("configure") });
|
|
8051
8256
|
case "configure":
|
|
8052
|
-
return selectedType ? /* @__PURE__ */
|
|
8257
|
+
return selectedType ? /* @__PURE__ */ React98.createElement(
|
|
8053
8258
|
EnumChecklistConfigurationStep,
|
|
8054
8259
|
{
|
|
8055
8260
|
enumChecklistType: selectedType,
|
|
@@ -8061,16 +8266,16 @@ var EnumChecklistConfigModal = ({ opened, onClose, onSave, initialConfig }) => {
|
|
|
8061
8266
|
}
|
|
8062
8267
|
) : null;
|
|
8063
8268
|
case "preview":
|
|
8064
|
-
return selectedType ? /* @__PURE__ */
|
|
8269
|
+
return selectedType ? /* @__PURE__ */ React98.createElement(EnumChecklistPreviewStep, { listType: selectedType, onAddToBlock: handleAddToBlock, onPrev: () => setActiveStep("configure") }) : null;
|
|
8065
8270
|
default:
|
|
8066
8271
|
return null;
|
|
8067
8272
|
}
|
|
8068
8273
|
};
|
|
8069
|
-
return /* @__PURE__ */
|
|
8274
|
+
return /* @__PURE__ */ React98.createElement(Modal, { opened, onClose: handleClose, title: "Configure Enum Checklist Block", size: "xl" }, /* @__PURE__ */ React98.createElement(Group29, { align: "flex-start", gap: "lg", style: { minHeight: "400px" } }, /* @__PURE__ */ React98.createElement(Box19, { style: { width: "200px", flexShrink: 0, height: "400px", display: "flex" } }, /* @__PURE__ */ React98.createElement(ModalNavigation, { steps, activeStep, onStepChange: setActiveStep, showUpdateButton: selectedType !== null, onUpdateBlock: handleAddToBlock })), /* @__PURE__ */ React98.createElement(Box19, { style: { flex: 1 } }, renderStepContent())));
|
|
8070
8275
|
};
|
|
8071
8276
|
|
|
8072
8277
|
// src/mantine/blocks/enumChecklist/EnumChecklistBlock.tsx
|
|
8073
|
-
var IconSettings2 = () => /* @__PURE__ */
|
|
8278
|
+
var IconSettings2 = () => /* @__PURE__ */ React99.createElement("span", null, "\u2699\uFE0F");
|
|
8074
8279
|
var EnumChecklistBlockType = "enumChecklist";
|
|
8075
8280
|
var EnumChecklistBlockContent = ({ block, editor }) => {
|
|
8076
8281
|
const [modalOpened, setModalOpened] = useState25(false);
|
|
@@ -8156,7 +8361,7 @@ var EnumChecklistBlockContent = ({ block, editor }) => {
|
|
|
8156
8361
|
if (!listType) return null;
|
|
8157
8362
|
switch (listType) {
|
|
8158
8363
|
case "oracle_personalities":
|
|
8159
|
-
return /* @__PURE__ */
|
|
8364
|
+
return /* @__PURE__ */ React99.createElement(
|
|
8160
8365
|
OraclePersonalitiesEnumList,
|
|
8161
8366
|
{
|
|
8162
8367
|
items: getEnumListItems(listType),
|
|
@@ -8169,7 +8374,7 @@ var EnumChecklistBlockContent = ({ block, editor }) => {
|
|
|
8169
8374
|
return null;
|
|
8170
8375
|
}
|
|
8171
8376
|
};
|
|
8172
|
-
return /* @__PURE__ */
|
|
8377
|
+
return /* @__PURE__ */ React99.createElement(Stack75, { w: "100%" }, listType && /* @__PURE__ */ React99.createElement(Flex19, { align: "center", justify: "space-between", gap: "xs" }, /* @__PURE__ */ React99.createElement(Text50, null, getEnumListNameByType(listType)), listConfig.listSelectionMode && /* @__PURE__ */ React99.createElement(Text50, { lh: 0.5, c: "dimmed" }, listConfig?.selection_mode === "single" ? "Single Selection" : "Multi Selection"), editable && /* @__PURE__ */ React99.createElement(Flex19, { justify: listType ? "space-between" : "flex-end" }, /* @__PURE__ */ React99.createElement(Flex19, { gap: "xs" }, /* @__PURE__ */ React99.createElement(ActionIcon13, { variant: "subtle", size: "sm", onClick: () => setModalOpened(true) }, /* @__PURE__ */ React99.createElement(IconSettings2, null))))), /* @__PURE__ */ React99.createElement(Flex19, { flex: 1 }, !listType ? /* @__PURE__ */ React99.createElement(Center3, { py: "xl" }, /* @__PURE__ */ React99.createElement(Stack75, { align: "center", gap: "sm" }, /* @__PURE__ */ React99.createElement(Text50, { size: "sm", c: "dimmed", ta: "center" }, "No list type configured"), /* @__PURE__ */ React99.createElement(Button23, { size: "sm", variant: "light", onClick: () => setModalOpened(true) }, "Configure List"))) : /* @__PURE__ */ React99.createElement(Stack75, { gap: "md", flex: 1 }, renderListComponent())), /* @__PURE__ */ React99.createElement(
|
|
8173
8378
|
EnumChecklistConfigModal,
|
|
8174
8379
|
{
|
|
8175
8380
|
opened: modalOpened,
|
|
@@ -8201,27 +8406,27 @@ var EnumChecklistBlock = createReactBlockSpec6(
|
|
|
8201
8406
|
content: "none"
|
|
8202
8407
|
},
|
|
8203
8408
|
{
|
|
8204
|
-
render: (props) => /* @__PURE__ */
|
|
8409
|
+
render: (props) => /* @__PURE__ */ React99.createElement(EnumChecklistBlockContent, { ...props })
|
|
8205
8410
|
}
|
|
8206
8411
|
);
|
|
8207
8412
|
|
|
8208
8413
|
// src/mantine/blocks/notify/NotifyBlockSpec.tsx
|
|
8209
|
-
import
|
|
8414
|
+
import React105 from "react";
|
|
8210
8415
|
import { createReactBlockSpec as createReactBlockSpec7 } from "@blocknote/react";
|
|
8211
8416
|
|
|
8212
8417
|
// src/mantine/blocks/notify/NotifyBlock.tsx
|
|
8213
|
-
import
|
|
8418
|
+
import React104 from "react";
|
|
8214
8419
|
|
|
8215
8420
|
// src/mantine/blocks/notify/template/TemplateView.tsx
|
|
8216
|
-
import
|
|
8421
|
+
import React102, { useMemo as useMemo14 } from "react";
|
|
8217
8422
|
|
|
8218
8423
|
// src/mantine/blocks/notify/template/TemplateConfig.tsx
|
|
8219
|
-
import
|
|
8220
|
-
import { Paper as Paper11, CloseButton as CloseButton7, Title as
|
|
8424
|
+
import React101, { useCallback as useCallback17 } from "react";
|
|
8425
|
+
import { Paper as Paper11, CloseButton as CloseButton7, Title as Title8 } from "@mantine/core";
|
|
8221
8426
|
|
|
8222
8427
|
// src/mantine/blocks/notify/template/GeneralTab.tsx
|
|
8223
|
-
import
|
|
8224
|
-
import { Divider as Divider6, Select as Select12, Stack as
|
|
8428
|
+
import React100, { useEffect as useEffect17, useState as useState26 } from "react";
|
|
8429
|
+
import { Divider as Divider6, Select as Select12, Stack as Stack76, Text as Text51, TextInput as TextInput36, Textarea as Textarea20, Button as Button24, Group as Group30, ActionIcon as ActionIcon14, Paper as Paper10 } from "@mantine/core";
|
|
8225
8430
|
import { IconTrash as IconTrash2, IconPlus as IconPlus2 } from "@tabler/icons-react";
|
|
8226
8431
|
var GeneralTab5 = ({
|
|
8227
8432
|
title,
|
|
@@ -8294,7 +8499,7 @@ var GeneralTab5 = ({
|
|
|
8294
8499
|
setter(newRecipients);
|
|
8295
8500
|
callback(newRecipients);
|
|
8296
8501
|
};
|
|
8297
|
-
return /* @__PURE__ */
|
|
8502
|
+
return /* @__PURE__ */ React100.createElement(Stack76, { gap: "lg" }, /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React100.createElement(Text51, { size: "sm", fw: 600 }, "Title"), /* @__PURE__ */ React100.createElement(
|
|
8298
8503
|
TextInput36,
|
|
8299
8504
|
{
|
|
8300
8505
|
placeholder: "e.g. Welcome Email",
|
|
@@ -8305,7 +8510,7 @@ var GeneralTab5 = ({
|
|
|
8305
8510
|
onTitleChange(newTitle);
|
|
8306
8511
|
}
|
|
8307
8512
|
}
|
|
8308
|
-
)), /* @__PURE__ */
|
|
8513
|
+
)), /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React100.createElement(Text51, { size: "sm", fw: 600 }, "Description"), /* @__PURE__ */ React100.createElement(
|
|
8309
8514
|
Textarea20,
|
|
8310
8515
|
{
|
|
8311
8516
|
placeholder: "Describe what this notification does",
|
|
@@ -8317,7 +8522,7 @@ var GeneralTab5 = ({
|
|
|
8317
8522
|
onDescriptionChange(newDescription);
|
|
8318
8523
|
}
|
|
8319
8524
|
}
|
|
8320
|
-
)), /* @__PURE__ */
|
|
8525
|
+
)), /* @__PURE__ */ React100.createElement(Divider6, { variant: "dashed" }), /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React100.createElement(Text51, { size: "sm", fw: 600 }, "Channel"), /* @__PURE__ */ React100.createElement(
|
|
8321
8526
|
Select12,
|
|
8322
8527
|
{
|
|
8323
8528
|
value: localChannel,
|
|
@@ -8333,7 +8538,7 @@ var GeneralTab5 = ({
|
|
|
8333
8538
|
{ value: "rcs", label: "RCS (Coming Soon)", disabled: true }
|
|
8334
8539
|
]
|
|
8335
8540
|
}
|
|
8336
|
-
)), /* @__PURE__ */
|
|
8541
|
+
)), /* @__PURE__ */ React100.createElement(Divider6, { variant: "dashed" }), localChannel === "email" && /* @__PURE__ */ React100.createElement(React100.Fragment, null, /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React100.createElement(Group30, { justify: "space-between" }, /* @__PURE__ */ React100.createElement(Text51, { size: "sm", fw: 600 }, "To (Recipients)"), /* @__PURE__ */ React100.createElement(Button24, { size: "xs", leftSection: /* @__PURE__ */ React100.createElement(IconPlus2, { size: 14 }), onClick: () => handleAddRecipient("to") }, "Add")), localTo.length === 0 && /* @__PURE__ */ React100.createElement(Text51, { size: "xs", c: "dimmed" }, "No recipients added yet"), /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, localTo.map((recipient, index) => /* @__PURE__ */ React100.createElement(Paper10, { key: index, p: "xs", withBorder: true }, /* @__PURE__ */ React100.createElement(Group30, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React100.createElement(TextInput36, { style: { flex: 1 }, placeholder: "email@example.com", value: recipient, onChange: (e) => handleRecipientChange("to", index, e.currentTarget.value) }), /* @__PURE__ */ React100.createElement(ActionIcon14, { color: "red", variant: "light", onClick: () => handleRemoveRecipient("to", index) }, /* @__PURE__ */ React100.createElement(IconTrash2, { size: 16 }))))))), /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React100.createElement(Group30, { justify: "space-between" }, /* @__PURE__ */ React100.createElement(Text51, { size: "sm", fw: 600 }, "CC (Optional)"), /* @__PURE__ */ React100.createElement(Button24, { size: "xs", leftSection: /* @__PURE__ */ React100.createElement(IconPlus2, { size: 14 }), onClick: () => handleAddRecipient("cc") }, "Add")), localCc.length > 0 && /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, localCc.map((recipient, index) => /* @__PURE__ */ React100.createElement(Paper10, { key: index, p: "xs", withBorder: true }, /* @__PURE__ */ React100.createElement(Group30, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React100.createElement(
|
|
8337
8542
|
TextInput36,
|
|
8338
8543
|
{
|
|
8339
8544
|
style: { flex: 1 },
|
|
@@ -8341,7 +8546,7 @@ var GeneralTab5 = ({
|
|
|
8341
8546
|
value: recipient,
|
|
8342
8547
|
onChange: (e) => handleRecipientChange("cc", index, e.currentTarget.value)
|
|
8343
8548
|
}
|
|
8344
|
-
), /* @__PURE__ */
|
|
8549
|
+
), /* @__PURE__ */ React100.createElement(ActionIcon14, { color: "red", variant: "light", onClick: () => handleRemoveRecipient("cc", index) }, /* @__PURE__ */ React100.createElement(IconTrash2, { size: 16 }))))))), /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React100.createElement(Group30, { justify: "space-between" }, /* @__PURE__ */ React100.createElement(Text51, { size: "sm", fw: 600 }, "BCC (Optional)"), /* @__PURE__ */ React100.createElement(Button24, { size: "xs", leftSection: /* @__PURE__ */ React100.createElement(IconPlus2, { size: 14 }), onClick: () => handleAddRecipient("bcc") }, "Add")), localBcc.length > 0 && /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, localBcc.map((recipient, index) => /* @__PURE__ */ React100.createElement(Paper10, { key: index, p: "xs", withBorder: true }, /* @__PURE__ */ React100.createElement(Group30, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React100.createElement(
|
|
8345
8550
|
TextInput36,
|
|
8346
8551
|
{
|
|
8347
8552
|
style: { flex: 1 },
|
|
@@ -8349,7 +8554,7 @@ var GeneralTab5 = ({
|
|
|
8349
8554
|
value: recipient,
|
|
8350
8555
|
onChange: (e) => handleRecipientChange("bcc", index, e.currentTarget.value)
|
|
8351
8556
|
}
|
|
8352
|
-
), /* @__PURE__ */
|
|
8557
|
+
), /* @__PURE__ */ React100.createElement(ActionIcon14, { color: "red", variant: "light", onClick: () => handleRemoveRecipient("bcc", index) }, /* @__PURE__ */ React100.createElement(IconTrash2, { size: 16 }))))))), /* @__PURE__ */ React100.createElement(Divider6, { variant: "dashed" }), /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React100.createElement(Text51, { size: "sm", fw: 600 }, "From (Optional)"), /* @__PURE__ */ React100.createElement(
|
|
8353
8558
|
TextInput36,
|
|
8354
8559
|
{
|
|
8355
8560
|
placeholder: "sender@example.com",
|
|
@@ -8360,7 +8565,7 @@ var GeneralTab5 = ({
|
|
|
8360
8565
|
onFromChange(newFrom);
|
|
8361
8566
|
}
|
|
8362
8567
|
}
|
|
8363
|
-
), /* @__PURE__ */
|
|
8568
|
+
), /* @__PURE__ */ React100.createElement(Text51, { size: "xs", c: "dimmed" }, "Custom sender email address")), /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React100.createElement(Text51, { size: "sm", fw: 600 }, "Reply-To (Optional)"), /* @__PURE__ */ React100.createElement(
|
|
8364
8569
|
TextInput36,
|
|
8365
8570
|
{
|
|
8366
8571
|
placeholder: "reply@example.com",
|
|
@@ -8371,7 +8576,7 @@ var GeneralTab5 = ({
|
|
|
8371
8576
|
onReplyToChange(newReplyTo);
|
|
8372
8577
|
}
|
|
8373
8578
|
}
|
|
8374
|
-
), /* @__PURE__ */
|
|
8579
|
+
), /* @__PURE__ */ React100.createElement(Text51, { size: "xs", c: "dimmed" }, "Where replies should be sent")), /* @__PURE__ */ React100.createElement(Divider6, { variant: "dashed" }), /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React100.createElement(Text51, { size: "sm", fw: 600 }, "Subject"), /* @__PURE__ */ React100.createElement(
|
|
8375
8580
|
TextInput36,
|
|
8376
8581
|
{
|
|
8377
8582
|
placeholder: "Email subject line",
|
|
@@ -8382,7 +8587,7 @@ var GeneralTab5 = ({
|
|
|
8382
8587
|
onSubjectChange(newSubject);
|
|
8383
8588
|
}
|
|
8384
8589
|
}
|
|
8385
|
-
)), /* @__PURE__ */
|
|
8590
|
+
)), /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React100.createElement(Text51, { size: "sm", fw: 600 }, "Body Type"), /* @__PURE__ */ React100.createElement(
|
|
8386
8591
|
Select12,
|
|
8387
8592
|
{
|
|
8388
8593
|
value: localBodyType,
|
|
@@ -8396,7 +8601,7 @@ var GeneralTab5 = ({
|
|
|
8396
8601
|
{ value: "html", label: "HTML" }
|
|
8397
8602
|
]
|
|
8398
8603
|
}
|
|
8399
|
-
)), /* @__PURE__ */
|
|
8604
|
+
)), /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React100.createElement(Text51, { size: "sm", fw: 600 }, "Body"), /* @__PURE__ */ React100.createElement(
|
|
8400
8605
|
Textarea20,
|
|
8401
8606
|
{
|
|
8402
8607
|
placeholder: localBodyType === "html" ? "<h1>Hello!</h1><p>Welcome to our service.</p>" : "Email body content",
|
|
@@ -8408,7 +8613,7 @@ var GeneralTab5 = ({
|
|
|
8408
8613
|
onBodyChange(newBody);
|
|
8409
8614
|
}
|
|
8410
8615
|
}
|
|
8411
|
-
), /* @__PURE__ */
|
|
8616
|
+
), /* @__PURE__ */ React100.createElement(Text51, { size: "xs", c: "dimmed" }, localBodyType === "html" ? "HTML content for the email body" : "Plain text content for the email body"))));
|
|
8412
8617
|
};
|
|
8413
8618
|
|
|
8414
8619
|
// src/mantine/blocks/notify/template/TemplateConfig.tsx
|
|
@@ -8443,7 +8648,7 @@ var TemplateConfig5 = ({ editor, block }) => {
|
|
|
8443
8648
|
},
|
|
8444
8649
|
[updateProp]
|
|
8445
8650
|
);
|
|
8446
|
-
return /* @__PURE__ */
|
|
8651
|
+
return /* @__PURE__ */ React101.createElement(
|
|
8447
8652
|
Paper11,
|
|
8448
8653
|
{
|
|
8449
8654
|
p: "md",
|
|
@@ -8454,7 +8659,7 @@ var TemplateConfig5 = ({ editor, block }) => {
|
|
|
8454
8659
|
flexDirection: "column"
|
|
8455
8660
|
}
|
|
8456
8661
|
},
|
|
8457
|
-
/* @__PURE__ */
|
|
8662
|
+
/* @__PURE__ */ React101.createElement(
|
|
8458
8663
|
"div",
|
|
8459
8664
|
{
|
|
8460
8665
|
style: {
|
|
@@ -8464,17 +8669,17 @@ var TemplateConfig5 = ({ editor, block }) => {
|
|
|
8464
8669
|
marginBottom: "1rem"
|
|
8465
8670
|
}
|
|
8466
8671
|
},
|
|
8467
|
-
/* @__PURE__ */
|
|
8468
|
-
/* @__PURE__ */
|
|
8672
|
+
/* @__PURE__ */ React101.createElement(Title8, { order: 3 }, "Notification Settings"),
|
|
8673
|
+
/* @__PURE__ */ React101.createElement(CloseButton7, { onClick: closePanel })
|
|
8469
8674
|
),
|
|
8470
|
-
/* @__PURE__ */
|
|
8675
|
+
/* @__PURE__ */ React101.createElement(
|
|
8471
8676
|
ReusablePanel,
|
|
8472
8677
|
{
|
|
8473
8678
|
extraTabs: [
|
|
8474
8679
|
{
|
|
8475
8680
|
label: "General",
|
|
8476
8681
|
value: "general",
|
|
8477
|
-
content: /* @__PURE__ */
|
|
8682
|
+
content: /* @__PURE__ */ React101.createElement(
|
|
8478
8683
|
GeneralTab5,
|
|
8479
8684
|
{
|
|
8480
8685
|
title: block.props.title || "",
|
|
@@ -8528,11 +8733,11 @@ var TemplateConfig5 = ({ editor, block }) => {
|
|
|
8528
8733
|
};
|
|
8529
8734
|
|
|
8530
8735
|
// src/mantine/blocks/notify/template/TemplateView.tsx
|
|
8531
|
-
import { Card as Card22, Group as Group31, Stack as
|
|
8736
|
+
import { Card as Card22, Group as Group31, Stack as Stack77, Text as Text52, ActionIcon as ActionIcon15, Badge as Badge12 } from "@mantine/core";
|
|
8532
8737
|
var NOTIFY_TEMPLATE_PANEL_ID = "notify-template-panel";
|
|
8533
8738
|
var NotifyTemplateView = ({ editor, block }) => {
|
|
8534
8739
|
const panelId = `${NOTIFY_TEMPLATE_PANEL_ID}-${block.id}`;
|
|
8535
|
-
const panelContent = useMemo14(() => /* @__PURE__ */
|
|
8740
|
+
const panelContent = useMemo14(() => /* @__PURE__ */ React102.createElement(TemplateConfig5, { editor, block }), [editor, block]);
|
|
8536
8741
|
const { open } = usePanel(panelId, panelContent);
|
|
8537
8742
|
const channel = block.props.channel || "email";
|
|
8538
8743
|
const to = (() => {
|
|
@@ -8557,13 +8762,13 @@ var NotifyTemplateView = ({ editor, block }) => {
|
|
|
8557
8762
|
return "gray";
|
|
8558
8763
|
}
|
|
8559
8764
|
};
|
|
8560
|
-
return /* @__PURE__ */
|
|
8765
|
+
return /* @__PURE__ */ React102.createElement(Card22, { withBorder: true, padding: "md", radius: "md", style: { width: "100%", cursor: "pointer", position: "relative" }, onClick: open }, /* @__PURE__ */ React102.createElement(Badge12, { size: "xs", variant: "light", color: "gray", style: { position: "absolute", top: 8, right: 8 } }, "Template"), /* @__PURE__ */ React102.createElement(Group31, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React102.createElement(Group31, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React102.createElement(ActionIcon15, { variant: "light", color: getChannelColor(channel), size: "lg", radius: "xl", style: { flexShrink: 0 } }, getIcon(block.props.icon, 18, 1.5, "bell")), /* @__PURE__ */ React102.createElement(Stack77, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React102.createElement(Group31, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React102.createElement(Badge12, { size: "sm", variant: "filled", color: getChannelColor(channel) }, channel.toUpperCase()), /* @__PURE__ */ React102.createElement(Text52, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Notification")), /* @__PURE__ */ React102.createElement(Text52, { size: "xs", c: "dimmed", contentEditable: false, lineClamp: 1 }, to.length > 0 ? `To: ${to.join(", ")}` : "Click to configure recipients"), block.props.description && /* @__PURE__ */ React102.createElement(Text52, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description)))));
|
|
8561
8766
|
};
|
|
8562
8767
|
|
|
8563
8768
|
// src/mantine/blocks/notify/flow/FlowView.tsx
|
|
8564
|
-
import
|
|
8565
|
-
import { Card as Card23, Group as Group32, Stack as
|
|
8566
|
-
import { IconSend as IconSend2, IconChevronDown as
|
|
8769
|
+
import React103, { useState as useState27 } from "react";
|
|
8770
|
+
import { Card as Card23, Group as Group32, Stack as Stack78, Text as Text53, ActionIcon as ActionIcon16, Tooltip as Tooltip5, Button as Button25, Badge as Badge13, Collapse as Collapse3, Alert as Alert10, Loader as Loader5, Code as Code2 } from "@mantine/core";
|
|
8771
|
+
import { IconSend as IconSend2, IconChevronDown as IconChevronDown3, IconChevronUp as IconChevronUp3, IconCheck, IconX } from "@tabler/icons-react";
|
|
8567
8772
|
var NotifyFlowView = ({ editor, block, isDisabled }) => {
|
|
8568
8773
|
const disabled = isDisabled?.isDisabled === "disable";
|
|
8569
8774
|
const [isLoading, setIsLoading] = useState27(false);
|
|
@@ -8668,20 +8873,20 @@ var NotifyFlowView = ({ editor, block, isDisabled }) => {
|
|
|
8668
8873
|
}
|
|
8669
8874
|
};
|
|
8670
8875
|
const canSend = !disabled && !isLoading && handlers && to.length > 0 && (channel === "email" ? block.props.subject && block.props.body : true);
|
|
8671
|
-
const sendButton = /* @__PURE__ */
|
|
8876
|
+
const sendButton = /* @__PURE__ */ React103.createElement(
|
|
8672
8877
|
Button25,
|
|
8673
8878
|
{
|
|
8674
8879
|
size: "sm",
|
|
8675
8880
|
variant: "light",
|
|
8676
8881
|
color: getChannelColor(channel),
|
|
8677
|
-
leftSection: isLoading ? /* @__PURE__ */
|
|
8882
|
+
leftSection: isLoading ? /* @__PURE__ */ React103.createElement(Loader5, { size: 14 }) : status === "sent" ? /* @__PURE__ */ React103.createElement(IconCheck, { size: 14 }) : /* @__PURE__ */ React103.createElement(IconSend2, { size: 14 }),
|
|
8678
8883
|
onClick: handleSendNotification,
|
|
8679
8884
|
disabled: !canSend,
|
|
8680
8885
|
style: { flexShrink: 0 }
|
|
8681
8886
|
},
|
|
8682
8887
|
isLoading ? "Sending..." : status === "sent" ? "Sent" : "Send"
|
|
8683
8888
|
);
|
|
8684
|
-
return /* @__PURE__ */
|
|
8889
|
+
return /* @__PURE__ */ React103.createElement(Card23, { withBorder: true, padding: "md", radius: "md", style: { width: "100%" } }, /* @__PURE__ */ React103.createElement(Stack78, { gap: "md" }, /* @__PURE__ */ React103.createElement(Group32, { wrap: "nowrap", justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React103.createElement(Group32, { wrap: "nowrap", align: "flex-start", style: { flex: 1 } }, /* @__PURE__ */ React103.createElement(ActionIcon16, { variant: "light", color: getChannelColor(channel), size: "lg", radius: "xl", style: { flexShrink: 0 } }, getIcon(block.props.icon, 18, 1.5, "bell")), /* @__PURE__ */ React103.createElement(Stack78, { gap: "xs", style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React103.createElement(Group32, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React103.createElement(Badge13, { size: "sm", variant: "filled", color: getChannelColor(channel) }, channel.toUpperCase()), /* @__PURE__ */ React103.createElement(Text53, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Notification"), status !== "idle" && /* @__PURE__ */ React103.createElement(Badge13, { size: "xs", variant: "dot", color: getStatusColor(status) }, status)), /* @__PURE__ */ React103.createElement(Text53, { size: "xs", c: "dimmed", contentEditable: false, lineClamp: 1 }, to.length > 0 ? `To: ${to.slice(0, 2).join(", ")}${to.length > 2 ? ` +${to.length - 2} more` : ""}` : "No recipients"), block.props.description && /* @__PURE__ */ React103.createElement(Text53, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description))), /* @__PURE__ */ React103.createElement(Group32, { gap: "xs", style: { flexShrink: 0 } }, disabled && isDisabled?.message ? /* @__PURE__ */ React103.createElement(Tooltip5, { label: isDisabled.message, position: "left", withArrow: true }, sendButton) : sendButton, /* @__PURE__ */ React103.createElement(ActionIcon16, { variant: "subtle", onClick: () => setShowDetails(!showDetails) }, showDetails ? /* @__PURE__ */ React103.createElement(IconChevronUp3, { size: 16 }) : /* @__PURE__ */ React103.createElement(IconChevronDown3, { size: 16 })))), status === "failed" && block.props.errorMessage && /* @__PURE__ */ React103.createElement(Alert10, { color: "red", icon: /* @__PURE__ */ React103.createElement(IconX, { size: 16 }), title: "Failed to send", styles: { message: { fontSize: "12px" } } }, block.props.errorMessage), status === "sent" && block.props.messageId && /* @__PURE__ */ React103.createElement(Alert10, { color: "green", icon: /* @__PURE__ */ React103.createElement(IconCheck, { size: 16 }), title: "Sent successfully", styles: { message: { fontSize: "12px" } } }, "Message ID: ", block.props.messageId, block.props.sentAt && /* @__PURE__ */ React103.createElement(React103.Fragment, null, /* @__PURE__ */ React103.createElement("br", null), "Sent at: ", new Date(block.props.sentAt).toLocaleString())), /* @__PURE__ */ React103.createElement(Collapse3, { in: showDetails }, /* @__PURE__ */ React103.createElement(Stack78, { gap: "md" }, channel === "email" && /* @__PURE__ */ React103.createElement(React103.Fragment, null, /* @__PURE__ */ React103.createElement(Stack78, { gap: "xs" }, /* @__PURE__ */ React103.createElement(Text53, { size: "xs", fw: 600, c: "dimmed" }, "Recipients:"), /* @__PURE__ */ React103.createElement(Code2, { block: true, style: { fontSize: "11px" } }, JSON.stringify(
|
|
8685
8890
|
{
|
|
8686
8891
|
to: to.filter((e) => e.trim() !== ""),
|
|
8687
8892
|
...cc.length > 0 && { cc: cc.filter((e) => e.trim() !== "") },
|
|
@@ -8689,7 +8894,7 @@ var NotifyFlowView = ({ editor, block, isDisabled }) => {
|
|
|
8689
8894
|
},
|
|
8690
8895
|
null,
|
|
8691
8896
|
2
|
|
8692
|
-
))), block.props.subject && /* @__PURE__ */
|
|
8897
|
+
))), block.props.subject && /* @__PURE__ */ React103.createElement(Stack78, { gap: "xs" }, /* @__PURE__ */ React103.createElement(Text53, { size: "xs", fw: 600, c: "dimmed" }, "Subject:"), /* @__PURE__ */ React103.createElement(Text53, { size: "xs" }, block.props.subject)), block.props.body && /* @__PURE__ */ React103.createElement(Stack78, { gap: "xs" }, /* @__PURE__ */ React103.createElement(Text53, { size: "xs", fw: 600, c: "dimmed" }, "Body (", block.props.bodyType || "text", "):"), /* @__PURE__ */ React103.createElement(Code2, { block: true, style: { fontSize: "11px", maxHeight: "200px", overflow: "auto" } }, block.props.body)), (block.props.from || block.props.replyTo) && /* @__PURE__ */ React103.createElement(Stack78, { gap: "xs" }, /* @__PURE__ */ React103.createElement(Text53, { size: "xs", fw: 600, c: "dimmed" }, "Additional:"), /* @__PURE__ */ React103.createElement(Code2, { block: true, style: { fontSize: "11px" } }, JSON.stringify(
|
|
8693
8898
|
{
|
|
8694
8899
|
...block.props.from && { from: block.props.from },
|
|
8695
8900
|
...block.props.replyTo && { replyTo: block.props.replyTo }
|
|
@@ -8704,7 +8909,7 @@ function NotifyBlock({ editor, block }) {
|
|
|
8704
8909
|
const { editable } = useBlocknoteContext();
|
|
8705
8910
|
const { actions } = useBlockConditions(block, editor);
|
|
8706
8911
|
if (editable) {
|
|
8707
|
-
return /* @__PURE__ */
|
|
8912
|
+
return /* @__PURE__ */ React104.createElement(NotifyTemplateView, { editor, block });
|
|
8708
8913
|
}
|
|
8709
8914
|
const conditionConfig = parseConditionConfig(block.props.conditions);
|
|
8710
8915
|
const hasVisibility = hasVisibilityConditions(conditionConfig);
|
|
@@ -8716,7 +8921,7 @@ function NotifyBlock({ editor, block }) {
|
|
|
8716
8921
|
const hasEnable = hasEnableConditions(conditionConfig);
|
|
8717
8922
|
const enableActionExists = actions.some((a) => a.action === "enable");
|
|
8718
8923
|
const shouldDisable = hasEnable && !enableActionExists;
|
|
8719
|
-
return /* @__PURE__ */
|
|
8924
|
+
return /* @__PURE__ */ React104.createElement(NotifyFlowView, { block, editor, isDisabled: shouldDisable ? { isDisabled: "disable", message: "Notification disabled by conditions" } : void 0 });
|
|
8720
8925
|
}
|
|
8721
8926
|
|
|
8722
8927
|
// src/mantine/blocks/notify/NotifyBlockSpec.tsx
|
|
@@ -8760,7 +8965,7 @@ var NotifyBlockSpec = createReactBlockSpec7(
|
|
|
8760
8965
|
{
|
|
8761
8966
|
render: (props) => {
|
|
8762
8967
|
const ixoProps = props;
|
|
8763
|
-
return /* @__PURE__ */
|
|
8968
|
+
return /* @__PURE__ */ React105.createElement(NotifyBlock, { ...ixoProps });
|
|
8764
8969
|
}
|
|
8765
8970
|
}
|
|
8766
8971
|
);
|
|
@@ -9517,19 +9722,19 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
9517
9722
|
}
|
|
9518
9723
|
|
|
9519
9724
|
// src/mantine/IxoEditor.tsx
|
|
9520
|
-
import
|
|
9725
|
+
import React107 from "react";
|
|
9521
9726
|
import { getDefaultReactSlashMenuItems, SuggestionMenuController } from "@blocknote/react";
|
|
9522
9727
|
import { BlockNoteView } from "@blocknote/mantine";
|
|
9523
9728
|
import { filterSuggestionItems } from "@blocknote/core";
|
|
9524
9729
|
import { MantineProvider } from "@mantine/core";
|
|
9525
9730
|
|
|
9526
9731
|
// src/mantine/components/PanelContent.tsx
|
|
9527
|
-
import
|
|
9732
|
+
import React106 from "react";
|
|
9528
9733
|
function PanelContent() {
|
|
9529
9734
|
const { activePanel, registeredPanels } = usePanelStore();
|
|
9530
9735
|
const isOpen = activePanel !== null;
|
|
9531
9736
|
const content = activePanel ? registeredPanels.get(activePanel) : null;
|
|
9532
|
-
return /* @__PURE__ */
|
|
9737
|
+
return /* @__PURE__ */ React106.createElement(
|
|
9533
9738
|
"div",
|
|
9534
9739
|
{
|
|
9535
9740
|
style: {
|
|
@@ -9553,7 +9758,7 @@ function IxoEditorContent({
|
|
|
9553
9758
|
onSelectionChange,
|
|
9554
9759
|
children
|
|
9555
9760
|
}) {
|
|
9556
|
-
return /* @__PURE__ */
|
|
9761
|
+
return /* @__PURE__ */ React107.createElement("div", { style: { display: "flex", height: "100%" } }, /* @__PURE__ */ React107.createElement("div", { className: `ixo-editor ixo-editor--theme-${config.theme} ${className}`, style: { flex: 1 } }, /* @__PURE__ */ React107.createElement(
|
|
9557
9762
|
BlockNoteView,
|
|
9558
9763
|
{
|
|
9559
9764
|
editor,
|
|
@@ -9568,7 +9773,7 @@ function IxoEditorContent({
|
|
|
9568
9773
|
onChange,
|
|
9569
9774
|
onSelectionChange
|
|
9570
9775
|
},
|
|
9571
|
-
config.slashMenu && /* @__PURE__ */
|
|
9776
|
+
config.slashMenu && /* @__PURE__ */ React107.createElement(
|
|
9572
9777
|
SuggestionMenuController,
|
|
9573
9778
|
{
|
|
9574
9779
|
triggerCharacter: "/",
|
|
@@ -9580,7 +9785,7 @@ function IxoEditorContent({
|
|
|
9580
9785
|
}
|
|
9581
9786
|
),
|
|
9582
9787
|
children
|
|
9583
|
-
)), /* @__PURE__ */
|
|
9788
|
+
)), /* @__PURE__ */ React107.createElement(PanelContent, null));
|
|
9584
9789
|
}
|
|
9585
9790
|
function IxoEditor({
|
|
9586
9791
|
editor,
|
|
@@ -9606,9 +9811,9 @@ function IxoEditor({
|
|
|
9606
9811
|
tableHandles: true
|
|
9607
9812
|
};
|
|
9608
9813
|
const isEditable = editable;
|
|
9609
|
-
const editorContent = /* @__PURE__ */
|
|
9814
|
+
const editorContent = /* @__PURE__ */ React107.createElement(BlocknoteProvider, { editor, handlers, blockRequirements, editable: isEditable }, /* @__PURE__ */ React107.createElement(IxoEditorContent, { editor, config, isEditable, className, onChange, onSelectionChange }, children));
|
|
9610
9815
|
if (mantineTheme) {
|
|
9611
|
-
return /* @__PURE__ */
|
|
9816
|
+
return /* @__PURE__ */ React107.createElement(MantineProvider, { theme: mantineTheme }, editorContent);
|
|
9612
9817
|
}
|
|
9613
9818
|
return editorContent;
|
|
9614
9819
|
}
|
|
@@ -9692,4 +9897,4 @@ export {
|
|
|
9692
9897
|
ixoGraphQLClient,
|
|
9693
9898
|
getEntity
|
|
9694
9899
|
};
|
|
9695
|
-
//# sourceMappingURL=chunk-
|
|
9900
|
+
//# sourceMappingURL=chunk-HNGZPIVW.mjs.map
|