@ixo/editor 2.18.0 → 2.19.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.
|
@@ -48,6 +48,44 @@ var usePanel = (panelId, content) => {
|
|
|
48
48
|
return { opened: isOpen, open, close };
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
+
// src/mantine/blocks/list/ui/ListBlocksUIContext.tsx
|
|
52
|
+
import { create as create2 } from "zustand";
|
|
53
|
+
var useListBlocksUIStore = create2((set, get) => ({
|
|
54
|
+
listeners: /* @__PURE__ */ new Set(),
|
|
55
|
+
isMaximized: false,
|
|
56
|
+
broadcastCollapse: (event) => {
|
|
57
|
+
get().listeners.forEach((listener) => listener(event));
|
|
58
|
+
},
|
|
59
|
+
subscribe: (listener) => {
|
|
60
|
+
set((state) => {
|
|
61
|
+
const newListeners = new Set(state.listeners);
|
|
62
|
+
newListeners.add(listener);
|
|
63
|
+
return { listeners: newListeners };
|
|
64
|
+
});
|
|
65
|
+
return () => {
|
|
66
|
+
set((state) => {
|
|
67
|
+
const newListeners = new Set(state.listeners);
|
|
68
|
+
newListeners.delete(listener);
|
|
69
|
+
return { listeners: newListeners };
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
},
|
|
73
|
+
setMaximized: (maximized) => {
|
|
74
|
+
set({ isMaximized: maximized });
|
|
75
|
+
},
|
|
76
|
+
toggleMaximized: () => {
|
|
77
|
+
set((state) => ({ isMaximized: !state.isMaximized }));
|
|
78
|
+
}
|
|
79
|
+
}));
|
|
80
|
+
var useListBlocksUI = () => {
|
|
81
|
+
const broadcastCollapse = useListBlocksUIStore((state) => state.broadcastCollapse);
|
|
82
|
+
const subscribe = useListBlocksUIStore((state) => state.subscribe);
|
|
83
|
+
const isMaximized = useListBlocksUIStore((state) => state.isMaximized);
|
|
84
|
+
const setMaximized = useListBlocksUIStore((state) => state.setMaximized);
|
|
85
|
+
const toggleMaximized = useListBlocksUIStore((state) => state.toggleMaximized);
|
|
86
|
+
return { broadcastCollapse, subscribe, isMaximized, setMaximized, toggleMaximized };
|
|
87
|
+
};
|
|
88
|
+
|
|
51
89
|
// src/mantine/context/BlocknoteContext.tsx
|
|
52
90
|
import React, { createContext, useContext, useState, useCallback as useCallback2, useRef as useRef2, useEffect as useEffect2 } from "react";
|
|
53
91
|
var BlocknoteContext = createContext({
|
|
@@ -1212,15 +1250,15 @@ var GeneralTab = ({
|
|
|
1212
1250
|
};
|
|
1213
1251
|
|
|
1214
1252
|
// src/mantine/components/Layouts/BaseRightPanelLayout.tsx
|
|
1215
|
-
import { Box as Box2,
|
|
1216
|
-
import {
|
|
1253
|
+
import { ActionIcon, Box as Box2, CloseButton, Flex, Text as Text4 } from "@mantine/core";
|
|
1254
|
+
import { IconArrowsMaximize, IconArrowsMinimize } from "@tabler/icons-react";
|
|
1217
1255
|
import React14 from "react";
|
|
1218
1256
|
function BaseRightPanelLayout({ title, isTemplate = true, captionContent, onClose, children }) {
|
|
1257
|
+
const { setMaximized, isMaximized } = useListBlocksUI();
|
|
1219
1258
|
return /* @__PURE__ */ React14.createElement(
|
|
1220
|
-
|
|
1259
|
+
Box2,
|
|
1221
1260
|
{
|
|
1222
1261
|
py: "md",
|
|
1223
|
-
shadow: "sm",
|
|
1224
1262
|
h: "100%",
|
|
1225
1263
|
style: {
|
|
1226
1264
|
display: "flex",
|
|
@@ -1228,11 +1266,31 @@ function BaseRightPanelLayout({ title, isTemplate = true, captionContent, onClos
|
|
|
1228
1266
|
overflow: "hidden"
|
|
1229
1267
|
}
|
|
1230
1268
|
},
|
|
1231
|
-
/* @__PURE__ */ React14.createElement(Flex, { align: "center", px: "md", justify:
|
|
1269
|
+
/* @__PURE__ */ React14.createElement(Flex, { align: "center", px: "md", justify: "space-between", mb: "40px" }, /* @__PURE__ */ React14.createElement(Flex, { align: "center", gap: "sm" }, /* @__PURE__ */ React14.createElement(
|
|
1270
|
+
ActionIcon,
|
|
1271
|
+
{
|
|
1272
|
+
onClick: () => setMaximized(!isMaximized),
|
|
1273
|
+
size: 32,
|
|
1274
|
+
radius: "md",
|
|
1275
|
+
variant: "filled",
|
|
1276
|
+
styles: {
|
|
1277
|
+
root: {
|
|
1278
|
+
backgroundColor: "#282828",
|
|
1279
|
+
"&:hover": {
|
|
1280
|
+
backgroundColor: "#383838"
|
|
1281
|
+
}
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
},
|
|
1285
|
+
isMaximized ? /* @__PURE__ */ React14.createElement(IconArrowsMinimize, { size: "20px", color: "white" }) : /* @__PURE__ */ React14.createElement(IconArrowsMaximize, { size: "20px", color: "white" })
|
|
1286
|
+
), /* @__PURE__ */ React14.createElement(Text4, { fz: 16 }, title)), /* @__PURE__ */ React14.createElement(
|
|
1232
1287
|
CloseButton,
|
|
1233
1288
|
{
|
|
1234
1289
|
color: "white",
|
|
1235
|
-
onClick:
|
|
1290
|
+
onClick: () => {
|
|
1291
|
+
onClose();
|
|
1292
|
+
setMaximized(false);
|
|
1293
|
+
},
|
|
1236
1294
|
style: { backgroundColor: "#282828" },
|
|
1237
1295
|
styles: {
|
|
1238
1296
|
root: {
|
|
@@ -1243,7 +1301,6 @@ function BaseRightPanelLayout({ title, isTemplate = true, captionContent, onClos
|
|
|
1243
1301
|
}
|
|
1244
1302
|
}
|
|
1245
1303
|
)),
|
|
1246
|
-
/* @__PURE__ */ React14.createElement(Title, { px: 40, mb: "md", order: 3 }, title),
|
|
1247
1304
|
captionContent,
|
|
1248
1305
|
/* @__PURE__ */ React14.createElement(
|
|
1249
1306
|
Box2,
|
|
@@ -1319,7 +1376,7 @@ var TemplateConfig = ({ editor, block }) => {
|
|
|
1319
1376
|
};
|
|
1320
1377
|
|
|
1321
1378
|
// src/mantine/blocks/checkbox/template/TemplateView.tsx
|
|
1322
|
-
import { Checkbox, Group as Group2, Stack as Stack7, Text as
|
|
1379
|
+
import { Checkbox, Group as Group2, Stack as Stack7, Text as Text5 } from "@mantine/core";
|
|
1323
1380
|
|
|
1324
1381
|
// src/mantine/utils/iconMap.tsx
|
|
1325
1382
|
import React16 from "react";
|
|
@@ -1364,12 +1421,12 @@ var CheckboxTemplateView = ({ editor, block }) => {
|
|
|
1364
1421
|
const panelId = `${CHECKBOX_TEMPLATE_PANEL_ID}-${block.id}`;
|
|
1365
1422
|
const panelContent = useMemo4(() => /* @__PURE__ */ React17.createElement(TemplateConfig, { editor, block }), [editor, block]);
|
|
1366
1423
|
const { open } = usePanel(panelId, panelContent);
|
|
1367
|
-
return /* @__PURE__ */ React17.createElement(BaseContainer, { onClick: open }, /* @__PURE__ */ React17.createElement(Group2, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React17.createElement(Group2, { wrap: "nowrap", align: "center" }, getIcon("square-check", block.props.icon), /* @__PURE__ */ React17.createElement(Stack7, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React17.createElement(
|
|
1424
|
+
return /* @__PURE__ */ React17.createElement(BaseContainer, { onClick: open }, /* @__PURE__ */ React17.createElement(Group2, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React17.createElement(Group2, { wrap: "nowrap", align: "center" }, getIcon("square-check", block.props.icon), /* @__PURE__ */ React17.createElement(Stack7, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React17.createElement(Text5, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Checkbox Title"), /* @__PURE__ */ React17.createElement(Text5, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description || "Checkbox description"))), /* @__PURE__ */ React17.createElement(Checkbox, { contentEditable: false, disabled: true, checked: false, style: { flexShrink: 0 }, onClick: (e) => e.stopPropagation() })));
|
|
1368
1425
|
};
|
|
1369
1426
|
|
|
1370
1427
|
// src/mantine/blocks/checkbox/flow/FlowView.tsx
|
|
1371
1428
|
import React18 from "react";
|
|
1372
|
-
import { Checkbox as Checkbox2, Group as Group3, Stack as Stack8, Text as
|
|
1429
|
+
import { Checkbox as Checkbox2, Group as Group3, Stack as Stack8, Text as Text6, Tooltip } from "@mantine/core";
|
|
1373
1430
|
var CheckboxFlowView = ({ editor, block, isDisabled }) => {
|
|
1374
1431
|
const disabled = isDisabled?.isDisabled === "disable";
|
|
1375
1432
|
const handleCheckboxChange = (event) => {
|
|
@@ -1389,7 +1446,7 @@ var CheckboxFlowView = ({ editor, block, isDisabled }) => {
|
|
|
1389
1446
|
onClick: (e) => e.stopPropagation()
|
|
1390
1447
|
}
|
|
1391
1448
|
);
|
|
1392
|
-
return /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(BaseContainer, null, /* @__PURE__ */ React18.createElement(Group3, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React18.createElement(Group3, { wrap: "nowrap", align: "center" }, getIcon("square-check", block.props.icon), /* @__PURE__ */ React18.createElement(Stack8, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React18.createElement(
|
|
1449
|
+
return /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(BaseContainer, null, /* @__PURE__ */ React18.createElement(Group3, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React18.createElement(Group3, { wrap: "nowrap", align: "center" }, getIcon("square-check", block.props.icon), /* @__PURE__ */ React18.createElement(Stack8, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React18.createElement(Text6, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Checkbox Title"), /* @__PURE__ */ React18.createElement(Text6, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description || "Checkbox description"))), disabled && isDisabled?.message ? /* @__PURE__ */ React18.createElement(Tooltip, { label: isDisabled.message, position: "left", withArrow: true }, checkboxElement) : checkboxElement)));
|
|
1393
1450
|
};
|
|
1394
1451
|
|
|
1395
1452
|
// src/mantine/blocks/hooks/useBlockConditions.ts
|
|
@@ -1673,34 +1730,6 @@ var useSharedProposal = ({ proposalId, contractAddress, autoFetch = true }) => {
|
|
|
1673
1730
|
};
|
|
1674
1731
|
};
|
|
1675
1732
|
|
|
1676
|
-
// src/mantine/blocks/list/ui/ListBlocksUIContext.tsx
|
|
1677
|
-
import { create as create2 } from "zustand";
|
|
1678
|
-
var useListBlocksUIStore = create2((set, get) => ({
|
|
1679
|
-
listeners: /* @__PURE__ */ new Set(),
|
|
1680
|
-
broadcastCollapse: (event) => {
|
|
1681
|
-
get().listeners.forEach((listener) => listener(event));
|
|
1682
|
-
},
|
|
1683
|
-
subscribe: (listener) => {
|
|
1684
|
-
set((state) => {
|
|
1685
|
-
const newListeners = new Set(state.listeners);
|
|
1686
|
-
newListeners.add(listener);
|
|
1687
|
-
return { listeners: newListeners };
|
|
1688
|
-
});
|
|
1689
|
-
return () => {
|
|
1690
|
-
set((state) => {
|
|
1691
|
-
const newListeners = new Set(state.listeners);
|
|
1692
|
-
newListeners.delete(listener);
|
|
1693
|
-
return { listeners: newListeners };
|
|
1694
|
-
});
|
|
1695
|
-
};
|
|
1696
|
-
}
|
|
1697
|
-
}));
|
|
1698
|
-
var useListBlocksUI = () => {
|
|
1699
|
-
const broadcastCollapse = useListBlocksUIStore((state) => state.broadcastCollapse);
|
|
1700
|
-
const subscribe = useListBlocksUIStore((state) => state.subscribe);
|
|
1701
|
-
return { broadcastCollapse, subscribe };
|
|
1702
|
-
};
|
|
1703
|
-
|
|
1704
1733
|
// src/mantine/blocks/list/ListBlockSpec.tsx
|
|
1705
1734
|
import React50 from "react";
|
|
1706
1735
|
import { createReactBlockSpec as createReactBlockSpec2 } from "@blocknote/react";
|
|
@@ -1716,7 +1745,7 @@ import React22, { useCallback as useCallback9 } from "react";
|
|
|
1716
1745
|
|
|
1717
1746
|
// src/mantine/blocks/list/template/GeneralTab.tsx
|
|
1718
1747
|
import React21, { useState as useState6 } from "react";
|
|
1719
|
-
import { Stack as Stack9, Card as Card2, Group as Group4, Text as
|
|
1748
|
+
import { Stack as Stack9, Card as Card2, Group as Group4, Text as Text7, Box as Box3, Button as Button3, Switch as Switch3, Accordion } from "@mantine/core";
|
|
1720
1749
|
|
|
1721
1750
|
// src/mantine/blocks/list/linked_resources/config.ts
|
|
1722
1751
|
var linkedResourcesMetadata = {
|
|
@@ -2595,7 +2624,7 @@ var GeneralTab2 = ({ initialConfig, onSave }) => {
|
|
|
2595
2624
|
}
|
|
2596
2625
|
}
|
|
2597
2626
|
},
|
|
2598
|
-
/* @__PURE__ */ React21.createElement(
|
|
2627
|
+
/* @__PURE__ */ React21.createElement(Text7, { fw: 600 }, "Choose List Type")
|
|
2599
2628
|
), /* @__PURE__ */ React21.createElement(Accordion.Panel, null, /* @__PURE__ */ React21.createElement(Stack9, { gap: "sm", mt: "md" }, listTypes.map((listType) => /* @__PURE__ */ React21.createElement(
|
|
2600
2629
|
Card2,
|
|
2601
2630
|
{
|
|
@@ -2630,7 +2659,7 @@ var GeneralTab2 = ({ initialConfig, onSave }) => {
|
|
|
2630
2659
|
}
|
|
2631
2660
|
},
|
|
2632
2661
|
listType.icon
|
|
2633
|
-
), /* @__PURE__ */ React21.createElement(Stack9, { gap: 2, style: { flex: 1 } }, /* @__PURE__ */ React21.createElement(
|
|
2662
|
+
), /* @__PURE__ */ React21.createElement(Stack9, { gap: 2, style: { flex: 1 } }, /* @__PURE__ */ React21.createElement(Text7, { size: "md", fw: 600 }, listType.name), /* @__PURE__ */ React21.createElement(Text7, { size: "sm", c: "dimmed" }, listType.description)))
|
|
2634
2663
|
))))), selectedType && typeConfig && /* @__PURE__ */ React21.createElement(Accordion.Item, { value: "configure" }, /* @__PURE__ */ React21.createElement(
|
|
2635
2664
|
Accordion.Control,
|
|
2636
2665
|
{
|
|
@@ -2645,8 +2674,8 @@ var GeneralTab2 = ({ initialConfig, onSave }) => {
|
|
|
2645
2674
|
}
|
|
2646
2675
|
}
|
|
2647
2676
|
},
|
|
2648
|
-
/* @__PURE__ */ React21.createElement(
|
|
2649
|
-
), /* @__PURE__ */ React21.createElement(Accordion.Panel, null, /* @__PURE__ */ React21.createElement(Stack9, { gap: "md", mt: "md" }, /* @__PURE__ */ React21.createElement(
|
|
2677
|
+
/* @__PURE__ */ React21.createElement(Text7, { fw: 600 }, "Configure ", typeConfig.metadata.name)
|
|
2678
|
+
), /* @__PURE__ */ React21.createElement(Accordion.Panel, null, /* @__PURE__ */ React21.createElement(Stack9, { gap: "md", mt: "md" }, /* @__PURE__ */ React21.createElement(Text7, { size: "sm", c: "dimmed" }, typeConfig.metadata.description), /* @__PURE__ */ React21.createElement(Stack9, { gap: "sm" }, typeConfig.configFields.map((field) => renderConfigField(field))))))), selectedType && /* @__PURE__ */ React21.createElement(BaseButton, { onClick: handleSaveConfig, disabled: !isConfigValid(), fullWidth: true }, "Save Configuration"));
|
|
2650
2679
|
};
|
|
2651
2680
|
|
|
2652
2681
|
// src/mantine/blocks/list/template/TemplateConfig.tsx
|
|
@@ -2715,7 +2744,7 @@ var TemplateConfig2 = ({ editor, block }) => {
|
|
|
2715
2744
|
};
|
|
2716
2745
|
|
|
2717
2746
|
// src/mantine/blocks/list/template/TemplateView.tsx
|
|
2718
|
-
import { Group as Group5, Stack as Stack10, Text as
|
|
2747
|
+
import { Group as Group5, Stack as Stack10, Text as Text8 } from "@mantine/core";
|
|
2719
2748
|
var LIST_TEMPLATE_PANEL_ID = "list-template-panel";
|
|
2720
2749
|
var ListTemplateView = ({ editor, block }) => {
|
|
2721
2750
|
const panelId = `${LIST_TEMPLATE_PANEL_ID}-${block.id}`;
|
|
@@ -2723,20 +2752,20 @@ var ListTemplateView = ({ editor, block }) => {
|
|
|
2723
2752
|
const { open } = usePanel(panelId, panelContent);
|
|
2724
2753
|
const listType = block.props.listType && block.props.listType !== "" ? block.props.listType : null;
|
|
2725
2754
|
const listName = listType ? getListNameByType(listType) : "Unconfigured List";
|
|
2726
|
-
return /* @__PURE__ */ React23.createElement(BaseContainer, { onClick: open }, /* @__PURE__ */ React23.createElement(Group5, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React23.createElement(Group5, { wrap: "nowrap", align: "center" }, getIcon("checklist", block.props.icon), /* @__PURE__ */ React23.createElement(Stack10, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React23.createElement(
|
|
2755
|
+
return /* @__PURE__ */ React23.createElement(BaseContainer, { onClick: open }, /* @__PURE__ */ React23.createElement(Group5, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React23.createElement(Group5, { wrap: "nowrap", align: "center" }, getIcon("checklist", block.props.icon), /* @__PURE__ */ React23.createElement(Stack10, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React23.createElement(Text8, { fw: 500, size: "sm", contentEditable: false }, listName), /* @__PURE__ */ React23.createElement(Text8, { size: "xs", c: "dimmed", contentEditable: false }, listType ? `List of ${listName.toLowerCase()}` : "Click to configure list type and settings")))));
|
|
2727
2756
|
};
|
|
2728
2757
|
|
|
2729
2758
|
// src/mantine/blocks/list/flow/ListFlowView.tsx
|
|
2730
2759
|
import React48, { useState as useState10, useEffect as useEffect7, useMemo as useMemo8, useCallback as useCallback10 } from "react";
|
|
2731
|
-
import { Stack as Stack30, Text as
|
|
2760
|
+
import { Stack as Stack30, Text as Text30, ActionIcon as ActionIcon3, Loader as Loader2, Center as Center3, Flex as Flex20, Title as Title2, Collapse as Collapse2, Tooltip as Tooltip5 } from "@mantine/core";
|
|
2732
2761
|
|
|
2733
2762
|
// src/mantine/blocks/list/linked_resources/ResourcesList.tsx
|
|
2734
2763
|
import React26 from "react";
|
|
2735
|
-
import { Stack as Stack11, Text as
|
|
2764
|
+
import { Stack as Stack11, Text as Text9, Box as Box4, Flex as Flex3 } from "@mantine/core";
|
|
2736
2765
|
import { IconPdf, IconFileTypeHtml, IconJson, IconPhoto, IconFileText as IconFileText2, IconFile } from "@tabler/icons-react";
|
|
2737
2766
|
|
|
2738
2767
|
// src/mantine/blocks/list/ListItemContainer.tsx
|
|
2739
|
-
import { Center
|
|
2768
|
+
import { Center, Flex as Flex2, Paper, Tooltip as Tooltip2 } from "@mantine/core";
|
|
2740
2769
|
import { IconPlayerPlay } from "@tabler/icons-react";
|
|
2741
2770
|
import React24 from "react";
|
|
2742
2771
|
function ListItemContainer({
|
|
@@ -2765,7 +2794,7 @@ function ListItemContainer({
|
|
|
2765
2794
|
justify: "space-between"
|
|
2766
2795
|
},
|
|
2767
2796
|
children,
|
|
2768
|
-
withIcon && /* @__PURE__ */ React24.createElement(
|
|
2797
|
+
withIcon && /* @__PURE__ */ React24.createElement(Paper, { ml: 12, w: 28, h: 28, radius: "xl", bg: "rgb(0, 255, 157,0.2)" }, /* @__PURE__ */ React24.createElement(Center, { w: 28, h: 28 }, /* @__PURE__ */ React24.createElement(IconPlayerPlay, { size: 20, color: "rgb(0, 255, 157)" })))
|
|
2769
2798
|
);
|
|
2770
2799
|
if (tooltip) {
|
|
2771
2800
|
return /* @__PURE__ */ React24.createElement(Tooltip2, { label: tooltip, disabled: !disabled, position: tooltipPosition, withArrow: true }, content);
|
|
@@ -2814,7 +2843,7 @@ var resourcesDescriptions = {
|
|
|
2814
2843
|
};
|
|
2815
2844
|
var ResourcesList = ({ items, isMultiSelect, isItemChecked, onItemCheck, config: _config }) => {
|
|
2816
2845
|
if (!items || items.length === 0) {
|
|
2817
|
-
return /* @__PURE__ */ React26.createElement(
|
|
2846
|
+
return /* @__PURE__ */ React26.createElement(Text9, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No linked resources found");
|
|
2818
2847
|
}
|
|
2819
2848
|
const rows = items.map((item, index) => {
|
|
2820
2849
|
const title = item.description || item.id || `Resource ${index + 1}`;
|
|
@@ -2835,7 +2864,7 @@ var ResourcesList = ({ items, isMultiSelect, isItemChecked, onItemCheck, config:
|
|
|
2835
2864
|
const IconComponent = item.format && iconResourceFormatsDictionary[item.format] ? iconResourceFormatsDictionary[item.format] : IconFile;
|
|
2836
2865
|
return /* @__PURE__ */ React26.createElement(IconComponent, { size: 32 });
|
|
2837
2866
|
})()
|
|
2838
|
-
), /* @__PURE__ */ React26.createElement(Stack11, { gap: 0 }, /* @__PURE__ */ React26.createElement(
|
|
2867
|
+
), /* @__PURE__ */ React26.createElement(Stack11, { gap: 0 }, /* @__PURE__ */ React26.createElement(Text9, { size: "sm" }, title), item.format && /* @__PURE__ */ React26.createElement(Text9, { size: "xs", c: "dimmed" }, resourcesDescriptions[item.format]))), /* @__PURE__ */ React26.createElement(Flex3, { align: "center", gap: "md" }, /* @__PURE__ */ React26.createElement(Stack11, { ta: "right", gap: 0 }, /* @__PURE__ */ React26.createElement(Text9, { size: "sm" }, item?.access ? "Public" : "Private"), /* @__PURE__ */ React26.createElement(Text9, { size: "xs", c: "dimmed" }, item?.access ? "Accessible" : "Ask for access")), isMultiSelect && /* @__PURE__ */ React26.createElement(
|
|
2839
2868
|
ListItemCheckbox,
|
|
2840
2869
|
{
|
|
2841
2870
|
ariaLabel: `Select resource ${item.id}`,
|
|
@@ -2849,7 +2878,7 @@ var ResourcesList = ({ items, isMultiSelect, isItemChecked, onItemCheck, config:
|
|
|
2849
2878
|
|
|
2850
2879
|
// src/mantine/blocks/list/assets/AssetsList.tsx
|
|
2851
2880
|
import React27 from "react";
|
|
2852
|
-
import { Text as
|
|
2881
|
+
import { Text as Text10, Box as Box5, Stack as Stack12, Flex as Flex4, Image } from "@mantine/core";
|
|
2853
2882
|
|
|
2854
2883
|
// src/core/lib/formatters.ts
|
|
2855
2884
|
var formatNumber = (value) => typeof value === "number" ? value.toLocaleString() : "-";
|
|
@@ -2865,18 +2894,18 @@ function shortStr(str, threshold = 30, saveSymbolsAtTheEnd = 10, insert = "...")
|
|
|
2865
2894
|
// src/mantine/blocks/list/assets/AssetsList.tsx
|
|
2866
2895
|
var AssetsList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
2867
2896
|
if (!items || items.length === 0) {
|
|
2868
|
-
return /* @__PURE__ */ React27.createElement(
|
|
2897
|
+
return /* @__PURE__ */ React27.createElement(Text10, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No assets found");
|
|
2869
2898
|
}
|
|
2870
2899
|
const rows = items.map((asset) => {
|
|
2871
2900
|
const isChecked = isItemChecked?.(asset.did);
|
|
2872
|
-
return /* @__PURE__ */ React27.createElement(ListItemContainer, { onClick: () => onItemCheck?.(asset.did, !isChecked), key: asset.did, isChecked: !!isChecked }, /* @__PURE__ */ React27.createElement(Flex4, { align: "center", gap: "sm" }, /* @__PURE__ */ React27.createElement(Image, { radius: 16, w: 32, h: 32, src: asset.icon }), /* @__PURE__ */ React27.createElement(Stack12, { gap: 0 }, /* @__PURE__ */ React27.createElement(
|
|
2901
|
+
return /* @__PURE__ */ React27.createElement(ListItemContainer, { onClick: () => onItemCheck?.(asset.did, !isChecked), key: asset.did, isChecked: !!isChecked }, /* @__PURE__ */ React27.createElement(Flex4, { align: "center", gap: "sm" }, /* @__PURE__ */ React27.createElement(Image, { radius: 16, w: 32, h: 32, src: asset.icon }), /* @__PURE__ */ React27.createElement(Stack12, { gap: 0 }, /* @__PURE__ */ React27.createElement(Text10, { size: "sm" }, asset.name || "-", " ", asset.alsoKnownAs || "-"), /* @__PURE__ */ React27.createElement(Text10, { size: "sm", c: "dimmed" }, asset.issuer || "-"))), /* @__PURE__ */ React27.createElement(Flex4, { align: "center", gap: "md" }, /* @__PURE__ */ React27.createElement(Stack12, { ta: "right", gap: 0 }, /* @__PURE__ */ React27.createElement(Text10, { size: "sm" }, asset.currency || "", formatNumber(asset.price)), /* @__PURE__ */ React27.createElement(Text10, { size: "sm", c: "dimmed" }, asset.owned ? "Owned" : "Not Owned")), isMultiSelect && /* @__PURE__ */ React27.createElement(ListItemCheckbox, { ariaLabel: `Select asset ${asset.did}`, checked: isItemChecked?.(asset.did), onCheck: (checked) => onItemCheck?.(asset.did, checked) })));
|
|
2873
2902
|
});
|
|
2874
2903
|
return /* @__PURE__ */ React27.createElement(Box5, { flex: 1 }, /* @__PURE__ */ React27.createElement(Stack12, null, rows));
|
|
2875
2904
|
};
|
|
2876
2905
|
|
|
2877
2906
|
// src/mantine/blocks/list/transactions/TransactionsList.tsx
|
|
2878
2907
|
import React28 from "react";
|
|
2879
|
-
import { Text as
|
|
2908
|
+
import { Text as Text11, Badge, Tooltip as Tooltip3, Box as Box6, Flex as Flex5, Stack as Stack13 } from "@mantine/core";
|
|
2880
2909
|
var formatTime = (timeStr) => {
|
|
2881
2910
|
try {
|
|
2882
2911
|
const date = new Date(timeStr);
|
|
@@ -2891,11 +2920,11 @@ var truncateHash = (hash, length = 8) => {
|
|
|
2891
2920
|
};
|
|
2892
2921
|
var TransactionsList = ({ items, isMultiSelect, isItemChecked, onItemCheck, config: _config }) => {
|
|
2893
2922
|
if (!items || items.length === 0) {
|
|
2894
|
-
return /* @__PURE__ */ React28.createElement(
|
|
2923
|
+
return /* @__PURE__ */ React28.createElement(Text11, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No transactions found");
|
|
2895
2924
|
}
|
|
2896
2925
|
const rows = items.map((transaction) => {
|
|
2897
2926
|
const isChecked = isItemChecked?.(transaction.transactionHash);
|
|
2898
|
-
return /* @__PURE__ */ React28.createElement(ListItemContainer, { onClick: () => onItemCheck?.(transaction.transactionHash, !isChecked), key: transaction.transactionHash, isChecked: !!isChecked }, /* @__PURE__ */ React28.createElement(Flex5, { align: "center", gap: "sm" }, /* @__PURE__ */ React28.createElement(Stack13, { gap: 2 }, /* @__PURE__ */ React28.createElement(Tooltip3, { label: transaction.transactionHash, position: "top" }, /* @__PURE__ */ React28.createElement(
|
|
2927
|
+
return /* @__PURE__ */ React28.createElement(ListItemContainer, { onClick: () => onItemCheck?.(transaction.transactionHash, !isChecked), key: transaction.transactionHash, isChecked: !!isChecked }, /* @__PURE__ */ React28.createElement(Flex5, { align: "center", gap: "sm" }, /* @__PURE__ */ React28.createElement(Stack13, { gap: 2 }, /* @__PURE__ */ React28.createElement(Tooltip3, { label: transaction.transactionHash, position: "top" }, /* @__PURE__ */ React28.createElement(Text11, { size: "sm", style: { fontFamily: "monospace" } }, truncateHash(transaction.transactionHash))), /* @__PURE__ */ React28.createElement(Text11, { size: "sm", c: "dimmed" }, transaction.memo || "-"))), /* @__PURE__ */ React28.createElement(Flex5, { align: "center", gap: "md" }, /* @__PURE__ */ React28.createElement(Stack13, { ta: "right", gap: 2 }, /* @__PURE__ */ React28.createElement(Badge, { size: "sm", variant: "light", color: "blue", style: { fontFamily: "monospace", fontSize: "10px" } }, transaction.typeUrl), /* @__PURE__ */ React28.createElement(Text11, { size: "xs", c: "dimmed" }, formatTime(transaction.time))), isMultiSelect && /* @__PURE__ */ React28.createElement(
|
|
2899
2928
|
ListItemCheckbox,
|
|
2900
2929
|
{
|
|
2901
2930
|
ariaLabel: `Select transaction ${transaction.transactionHash}`,
|
|
@@ -2909,21 +2938,21 @@ var TransactionsList = ({ items, isMultiSelect, isItemChecked, onItemCheck, conf
|
|
|
2909
2938
|
|
|
2910
2939
|
// src/mantine/blocks/list/collections/CollectionsList.tsx
|
|
2911
2940
|
import React29 from "react";
|
|
2912
|
-
import { Text as
|
|
2941
|
+
import { Text as Text12, Box as Box7, Image as Image2, Stack as Stack14, Flex as Flex6 } from "@mantine/core";
|
|
2913
2942
|
var CollectionsList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
2914
2943
|
if (!items || items.length === 0) {
|
|
2915
|
-
return /* @__PURE__ */ React29.createElement(
|
|
2944
|
+
return /* @__PURE__ */ React29.createElement(Text12, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No collections found");
|
|
2916
2945
|
}
|
|
2917
2946
|
const rows = items.map((item) => {
|
|
2918
2947
|
const isChecked = isItemChecked?.(item.did);
|
|
2919
|
-
return /* @__PURE__ */ React29.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.did, !isChecked), key: item.did, isChecked: !!isChecked }, /* @__PURE__ */ React29.createElement(Flex6, { align: "center", gap: "sm" }, /* @__PURE__ */ React29.createElement(Image2, { radius: 16, w: 32, h: 32, src: item.icon }), /* @__PURE__ */ React29.createElement(Stack14, { gap: 0 }, /* @__PURE__ */ React29.createElement(
|
|
2948
|
+
return /* @__PURE__ */ React29.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.did, !isChecked), key: item.did, isChecked: !!isChecked }, /* @__PURE__ */ React29.createElement(Flex6, { align: "center", gap: "sm" }, /* @__PURE__ */ React29.createElement(Image2, { radius: 16, w: 32, h: 32, src: item.icon }), /* @__PURE__ */ React29.createElement(Stack14, { gap: 0 }, /* @__PURE__ */ React29.createElement(Text12, { size: "sm" }, item.name), /* @__PURE__ */ React29.createElement(Text12, { size: "sm", c: "dimmed" }, item.brand))), /* @__PURE__ */ React29.createElement(Flex6, { align: "center", gap: "md" }, /* @__PURE__ */ React29.createElement(Stack14, { ta: "right", gap: 0 }, /* @__PURE__ */ React29.createElement(Text12, { size: "sm" }, item.totalAssets, " Assets"), /* @__PURE__ */ React29.createElement(Text12, { size: "sm", c: "dimmed" }, item.currency, item.price)), isMultiSelect && /* @__PURE__ */ React29.createElement(ListItemCheckbox, { ariaLabel: `Select collection ${item.did}`, checked: isItemChecked?.(item.did), onCheck: (checked) => onItemCheck?.(item.did, checked) })));
|
|
2920
2949
|
});
|
|
2921
2950
|
return /* @__PURE__ */ React29.createElement(Box7, { flex: 1 }, /* @__PURE__ */ React29.createElement(Stack14, null, rows));
|
|
2922
2951
|
};
|
|
2923
2952
|
|
|
2924
2953
|
// src/mantine/blocks/list/balances/BalancesList.tsx
|
|
2925
2954
|
import React30 from "react";
|
|
2926
|
-
import { Text as
|
|
2955
|
+
import { Text as Text13, Box as Box8, Stack as Stack15, Flex as Flex7, Avatar, Group as Group6 } from "@mantine/core";
|
|
2927
2956
|
|
|
2928
2957
|
// src/core/utils/numbers.ts
|
|
2929
2958
|
var numberFormatter = (num, digits) => {
|
|
@@ -2954,102 +2983,102 @@ function renderNumber(value) {
|
|
|
2954
2983
|
// src/mantine/blocks/list/balances/BalancesList.tsx
|
|
2955
2984
|
var BalancesList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
2956
2985
|
if (!items || items.length === 0) {
|
|
2957
|
-
return /* @__PURE__ */ React30.createElement(
|
|
2986
|
+
return /* @__PURE__ */ React30.createElement(Text13, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No balances found");
|
|
2958
2987
|
}
|
|
2959
2988
|
const rows = items.map((item) => {
|
|
2960
2989
|
const isChecked = isItemChecked?.(item.denom);
|
|
2961
|
-
return /* @__PURE__ */ React30.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.denom, !isChecked), key: item.denom, isChecked: !!isChecked }, /* @__PURE__ */ React30.createElement(Group6, { gap: 12 }, /* @__PURE__ */ React30.createElement(Avatar, { src: item.tokenImage, size: 40, radius: "xl" }), /* @__PURE__ */ React30.createElement(Stack15, { gap: 4 }, /* @__PURE__ */ React30.createElement(
|
|
2990
|
+
return /* @__PURE__ */ React30.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.denom, !isChecked), key: item.denom, isChecked: !!isChecked }, /* @__PURE__ */ React30.createElement(Group6, { gap: 12 }, /* @__PURE__ */ React30.createElement(Avatar, { src: item.tokenImage, size: 40, radius: "xl" }), /* @__PURE__ */ React30.createElement(Stack15, { gap: 4 }, /* @__PURE__ */ React30.createElement(Text13, { size: "sm", fw: 500 }, item.tokenName), item.chainCount > 1 && /* @__PURE__ */ React30.createElement(Group6, { gap: 4 }, /* @__PURE__ */ React30.createElement(Text13, { size: "xs", c: "dimmed" }, item.chainCount, " chains"), /* @__PURE__ */ React30.createElement(Group6, { gap: -4 }, /* @__PURE__ */ React30.createElement(Avatar, { size: 16, radius: "xl", bg: "dimmed" }), /* @__PURE__ */ React30.createElement(Avatar, { size: 16, radius: "xl", bg: "dimmed", ml: -4 }), item.chainCount > 2 && /* @__PURE__ */ React30.createElement(Avatar, { size: 16, radius: "xl", bg: "dimmed", ml: -4 }))))), /* @__PURE__ */ React30.createElement(Flex7, { align: "center", gap: "md" }, /* @__PURE__ */ React30.createElement(Stack15, { gap: 4, align: "flex-end" }, /* @__PURE__ */ React30.createElement(Text13, { size: "sm", fw: 500 }, renderNumber(item.amount)), /* @__PURE__ */ React30.createElement(Text13, { size: "xs", c: "dimmed" }, "$", renderNumber(item.usdAmount))), isMultiSelect && /* @__PURE__ */ React30.createElement(ListItemCheckbox, { ariaLabel: `Select balance ${item.denom}`, checked: isItemChecked?.(item.denom), onCheck: (checked) => onItemCheck?.(item.denom, checked) })));
|
|
2962
2991
|
});
|
|
2963
2992
|
return /* @__PURE__ */ React30.createElement(Box8, { flex: 1 }, /* @__PURE__ */ React30.createElement(Stack15, null, rows));
|
|
2964
2993
|
};
|
|
2965
2994
|
|
|
2966
2995
|
// src/mantine/blocks/list/investments/InvestmentsList.tsx
|
|
2967
2996
|
import React31 from "react";
|
|
2968
|
-
import { Text as
|
|
2997
|
+
import { Text as Text14, Box as Box9, Image as Image3, Stack as Stack16, Flex as Flex8, Progress } from "@mantine/core";
|
|
2969
2998
|
var InvestmentsList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
2970
2999
|
if (!items || items.length === 0) {
|
|
2971
|
-
return /* @__PURE__ */ React31.createElement(
|
|
3000
|
+
return /* @__PURE__ */ React31.createElement(Text14, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No investments found");
|
|
2972
3001
|
}
|
|
2973
3002
|
const rows = items.map((item) => {
|
|
2974
3003
|
const isChecked = isItemChecked?.(item.did);
|
|
2975
|
-
return /* @__PURE__ */ React31.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.did, !isChecked), key: item.did, isChecked: !!isChecked }, /* @__PURE__ */ React31.createElement(Flex8, { align: "center", gap: "sm" }, /* @__PURE__ */ React31.createElement(Image3, { radius: 16, w: 32, h: 32, src: item.icon }), /* @__PURE__ */ React31.createElement(Stack16, { gap: 0 }, /* @__PURE__ */ React31.createElement(
|
|
3004
|
+
return /* @__PURE__ */ React31.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.did, !isChecked), key: item.did, isChecked: !!isChecked }, /* @__PURE__ */ React31.createElement(Flex8, { align: "center", gap: "sm" }, /* @__PURE__ */ React31.createElement(Image3, { radius: 16, w: 32, h: 32, src: item.icon }), /* @__PURE__ */ React31.createElement(Stack16, { gap: 0 }, /* @__PURE__ */ React31.createElement(Text14, { size: "sm" }, item.name || "-"), /* @__PURE__ */ React31.createElement(Text14, { size: "sm", c: "dimmed" }, item.brand || "-"))), /* @__PURE__ */ React31.createElement(Flex8, { align: "center", gap: "md" }, /* @__PURE__ */ React31.createElement(Stack16, { ta: "right", gap: 0 }, /* @__PURE__ */ React31.createElement(Flex8, { gap: "5px" }, /* @__PURE__ */ React31.createElement(Text14, { size: "sm" }, item.currency + formatNumber(item.currentAmount)), /* @__PURE__ */ React31.createElement(Text14, { size: "sm", c: "dimmed" }, "/ ", item.currency + formatNumber(item.maxAmount))), /* @__PURE__ */ React31.createElement(Text14, { size: "xs", c: "dimmed" }, /* @__PURE__ */ React31.createElement(Progress, { color: "rgb(0, 255, 157)", radius: "xl", size: "lg", value: item.currentAmount * 100 / item.maxAmount }))), isMultiSelect && /* @__PURE__ */ React31.createElement(ListItemCheckbox, { ariaLabel: `Select investment ${item.did}`, checked: isItemChecked?.(item.did), onCheck: (checked) => onItemCheck?.(item.did, checked) })));
|
|
2976
3005
|
});
|
|
2977
3006
|
return /* @__PURE__ */ React31.createElement(Box9, { flex: 1 }, /* @__PURE__ */ React31.createElement(Stack16, null, rows));
|
|
2978
3007
|
};
|
|
2979
3008
|
|
|
2980
3009
|
// src/mantine/blocks/list/oracles/OraclesList.tsx
|
|
2981
3010
|
import React32 from "react";
|
|
2982
|
-
import { Text as
|
|
3011
|
+
import { Text as Text15, Box as Box10, Image as Image4, Stack as Stack17, Flex as Flex9 } from "@mantine/core";
|
|
2983
3012
|
var OraclesList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
2984
3013
|
if (!items || items.length === 0) {
|
|
2985
|
-
return /* @__PURE__ */ React32.createElement(
|
|
3014
|
+
return /* @__PURE__ */ React32.createElement(Text15, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No oracles found");
|
|
2986
3015
|
}
|
|
2987
3016
|
const rows = items.map((item) => {
|
|
2988
3017
|
const isChecked = isItemChecked?.(item.did);
|
|
2989
|
-
return /* @__PURE__ */ React32.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.did, !isChecked), key: item.did, isChecked: !!isChecked }, /* @__PURE__ */ React32.createElement(Flex9, { align: "center", gap: "sm" }, /* @__PURE__ */ React32.createElement(Image4, { radius: 16, w: 32, h: 32, src: item.icon }), /* @__PURE__ */ React32.createElement(Stack17, { gap: 0 }, /* @__PURE__ */ React32.createElement(
|
|
3018
|
+
return /* @__PURE__ */ React32.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.did, !isChecked), key: item.did, isChecked: !!isChecked }, /* @__PURE__ */ React32.createElement(Flex9, { align: "center", gap: "sm" }, /* @__PURE__ */ React32.createElement(Image4, { radius: 16, w: 32, h: 32, src: item.icon }), /* @__PURE__ */ React32.createElement(Stack17, { gap: 0 }, /* @__PURE__ */ React32.createElement(Text15, { size: "sm" }, item.name || "-"), /* @__PURE__ */ React32.createElement(Text15, { size: "sm", c: "dimmed" }, item.brand || "-"))), /* @__PURE__ */ React32.createElement(Flex9, { align: "center", gap: "md" }, /* @__PURE__ */ React32.createElement(Stack17, { ta: "right", gap: 0 }, /* @__PURE__ */ React32.createElement(Text15, { size: "sm" }, item.currency || "-"), /* @__PURE__ */ React32.createElement(Text15, { size: "xs", c: "dimmed" }, item.minPoints, " - ", item.maxPoints, " pts"), /* @__PURE__ */ React32.createElement(Text15, { size: "xs", c: "dimmed" }, item.flowsAmount, " Flows")), isMultiSelect && /* @__PURE__ */ React32.createElement(ListItemCheckbox, { ariaLabel: `Select oracle ${item.did}`, checked: isItemChecked?.(item.did), onCheck: (checked) => onItemCheck?.(item.did, checked) })));
|
|
2990
3019
|
});
|
|
2991
3020
|
return /* @__PURE__ */ React32.createElement(Box10, { flex: 1 }, /* @__PURE__ */ React32.createElement(Stack17, null, rows));
|
|
2992
3021
|
};
|
|
2993
3022
|
|
|
2994
3023
|
// src/mantine/blocks/list/pods/PODsList.tsx
|
|
2995
3024
|
import React33 from "react";
|
|
2996
|
-
import { Text as
|
|
3025
|
+
import { Text as Text16, Box as Box11, Image as Image5, Stack as Stack18, Flex as Flex10 } from "@mantine/core";
|
|
2997
3026
|
var PodsList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
2998
3027
|
if (!items || items.length === 0) {
|
|
2999
|
-
return /* @__PURE__ */ React33.createElement(
|
|
3028
|
+
return /* @__PURE__ */ React33.createElement(Text16, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No PODs found");
|
|
3000
3029
|
}
|
|
3001
3030
|
const rows = items.map((item) => {
|
|
3002
3031
|
const isChecked = isItemChecked?.(item.did);
|
|
3003
|
-
return /* @__PURE__ */ React33.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.did, !isChecked), key: item.did, isChecked: !!isChecked }, /* @__PURE__ */ React33.createElement(Flex10, { align: "center", gap: "sm" }, /* @__PURE__ */ React33.createElement(Image5, { radius: 16, w: 32, h: 32, src: item.icon }), /* @__PURE__ */ React33.createElement(Stack18, { gap: 0 }, /* @__PURE__ */ React33.createElement(
|
|
3032
|
+
return /* @__PURE__ */ React33.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.did, !isChecked), key: item.did, isChecked: !!isChecked }, /* @__PURE__ */ React33.createElement(Flex10, { align: "center", gap: "sm" }, /* @__PURE__ */ React33.createElement(Image5, { radius: 16, w: 32, h: 32, src: item.icon }), /* @__PURE__ */ React33.createElement(Stack18, { gap: 0 }, /* @__PURE__ */ React33.createElement(Text16, { size: "sm" }, item.name || "-"), /* @__PURE__ */ React33.createElement(Text16, { size: "sm", c: "dimmed" }, item.startDate, " \u2192 ", item.endDate))), /* @__PURE__ */ React33.createElement(Flex10, { align: "center", gap: "md" }, /* @__PURE__ */ React33.createElement(Stack18, { ta: "right", gap: 0 }, /* @__PURE__ */ React33.createElement(Text16, { size: "sm" }, item.members, " Members"), /* @__PURE__ */ React33.createElement(Text16, { size: "sm", c: "dimmed" }, item.totalProposals, " Proposals")), isMultiSelect && /* @__PURE__ */ React33.createElement(ListItemCheckbox, { ariaLabel: `Select POD ${item.did}`, checked: isItemChecked?.(item.did), onCheck: (checked) => onItemCheck?.(item.did, checked) })));
|
|
3004
3033
|
});
|
|
3005
3034
|
return /* @__PURE__ */ React33.createElement(Box11, { flex: 1 }, /* @__PURE__ */ React33.createElement(Stack18, null, rows));
|
|
3006
3035
|
};
|
|
3007
3036
|
|
|
3008
3037
|
// src/mantine/blocks/list/proposals/ProposalsList.tsx
|
|
3009
3038
|
import React34 from "react";
|
|
3010
|
-
import { Text as
|
|
3039
|
+
import { Text as Text17, Box as Box12, Image as Image6, Stack as Stack19, Flex as Flex11, Badge as Badge2 } from "@mantine/core";
|
|
3011
3040
|
var ProposalsList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
3012
3041
|
if (!items || items.length === 0) {
|
|
3013
|
-
return /* @__PURE__ */ React34.createElement(
|
|
3042
|
+
return /* @__PURE__ */ React34.createElement(Text17, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No proposals found");
|
|
3014
3043
|
}
|
|
3015
3044
|
const rows = items.map((item) => {
|
|
3016
3045
|
const isChecked = isItemChecked?.(item.did);
|
|
3017
|
-
return /* @__PURE__ */ React34.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.did, !isChecked), key: item.did, isChecked: !!isChecked }, /* @__PURE__ */ React34.createElement(Flex11, { align: "center", gap: "sm" }, /* @__PURE__ */ React34.createElement(Image6, { radius: 16, w: 32, h: 32, src: item.icon }), /* @__PURE__ */ React34.createElement(Stack19, { gap: 0 }, /* @__PURE__ */ React34.createElement(
|
|
3046
|
+
return /* @__PURE__ */ React34.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.did, !isChecked), key: item.did, isChecked: !!isChecked }, /* @__PURE__ */ React34.createElement(Flex11, { align: "center", gap: "sm" }, /* @__PURE__ */ React34.createElement(Image6, { radius: 16, w: 32, h: 32, src: item.icon }), /* @__PURE__ */ React34.createElement(Stack19, { gap: 0 }, /* @__PURE__ */ React34.createElement(Text17, { size: "sm" }, item.name || "-"), /* @__PURE__ */ React34.createElement(Text17, { size: "xs", c: "dimmed" }, item.description || "-"))), /* @__PURE__ */ React34.createElement(Flex11, { align: "center", gap: "md" }, /* @__PURE__ */ React34.createElement(Stack19, { ta: "right", align: "end", gap: 0 }, /* @__PURE__ */ React34.createElement(Badge2, { size: "sm", variant: "light", color: "blue", style: { fontFamily: "monospace", fontSize: "10px" } }, item.status), /* @__PURE__ */ React34.createElement(Text17, { size: "sm", c: "dimmed" }, item.isVotedOn ? "Voted" : "Not voted")), isMultiSelect && /* @__PURE__ */ React34.createElement(ListItemCheckbox, { ariaLabel: `Select proposal ${item.did}`, checked: isItemChecked?.(item.did), onCheck: (checked) => onItemCheck?.(item.did, checked) })));
|
|
3018
3047
|
});
|
|
3019
3048
|
return /* @__PURE__ */ React34.createElement(Box12, { flex: 1 }, /* @__PURE__ */ React34.createElement(Stack19, null, rows));
|
|
3020
3049
|
};
|
|
3021
3050
|
|
|
3022
3051
|
// src/mantine/blocks/list/requests/RequestsList.tsx
|
|
3023
3052
|
import React35 from "react";
|
|
3024
|
-
import { Text as
|
|
3053
|
+
import { Text as Text18, Box as Box13, Image as Image7, Stack as Stack20, Flex as Flex12 } from "@mantine/core";
|
|
3025
3054
|
var RequestsList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
3026
3055
|
if (!items || items.length === 0) {
|
|
3027
|
-
return /* @__PURE__ */ React35.createElement(
|
|
3056
|
+
return /* @__PURE__ */ React35.createElement(Text18, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No requests found");
|
|
3028
3057
|
}
|
|
3029
3058
|
const rows = items.map((item) => {
|
|
3030
3059
|
const isChecked = isItemChecked?.(item.did);
|
|
3031
|
-
return /* @__PURE__ */ React35.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.did, !isChecked), key: item.did, isChecked: !!isChecked }, /* @__PURE__ */ React35.createElement(Flex12, { align: "center", gap: "sm" }, /* @__PURE__ */ React35.createElement(Image7, { radius: 16, w: 32, h: 32, src: item.icon }), /* @__PURE__ */ React35.createElement(Stack20, { gap: 0 }, /* @__PURE__ */ React35.createElement(
|
|
3060
|
+
return /* @__PURE__ */ React35.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.did, !isChecked), key: item.did, isChecked: !!isChecked }, /* @__PURE__ */ React35.createElement(Flex12, { align: "center", gap: "sm" }, /* @__PURE__ */ React35.createElement(Image7, { radius: 16, w: 32, h: 32, src: item.icon }), /* @__PURE__ */ React35.createElement(Stack20, { gap: 0 }, /* @__PURE__ */ React35.createElement(Text18, { size: "sm" }, item.name || "-"), /* @__PURE__ */ React35.createElement(Text18, { size: "sm", c: "dimmed" }, item.brand || "-"))), /* @__PURE__ */ React35.createElement(Flex12, { align: "center", gap: "md" }, /* @__PURE__ */ React35.createElement(Stack20, { ta: "right", gap: 0 }, /* @__PURE__ */ React35.createElement(Text18, { size: "sm", c: "dimmed" }, item.currency || "", item.budget ?? "-"), /* @__PURE__ */ React35.createElement(Text18, { size: "xs", c: "dimmed" }, item.totalApplications ?? 0, " Applications")), isMultiSelect && /* @__PURE__ */ React35.createElement(ListItemCheckbox, { ariaLabel: `Select request ${item.did}`, checked: isItemChecked?.(item.did), onCheck: (checked) => onItemCheck?.(item.did, checked) })));
|
|
3032
3061
|
});
|
|
3033
3062
|
return /* @__PURE__ */ React35.createElement(Box13, { flex: 1 }, /* @__PURE__ */ React35.createElement(Stack20, null, rows));
|
|
3034
3063
|
};
|
|
3035
3064
|
|
|
3036
3065
|
// src/mantine/blocks/list/members/MembersList.tsx
|
|
3037
3066
|
import React36 from "react";
|
|
3038
|
-
import { Text as
|
|
3067
|
+
import { Text as Text19, Box as Box14, Image as Image8, Stack as Stack21, Flex as Flex13 } from "@mantine/core";
|
|
3039
3068
|
var MembersList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
3040
3069
|
if (!items || items.length === 0) {
|
|
3041
|
-
return /* @__PURE__ */ React36.createElement(
|
|
3070
|
+
return /* @__PURE__ */ React36.createElement(Text19, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No members found");
|
|
3042
3071
|
}
|
|
3043
3072
|
const rows = items.map((item) => {
|
|
3044
3073
|
const isChecked = isItemChecked?.(item.did);
|
|
3045
|
-
return /* @__PURE__ */ React36.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.did, !isChecked), key: item.did, isChecked: !!isChecked }, /* @__PURE__ */ React36.createElement(Flex13, { align: "center", gap: "sm" }, /* @__PURE__ */ React36.createElement(Image8, { radius: 16, w: 32, h: 32, src: item.icon }), /* @__PURE__ */ React36.createElement(Stack21, { gap: 0 }, /* @__PURE__ */ React36.createElement(
|
|
3074
|
+
return /* @__PURE__ */ React36.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.did, !isChecked), key: item.did, isChecked: !!isChecked }, /* @__PURE__ */ React36.createElement(Flex13, { align: "center", gap: "sm" }, /* @__PURE__ */ React36.createElement(Image8, { radius: 16, w: 32, h: 32, src: item.icon }), /* @__PURE__ */ React36.createElement(Stack21, { gap: 0 }, /* @__PURE__ */ React36.createElement(Text19, { size: "sm" }, item.username || "-"), /* @__PURE__ */ React36.createElement(Text19, { size: "xs", c: "dimmed" }, item.address || "-"))), /* @__PURE__ */ React36.createElement(Flex13, { align: "center", gap: "md" }, /* @__PURE__ */ React36.createElement(Stack21, { ta: "right", gap: 0 }, /* @__PURE__ */ React36.createElement(Text19, { size: "sm" }, item.percentage), /* @__PURE__ */ React36.createElement(Text19, { size: "sm", c: "dimmed" }, item.role)), isMultiSelect && /* @__PURE__ */ React36.createElement(ListItemCheckbox, { ariaLabel: `Select member ${item.did}`, checked: isItemChecked?.(item.did), onCheck: (checked) => onItemCheck?.(item.did, checked) })));
|
|
3046
3075
|
});
|
|
3047
3076
|
return /* @__PURE__ */ React36.createElement(Box14, { flex: 1 }, /* @__PURE__ */ React36.createElement(Stack21, null, rows));
|
|
3048
3077
|
};
|
|
3049
3078
|
|
|
3050
3079
|
// src/mantine/blocks/list/validators/ValidatorsList.tsx
|
|
3051
3080
|
import React37 from "react";
|
|
3052
|
-
import { Text as
|
|
3081
|
+
import { Text as Text20, Box as Box15, Image as Image9, Stack as Stack22, Flex as Flex14 } from "@mantine/core";
|
|
3053
3082
|
|
|
3054
3083
|
// src/core/lib/validators.ts
|
|
3055
3084
|
var getDelegatedTokensFromValidator = (validator) => Number(validator?.amount ?? 0);
|
|
@@ -3058,18 +3087,18 @@ var getDisplayDelegatedTokensFromValidator = (validator) => microAmountToAmount(
|
|
|
3058
3087
|
// src/mantine/blocks/list/validators/ValidatorsList.tsx
|
|
3059
3088
|
var ValidatorsList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
3060
3089
|
if (!items || items.length === 0) {
|
|
3061
|
-
return /* @__PURE__ */ React37.createElement(
|
|
3090
|
+
return /* @__PURE__ */ React37.createElement(Text20, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No validators found");
|
|
3062
3091
|
}
|
|
3063
3092
|
const rows = items.map((item) => {
|
|
3064
3093
|
const isChecked = isItemChecked?.(item.did);
|
|
3065
|
-
return /* @__PURE__ */ React37.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.did, !isChecked), key: item.did, isChecked: !!isChecked }, /* @__PURE__ */ React37.createElement(Flex14, { align: "center", gap: "sm" }, /* @__PURE__ */ React37.createElement(Image9, { radius: 16, w: 32, h: 32, src: item.icon }), /* @__PURE__ */ React37.createElement(Stack22, { gap: 0 }, /* @__PURE__ */ React37.createElement(
|
|
3094
|
+
return /* @__PURE__ */ React37.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.did, !isChecked), key: item.did, isChecked: !!isChecked }, /* @__PURE__ */ React37.createElement(Flex14, { align: "center", gap: "sm" }, /* @__PURE__ */ React37.createElement(Image9, { radius: 16, w: 32, h: 32, src: item.icon }), /* @__PURE__ */ React37.createElement(Stack22, { gap: 0 }, /* @__PURE__ */ React37.createElement(Text20, { size: "sm" }, item.name || "-"), /* @__PURE__ */ React37.createElement(Text20, { size: "xs", c: "dimmed" }, item.description || "-"))), /* @__PURE__ */ React37.createElement(Flex14, { align: "center", gap: "md" }, /* @__PURE__ */ React37.createElement(Stack22, { ta: "right", gap: 0 }, /* @__PURE__ */ React37.createElement(Text20, { size: "sm" }, numberFormatter(getDisplayDelegatedTokensFromValidator(item), 2), " ", item.currency), /* @__PURE__ */ React37.createElement(Text20, { size: "sm", c: "dimmed" }, item.commission, "% fee"), /* @__PURE__ */ React37.createElement(Text20, { size: "xs", c: "dimmed" }, item.isActive ? "Active" : "Inactive", " \u2022 ", item.isStaked ? "Staked" : "Not staked", " \u2022 ", item.isBonding ? "Bonding" : "Not bonding")), isMultiSelect && /* @__PURE__ */ React37.createElement(ListItemCheckbox, { ariaLabel: `Select validator ${item.did}`, checked: isItemChecked?.(item.did), onCheck: (checked) => onItemCheck?.(item.did, checked) })));
|
|
3066
3095
|
});
|
|
3067
3096
|
return /* @__PURE__ */ React37.createElement(Box15, { flex: 1 }, /* @__PURE__ */ React37.createElement(Stack22, null, rows));
|
|
3068
3097
|
};
|
|
3069
3098
|
|
|
3070
3099
|
// src/mantine/blocks/list/ListActionsMenu.tsx
|
|
3071
3100
|
import React38, { useState as useState7 } from "react";
|
|
3072
|
-
import { Menu, Text as
|
|
3101
|
+
import { Menu, Text as Text21, ActionIcon as ActionIcon2, Flex as Flex15, Box as Box16, Collapse, Tooltip as Tooltip4 } from "@mantine/core";
|
|
3073
3102
|
import {
|
|
3074
3103
|
IconArrowDown,
|
|
3075
3104
|
IconArrowUp,
|
|
@@ -3097,7 +3126,7 @@ var SortRow = ({ opt, value, onChange }) => {
|
|
|
3097
3126
|
}
|
|
3098
3127
|
},
|
|
3099
3128
|
/* @__PURE__ */ React38.createElement(Flex15, { align: "center", justify: "space-between", gap: "xs" }, /* @__PURE__ */ React38.createElement(
|
|
3100
|
-
|
|
3129
|
+
ActionIcon2,
|
|
3101
3130
|
{
|
|
3102
3131
|
variant: "subtle",
|
|
3103
3132
|
size: "xs",
|
|
@@ -3115,7 +3144,7 @@ var SortRow = ({ opt, value, onChange }) => {
|
|
|
3115
3144
|
},
|
|
3116
3145
|
/* @__PURE__ */ React38.createElement(IconArrowUp, { size: 14 })
|
|
3117
3146
|
), /* @__PURE__ */ React38.createElement(
|
|
3118
|
-
|
|
3147
|
+
Text21,
|
|
3119
3148
|
{
|
|
3120
3149
|
fz: "sm",
|
|
3121
3150
|
style: {
|
|
@@ -3125,7 +3154,7 @@ var SortRow = ({ opt, value, onChange }) => {
|
|
|
3125
3154
|
},
|
|
3126
3155
|
opt.label
|
|
3127
3156
|
), /* @__PURE__ */ React38.createElement(
|
|
3128
|
-
|
|
3157
|
+
ActionIcon2,
|
|
3129
3158
|
{
|
|
3130
3159
|
variant: "subtle",
|
|
3131
3160
|
size: "xs",
|
|
@@ -3175,8 +3204,8 @@ var ListActionsMenu = ({ options, isMultiSelect, setIsMultiSelect, value, onChan
|
|
|
3175
3204
|
}
|
|
3176
3205
|
}
|
|
3177
3206
|
},
|
|
3178
|
-
/* @__PURE__ */ React38.createElement(Menu.Target, null, /* @__PURE__ */ React38.createElement(Tooltip4, { label: "Actions", withArrow: true }, /* @__PURE__ */ React38.createElement(
|
|
3179
|
-
/* @__PURE__ */ React38.createElement(Menu.Dropdown, null, /* @__PURE__ */ React38.createElement(Menu.Label, { onClick: () => setOrderByCollapsed(!orderByCollapsed), style: { cursor: "pointer" } }, /* @__PURE__ */ React38.createElement(Flex15, { align: "center", gap: 10 }, orderByCollapsed ? /* @__PURE__ */ React38.createElement(IconChevronRight, { size: 14 }) : /* @__PURE__ */ React38.createElement(IconChevronDown, { size: 14 }), /* @__PURE__ */ React38.createElement(
|
|
3207
|
+
/* @__PURE__ */ React38.createElement(Menu.Target, null, /* @__PURE__ */ React38.createElement(Tooltip4, { label: "Actions", withArrow: true }, /* @__PURE__ */ React38.createElement(ActionIcon2, { variant: "subtle", size: "sm", "aria-label": "List actions", title: "List actions" }, /* @__PURE__ */ React38.createElement(IconAdjustmentsHorizontal, { size: 18 })))),
|
|
3208
|
+
/* @__PURE__ */ React38.createElement(Menu.Dropdown, null, /* @__PURE__ */ React38.createElement(Menu.Label, { onClick: () => setOrderByCollapsed(!orderByCollapsed), style: { cursor: "pointer" } }, /* @__PURE__ */ React38.createElement(Flex15, { align: "center", gap: 10 }, orderByCollapsed ? /* @__PURE__ */ React38.createElement(IconChevronRight, { size: 14 }) : /* @__PURE__ */ React38.createElement(IconChevronDown, { size: 14 }), /* @__PURE__ */ React38.createElement(Text21, { fz: "14" }, "Order By"))), /* @__PURE__ */ React38.createElement(Collapse, { in: !orderByCollapsed }, options.map((opt) => /* @__PURE__ */ React38.createElement(SortRow, { key: opt.key, opt, value, onChange }))), onSearchToggle && /* @__PURE__ */ React38.createElement(React38.Fragment, null, /* @__PURE__ */ React38.createElement(Menu.Divider, null), /* @__PURE__ */ React38.createElement(Menu.Item, { onClick: onSearchToggle, leftSection: /* @__PURE__ */ React38.createElement(IconSearch, { size: 16 }), "data-active": isSearchActive }, "Search")), /* @__PURE__ */ React38.createElement(Menu.Divider, null), /* @__PURE__ */ React38.createElement(Menu.Item, { leftSection: /* @__PURE__ */ React38.createElement(IconAdjustments, { size: 16 }) }, "Smart Filter"), /* @__PURE__ */ React38.createElement(Menu.Divider, null), /* @__PURE__ */ React38.createElement(Menu.Item, { onClick: () => setIsMultiSelect(!isMultiSelect), leftSection: /* @__PURE__ */ React38.createElement(IconCheckbox2, { size: 16 }) }, "Multi Select"), onDownloadCsv && /* @__PURE__ */ React38.createElement(React38.Fragment, null, /* @__PURE__ */ React38.createElement(Menu.Divider, null), /* @__PURE__ */ React38.createElement(Menu.Item, { onClick: onDownloadCsv, leftSection: /* @__PURE__ */ React38.createElement(IconDownload, { size: 16 }) }, "Download CSV")))
|
|
3180
3209
|
);
|
|
3181
3210
|
};
|
|
3182
3211
|
|
|
@@ -3201,7 +3230,7 @@ function sortListItems(data, sortOption) {
|
|
|
3201
3230
|
|
|
3202
3231
|
// src/mantine/blocks/list/FilterTab.tsx
|
|
3203
3232
|
import React39 from "react";
|
|
3204
|
-
import { UnstyledButton, Text as
|
|
3233
|
+
import { UnstyledButton, Text as Text22 } from "@mantine/core";
|
|
3205
3234
|
function FilterTab({ onClick, label, isActive }) {
|
|
3206
3235
|
return /* @__PURE__ */ React39.createElement(
|
|
3207
3236
|
UnstyledButton,
|
|
@@ -3234,7 +3263,7 @@ function FilterTab({ onClick, label, isActive }) {
|
|
|
3234
3263
|
if (!isActive) e.currentTarget.style.background = "transparent";
|
|
3235
3264
|
}
|
|
3236
3265
|
},
|
|
3237
|
-
/* @__PURE__ */ React39.createElement(
|
|
3266
|
+
/* @__PURE__ */ React39.createElement(Text22, { size: "sm", fw: 500 }, label)
|
|
3238
3267
|
);
|
|
3239
3268
|
}
|
|
3240
3269
|
|
|
@@ -3251,7 +3280,7 @@ function filterListItems(items, filterOption) {
|
|
|
3251
3280
|
}
|
|
3252
3281
|
|
|
3253
3282
|
// src/mantine/blocks/list/flow/ListFlowView.tsx
|
|
3254
|
-
import { IconArrowDown as IconArrowDown2, IconArrowUp as IconArrowUp2, IconChevronDown as IconChevronDown2, IconChevronUp, IconRefresh, IconSettings
|
|
3283
|
+
import { IconArrowDown as IconArrowDown2, IconArrowUp as IconArrowUp2, IconChevronDown as IconChevronDown2, IconChevronUp, IconRefresh, IconSettings } from "@tabler/icons-react";
|
|
3255
3284
|
|
|
3256
3285
|
// src/mantine/blocks/list/ListPagination.tsx
|
|
3257
3286
|
import React40 from "react";
|
|
@@ -3285,14 +3314,14 @@ var DEFAULT_PAGE_SIZE = 5;
|
|
|
3285
3314
|
|
|
3286
3315
|
// src/mantine/blocks/list/dao_members/MembersList.tsx
|
|
3287
3316
|
import React41 from "react";
|
|
3288
|
-
import { Text as
|
|
3317
|
+
import { Text as Text23, Box as Box17, Image as Image10, Stack as Stack23, Flex as Flex16 } from "@mantine/core";
|
|
3289
3318
|
var DaoMembersList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
3290
3319
|
if (!items || items.length === 0) {
|
|
3291
|
-
return /* @__PURE__ */ React41.createElement(
|
|
3320
|
+
return /* @__PURE__ */ React41.createElement(Text23, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No members found");
|
|
3292
3321
|
}
|
|
3293
3322
|
const rows = items.map((item) => {
|
|
3294
3323
|
const isChecked = isItemChecked?.(item.did);
|
|
3295
|
-
return /* @__PURE__ */ React41.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.did, !isChecked), key: item.did, isChecked: !!isChecked }, /* @__PURE__ */ React41.createElement(Flex16, { align: "center", gap: "sm" }, /* @__PURE__ */ React41.createElement(Image10, { radius: 16, w: 32, h: 32, src: item.icon }), /* @__PURE__ */ React41.createElement(Stack23, { gap: 0 }, /* @__PURE__ */ React41.createElement(
|
|
3324
|
+
return /* @__PURE__ */ React41.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.did, !isChecked), key: item.did, isChecked: !!isChecked }, /* @__PURE__ */ React41.createElement(Flex16, { align: "center", gap: "sm" }, /* @__PURE__ */ React41.createElement(Image10, { radius: 16, w: 32, h: 32, src: item.icon }), /* @__PURE__ */ React41.createElement(Stack23, { gap: 0 }, /* @__PURE__ */ React41.createElement(Text23, { size: "sm", fw: 500 }, item.username || "Unknown User"), /* @__PURE__ */ React41.createElement(Text23, { size: "xs", c: "dimmed", lineClamp: 1 }, item.address || "No address"))), /* @__PURE__ */ React41.createElement(Flex16, { align: "center", gap: "md" }, /* @__PURE__ */ React41.createElement(Stack23, { ta: "right", gap: 0 }, /* @__PURE__ */ React41.createElement(Text23, { size: "sm", fw: 500, c: "blue" }, item.percentage || "0%"), /* @__PURE__ */ React41.createElement(Text23, { size: "xs", c: "dimmed", tt: "capitalize" }, item.role || "member")), isMultiSelect && /* @__PURE__ */ React41.createElement(
|
|
3296
3325
|
ListItemCheckbox,
|
|
3297
3326
|
{
|
|
3298
3327
|
ariaLabel: `Select member ${item.username || item.did}`,
|
|
@@ -3306,11 +3335,11 @@ var DaoMembersList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
|
3306
3335
|
|
|
3307
3336
|
// src/mantine/blocks/list/deed_subscriptions/DeedSubscriptionsList.tsx
|
|
3308
3337
|
import React42 from "react";
|
|
3309
|
-
import { Text as
|
|
3338
|
+
import { Text as Text24, Box as Box18, Image as Image11, Stack as Stack24, Flex as Flex17, Badge as Badge3 } from "@mantine/core";
|
|
3310
3339
|
import Jazzicon from "react-jazzicon";
|
|
3311
3340
|
var DeedSubscriptionsList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
3312
3341
|
if (!items || items.length === 0) {
|
|
3313
|
-
return /* @__PURE__ */ React42.createElement(
|
|
3342
|
+
return /* @__PURE__ */ React42.createElement(Text24, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "There are no subscriptions yet");
|
|
3314
3343
|
}
|
|
3315
3344
|
const getStatusColor2 = (status) => {
|
|
3316
3345
|
switch (status) {
|
|
@@ -3327,24 +3356,24 @@ var DeedSubscriptionsList = ({ items, isMultiSelect, isItemChecked, onItemCheck
|
|
|
3327
3356
|
const rows = items.map((item) => {
|
|
3328
3357
|
const itemId = item.did;
|
|
3329
3358
|
return /* @__PURE__ */ React42.createElement(ListItemContainer, { onClick: () => {
|
|
3330
|
-
}, key: itemId, isChecked: false, withIcon: false }, /* @__PURE__ */ React42.createElement(Flex17, { align: "center", gap: "sm" }, item.subscriberImage ? /* @__PURE__ */ React42.createElement(Image11, { radius: 16, w: 32, h: 32, src: item.subscriberImage }) : /* @__PURE__ */ React42.createElement(Jazzicon, { diameter: 32, seed: Array.from(itemId ?? "").reduce((acc, char) => acc + char.charCodeAt(0), 0) }), /* @__PURE__ */ React42.createElement(Stack24, { gap: 0 }, /* @__PURE__ */ React42.createElement(
|
|
3359
|
+
}, key: itemId, isChecked: false, withIcon: false }, /* @__PURE__ */ React42.createElement(Flex17, { align: "center", gap: "sm" }, item.subscriberImage ? /* @__PURE__ */ React42.createElement(Image11, { radius: 16, w: 32, h: 32, src: item.subscriberImage }) : /* @__PURE__ */ React42.createElement(Jazzicon, { diameter: 32, seed: Array.from(itemId ?? "").reduce((acc, char) => acc + char.charCodeAt(0), 0) }), /* @__PURE__ */ React42.createElement(Stack24, { gap: 0 }, /* @__PURE__ */ React42.createElement(Text24, { size: "sm", fw: 500 }, item.subscriberName || "Unknown Subscriber"), /* @__PURE__ */ React42.createElement(Text24, { size: "xs", c: "dimmed", lineClamp: 1 }, "Subscription"))), /* @__PURE__ */ React42.createElement(Flex17, { align: "center", gap: "md" }, /* @__PURE__ */ React42.createElement(Stack24, { align: "end", ta: "right", gap: 0 }, /* @__PURE__ */ React42.createElement(Badge3, { size: "sm", color: getStatusColor2(item.status), variant: "light" }, item.status), /* @__PURE__ */ React42.createElement(Text24, { size: "xs", c: "dimmed" }, new Date(item.subscriptionDate).toLocaleDateString()))));
|
|
3331
3360
|
});
|
|
3332
3361
|
return /* @__PURE__ */ React42.createElement(Box18, { flex: 1 }, /* @__PURE__ */ React42.createElement(Stack24, { gap: "xs" }, rows));
|
|
3333
3362
|
};
|
|
3334
3363
|
|
|
3335
3364
|
// src/mantine/blocks/list/ListSelectionPanel.tsx
|
|
3336
3365
|
import React44, { useState as useState8, useEffect as useEffect6, useMemo as useMemo7 } from "react";
|
|
3337
|
-
import { Paper as
|
|
3366
|
+
import { Paper as Paper3, CloseButton as CloseButton2, Stack as Stack26, Alert as Alert3, Text as Text26, Loader, Center as Center2, Space } from "@mantine/core";
|
|
3338
3367
|
|
|
3339
3368
|
// src/mantine/blocks/list/components/SelectionPanelContent.tsx
|
|
3340
3369
|
import React43 from "react";
|
|
3341
|
-
import { Stack as Stack25, Text as
|
|
3370
|
+
import { Stack as Stack25, Text as Text25, Title, Divider as Divider2, Paper as Paper2, Group as Group7 } from "@mantine/core";
|
|
3342
3371
|
import { useHover as useHover2 } from "@mantine/hooks";
|
|
3343
3372
|
import { IconCornerDownRight, IconTarget } from "@tabler/icons-react";
|
|
3344
3373
|
var SelectionItemButton = ({ isLast, onClick, children }) => {
|
|
3345
3374
|
const { hovered, ref } = useHover2();
|
|
3346
3375
|
return /* @__PURE__ */ React43.createElement(
|
|
3347
|
-
|
|
3376
|
+
Paper2,
|
|
3348
3377
|
{
|
|
3349
3378
|
ref,
|
|
3350
3379
|
py: "sm",
|
|
@@ -3362,7 +3391,7 @@ var SelectionItemButton = ({ isLast, onClick, children }) => {
|
|
|
3362
3391
|
);
|
|
3363
3392
|
};
|
|
3364
3393
|
var SelectionPromptItem = ({ prompt, onClick, isLast }) => {
|
|
3365
|
-
return /* @__PURE__ */ React43.createElement(SelectionItemButton, { isLast, onClick }, /* @__PURE__ */ React43.createElement(Group7, { px: "xs", gap: "sm" }, /* @__PURE__ */ React43.createElement(IconCornerDownRight, { size: 24, color: "var(--mantine-color-gray-3)" }), /* @__PURE__ */ React43.createElement(
|
|
3394
|
+
return /* @__PURE__ */ React43.createElement(SelectionItemButton, { isLast, onClick }, /* @__PURE__ */ React43.createElement(Group7, { px: "xs", gap: "sm" }, /* @__PURE__ */ React43.createElement(IconCornerDownRight, { size: 24, color: "var(--mantine-color-gray-3)" }), /* @__PURE__ */ React43.createElement(Text25, { fz: 14, fw: 500, c: "white" }, shortStr(prompt.text, 50, 0))));
|
|
3366
3395
|
};
|
|
3367
3396
|
var SelectionPrompts = ({ prompts }) => {
|
|
3368
3397
|
const handlers = useBlocknoteHandlers();
|
|
@@ -3373,18 +3402,18 @@ var SelectionActionButton = ({ action, itemId, itemData, isLast }) => {
|
|
|
3373
3402
|
const handleClick = () => {
|
|
3374
3403
|
action.onClick(itemId, itemData);
|
|
3375
3404
|
};
|
|
3376
|
-
return /* @__PURE__ */ React43.createElement(SelectionItemButton, { isLast, onClick: handleClick }, /* @__PURE__ */ React43.createElement(Group7, { px: "xs", gap: "sm" }, /* @__PURE__ */ React43.createElement(IconTarget, { size: 20, color: "var(--mantine-color-gray-3)" }), /* @__PURE__ */ React43.createElement(
|
|
3405
|
+
return /* @__PURE__ */ React43.createElement(SelectionItemButton, { isLast, onClick: handleClick }, /* @__PURE__ */ React43.createElement(Group7, { px: "xs", gap: "sm" }, /* @__PURE__ */ React43.createElement(IconTarget, { size: 20, color: "var(--mantine-color-gray-3)" }), /* @__PURE__ */ React43.createElement(Text25, { fz: 14, fw: 500, c: "white" }, action.label)));
|
|
3377
3406
|
};
|
|
3378
3407
|
var SelectionActionSectionComponent = ({ section, itemId, itemData }) => {
|
|
3379
3408
|
if (!section.actions || section.actions.length === 0) return null;
|
|
3380
|
-
return /* @__PURE__ */ React43.createElement(Stack25, { mb: 18, gap: "xs" }, /* @__PURE__ */ React43.createElement(
|
|
3409
|
+
return /* @__PURE__ */ React43.createElement(Stack25, { mb: 18, gap: "xs" }, /* @__PURE__ */ React43.createElement(Text25, { fz: 20, fw: 500 }, section.title), section.description && /* @__PURE__ */ React43.createElement(Text25, { size: "sm", c: "dimmed" }, section.description), /* @__PURE__ */ React43.createElement(Stack25, { gap: 0 }, section.actions.map((action, index) => /* @__PURE__ */ React43.createElement(SelectionActionButton, { key: action.id, action, itemId, itemData, isLast: index === section.actions.length - 1 }))));
|
|
3381
3410
|
};
|
|
3382
3411
|
var SelectionActionSections = ({ sections, itemId, itemData }) => {
|
|
3383
3412
|
if (!sections || sections.length === 0) return null;
|
|
3384
3413
|
return /* @__PURE__ */ React43.createElement(Stack25, { gap: "md" }, sections.map((section, index) => /* @__PURE__ */ React43.createElement(React43.Fragment, { key: index }, /* @__PURE__ */ React43.createElement(SelectionActionSectionComponent, { section, itemId, itemData }), index < sections.length - 1 && /* @__PURE__ */ React43.createElement(Divider2, null))));
|
|
3385
3414
|
};
|
|
3386
3415
|
var SelectionPanelEmpty = ({ message = "No item selected" }) => {
|
|
3387
|
-
return /* @__PURE__ */ React43.createElement(Stack25, { gap: "md", align: "center", py: "xl" }, /* @__PURE__ */ React43.createElement(
|
|
3416
|
+
return /* @__PURE__ */ React43.createElement(Stack25, { gap: "md", align: "center", py: "xl" }, /* @__PURE__ */ React43.createElement(Text25, { size: "sm", c: "dimmed", ta: "center" }, message));
|
|
3388
3417
|
};
|
|
3389
3418
|
|
|
3390
3419
|
// src/mantine/blocks/list/ListSelectionPanel.tsx
|
|
@@ -3435,7 +3464,7 @@ var ListSelectionPanel = ({ selectedIds, listData, listType, onClose }) => {
|
|
|
3435
3464
|
}, [selectedItemId, listType, handlers, panelConfig, listData?.items]);
|
|
3436
3465
|
if (!listType || !panelConfig) {
|
|
3437
3466
|
return /* @__PURE__ */ React44.createElement(
|
|
3438
|
-
|
|
3467
|
+
Paper3,
|
|
3439
3468
|
{
|
|
3440
3469
|
p: "md",
|
|
3441
3470
|
shadow: "sm",
|
|
@@ -3465,17 +3494,17 @@ var ListSelectionPanel = ({ selectedIds, listData, listType, onClose }) => {
|
|
|
3465
3494
|
return /* @__PURE__ */ React44.createElement(BaseRightPanelLayout, { title: "List selection", onClose: handleClose }, /* @__PURE__ */ React44.createElement(SelectionPanelEmpty, { message: "No item selected" }));
|
|
3466
3495
|
}
|
|
3467
3496
|
if (loading || !itemData) {
|
|
3468
|
-
return /* @__PURE__ */ React44.createElement(BaseRightPanelLayout, { onClose: handleClose, title: "Loading..." }, /* @__PURE__ */ React44.createElement(
|
|
3497
|
+
return /* @__PURE__ */ React44.createElement(BaseRightPanelLayout, { onClose: handleClose, title: "Loading..." }, /* @__PURE__ */ React44.createElement(Center2, { h: 200 }, /* @__PURE__ */ React44.createElement(Loader, null)));
|
|
3469
3498
|
}
|
|
3470
3499
|
if (error) {
|
|
3471
|
-
return /* @__PURE__ */ React44.createElement(BaseRightPanelLayout, { onClose: handleClose, title: "Error" }, /* @__PURE__ */ React44.createElement(Alert3, { color: "red", title: "Error" }, /* @__PURE__ */ React44.createElement(
|
|
3500
|
+
return /* @__PURE__ */ React44.createElement(BaseRightPanelLayout, { onClose: handleClose, title: "Error" }, /* @__PURE__ */ React44.createElement(Alert3, { color: "red", title: "Error" }, /* @__PURE__ */ React44.createElement(Text26, { size: "sm" }, error)));
|
|
3472
3501
|
}
|
|
3473
3502
|
return /* @__PURE__ */ React44.createElement(
|
|
3474
3503
|
BaseRightPanelLayout,
|
|
3475
3504
|
{
|
|
3476
3505
|
onClose: handleClose,
|
|
3477
3506
|
title: panelConfig.title(itemData),
|
|
3478
|
-
captionContent: /* @__PURE__ */ React44.createElement(
|
|
3507
|
+
captionContent: /* @__PURE__ */ React44.createElement(Text26, { pb: "md", px: "40px" }, panelConfig.description(itemData))
|
|
3479
3508
|
},
|
|
3480
3509
|
/* @__PURE__ */ React44.createElement(Stack26, { gap: "md", style: { flex: 1 } }, panelConfig?.image && /* @__PURE__ */ React44.createElement(
|
|
3481
3510
|
"img",
|
|
@@ -3495,28 +3524,28 @@ var ListSelectionPanel = ({ selectedIds, listData, listType, onClose }) => {
|
|
|
3495
3524
|
|
|
3496
3525
|
// src/mantine/blocks/list/projects/ProjectsList.tsx
|
|
3497
3526
|
import React45 from "react";
|
|
3498
|
-
import { Text as
|
|
3527
|
+
import { Text as Text27, Box as Box19, Image as Image12, Stack as Stack27, Flex as Flex18 } from "@mantine/core";
|
|
3499
3528
|
var ProjectsList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
3500
3529
|
if (!items || items.length === 0) {
|
|
3501
|
-
return /* @__PURE__ */ React45.createElement(
|
|
3530
|
+
return /* @__PURE__ */ React45.createElement(Text27, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No Projects found");
|
|
3502
3531
|
}
|
|
3503
3532
|
const rows = items.map((item) => {
|
|
3504
3533
|
const isChecked = isItemChecked?.(item.did);
|
|
3505
|
-
return /* @__PURE__ */ React45.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.did, !isChecked), key: item.did, isChecked: !!isChecked }, /* @__PURE__ */ React45.createElement(Flex18, { align: "center", gap: "sm" }, /* @__PURE__ */ React45.createElement(Image12, { radius: 16, w: 32, h: 32, src: item.icon }), /* @__PURE__ */ React45.createElement(Stack27, { gap: 0 }, /* @__PURE__ */ React45.createElement(
|
|
3534
|
+
return /* @__PURE__ */ React45.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.did, !isChecked), key: item.did, isChecked: !!isChecked }, /* @__PURE__ */ React45.createElement(Flex18, { align: "center", gap: "sm" }, /* @__PURE__ */ React45.createElement(Image12, { radius: 16, w: 32, h: 32, src: item.icon }), /* @__PURE__ */ React45.createElement(Stack27, { gap: 0 }, /* @__PURE__ */ React45.createElement(Text27, { size: "sm" }, item.name || "-"), /* @__PURE__ */ React45.createElement(Text27, { size: "sm", c: "dimmed" }, shortStr(item.description, 50, 0) || "-"))), /* @__PURE__ */ React45.createElement(Flex18, { align: "center", gap: "md" }, isMultiSelect && /* @__PURE__ */ React45.createElement(ListItemCheckbox, { ariaLabel: `Select project ${item.did}`, checked: isItemChecked?.(item.did), onCheck: (checked) => onItemCheck?.(item.did, checked) })));
|
|
3506
3535
|
});
|
|
3507
3536
|
return /* @__PURE__ */ React45.createElement(Box19, { flex: 1 }, /* @__PURE__ */ React45.createElement(Stack27, null, rows));
|
|
3508
3537
|
};
|
|
3509
3538
|
|
|
3510
3539
|
// src/mantine/blocks/list/daos/DaosList.tsx
|
|
3511
3540
|
import React46 from "react";
|
|
3512
|
-
import { Text as
|
|
3541
|
+
import { Text as Text28, Box as Box20, Image as Image13, Stack as Stack28, Flex as Flex19 } from "@mantine/core";
|
|
3513
3542
|
var DaosList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
3514
3543
|
if (!items || items.length === 0) {
|
|
3515
|
-
return /* @__PURE__ */ React46.createElement(
|
|
3544
|
+
return /* @__PURE__ */ React46.createElement(Text28, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No Daos found");
|
|
3516
3545
|
}
|
|
3517
3546
|
const rows = items.map((item) => {
|
|
3518
3547
|
const isChecked = isItemChecked?.(item.did);
|
|
3519
|
-
return /* @__PURE__ */ React46.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.did, !isChecked), key: item.did, isChecked: !!isChecked }, /* @__PURE__ */ React46.createElement(Flex19, { align: "center", gap: "sm" }, /* @__PURE__ */ React46.createElement(Image13, { radius: 16, w: 32, h: 32, src: item.icon }), /* @__PURE__ */ React46.createElement(Stack28, { gap: 0 }, /* @__PURE__ */ React46.createElement(
|
|
3548
|
+
return /* @__PURE__ */ React46.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.did, !isChecked), key: item.did, isChecked: !!isChecked }, /* @__PURE__ */ React46.createElement(Flex19, { align: "center", gap: "sm" }, /* @__PURE__ */ React46.createElement(Image13, { radius: 16, w: 32, h: 32, src: item.icon }), /* @__PURE__ */ React46.createElement(Stack28, { gap: 0 }, /* @__PURE__ */ React46.createElement(Text28, { size: "sm" }, item.name || "-"), /* @__PURE__ */ React46.createElement(Text28, { size: "sm", c: "dimmed" }, shortStr(item.description, 50, 0) || "-"))), /* @__PURE__ */ React46.createElement(Flex19, { align: "center", gap: "md" }, isMultiSelect && /* @__PURE__ */ React46.createElement(ListItemCheckbox, { ariaLabel: `Select DAO ${item.did}`, checked: isItemChecked?.(item.did), onCheck: (checked) => onItemCheck?.(item.did, checked) })));
|
|
3520
3549
|
});
|
|
3521
3550
|
return /* @__PURE__ */ React46.createElement(Box20, { flex: 1 }, /* @__PURE__ */ React46.createElement(Stack28, null, rows));
|
|
3522
3551
|
};
|
|
@@ -3679,12 +3708,12 @@ function categorizeResources(linkedResources, services) {
|
|
|
3679
3708
|
}
|
|
3680
3709
|
|
|
3681
3710
|
// src/mantine/components/Base/BaseAlert.tsx
|
|
3682
|
-
import { Stack as Stack29, Button as Button4, Text as
|
|
3711
|
+
import { Stack as Stack29, Button as Button4, Text as Text29 } from "@mantine/core";
|
|
3683
3712
|
import { IconCircleDashed } from "@tabler/icons-react";
|
|
3684
3713
|
import React47, { useState as useState9 } from "react";
|
|
3685
3714
|
function BaseAlert({ errMsg, onRetry }) {
|
|
3686
3715
|
const [showErrorDetails, setShowErrorDetails] = useState9(false);
|
|
3687
|
-
return /* @__PURE__ */ React47.createElement(Stack29, { flex: 1, h: 200, py: "md", style: { borderRadius: 16 }, bg: "neutralDark.5", mx: "auto", align: "center", justify: "center", ta: "center" }, /* @__PURE__ */ React47.createElement(Stack29, null, /* @__PURE__ */ React47.createElement(IconCircleDashed, { size: 32 })), /* @__PURE__ */ React47.createElement(Stack29, { justify: "center", align: "center", ta: "center", gap: "xs" }, /* @__PURE__ */ React47.createElement(
|
|
3716
|
+
return /* @__PURE__ */ React47.createElement(Stack29, { flex: 1, h: 200, py: "md", style: { borderRadius: 16 }, bg: "neutralDark.5", mx: "auto", align: "center", justify: "center", ta: "center" }, /* @__PURE__ */ React47.createElement(Stack29, null, /* @__PURE__ */ React47.createElement(IconCircleDashed, { size: 32 })), /* @__PURE__ */ React47.createElement(Stack29, { justify: "center", align: "center", ta: "center", gap: "xs" }, /* @__PURE__ */ React47.createElement(Text29, { c: "dimmed", size: "sm" }, showErrorDetails ? errMsg : "Failed to load data"), /* @__PURE__ */ React47.createElement(Stack29, { align: "center", gap: "xl" }, /* @__PURE__ */ React47.createElement(Button4, { size: "sm", variant: "subtle", c: "white", onClick: () => setShowErrorDetails(!showErrorDetails) }, showErrorDetails ? "Hide" : "Show", " Details"), /* @__PURE__ */ React47.createElement(Button4, { c: "accent", size: "sm", variant: "subtle", onClick: onRetry }, "Retry"))));
|
|
3688
3717
|
}
|
|
3689
3718
|
|
|
3690
3719
|
// src/mantine/blocks/list/flow/ListFlowView.tsx
|
|
@@ -4023,12 +4052,12 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
4023
4052
|
}
|
|
4024
4053
|
};
|
|
4025
4054
|
if (!listType) {
|
|
4026
|
-
return /* @__PURE__ */ React48.createElement(
|
|
4055
|
+
return /* @__PURE__ */ React48.createElement(Center3, { py: "xl" }, /* @__PURE__ */ React48.createElement(Text30, { size: "sm", c: "dimmed" }, "List not configured"));
|
|
4027
4056
|
}
|
|
4028
|
-
return /* @__PURE__ */ React48.createElement(Stack30, { w: "100%" }, /* @__PURE__ */ React48.createElement(Flex20, { px: 5, align: "center", justify: "space-between" }, /* @__PURE__ */ React48.createElement(
|
|
4057
|
+
return /* @__PURE__ */ React48.createElement(Stack30, { w: "100%" }, /* @__PURE__ */ React48.createElement(Flex20, { px: 5, align: "center", justify: "space-between" }, /* @__PURE__ */ React48.createElement(Title2, { order: 4 }, getListNameByType(listType)), /* @__PURE__ */ React48.createElement(Tooltip5, { label: opened ? "Collapse" : "Expand", withArrow: true }, /* @__PURE__ */ React48.createElement(ActionIcon3, { variant: "subtle", size: "sm", onClick: toggle, "aria-label": opened ? "Collapse" : "Expand" }, opened ? /* @__PURE__ */ React48.createElement(IconChevronUp, { size: 18 }) : /* @__PURE__ */ React48.createElement(IconChevronDown2, { size: 18 })))), /* @__PURE__ */ React48.createElement(Collapse2, { pb: 5, px: 5, in: opened }, /* @__PURE__ */ React48.createElement(Stack30, { mih: totalPages !== 1 ? 500 : void 0, w: "100%" }, /* @__PURE__ */ React48.createElement(Flex20, { align: "center", gap: "xs" }, listSortConfig?.key && /* @__PURE__ */ React48.createElement(Flex20, { align: "center" }, /* @__PURE__ */ React48.createElement(Text30, { size: "xs" }, listSortConfig.key?.replace(/([A-Z])/g, " $1").replace(
|
|
4029
4058
|
/^./,
|
|
4030
4059
|
(str) => str.toUpperCase()
|
|
4031
|
-
), " "), /* @__PURE__ */ React48.createElement(
|
|
4060
|
+
), " "), /* @__PURE__ */ React48.createElement(Text30, { lh: 0.5 }, listSortConfig.direction === "asc" && /* @__PURE__ */ React48.createElement(IconArrowUp2, { size: 18 }), listSortConfig.direction === "desc" && /* @__PURE__ */ React48.createElement(IconArrowDown2, { size: 18 }))), isMultiSelect && /* @__PURE__ */ React48.createElement(Text30, { lh: 0.5 }, "Multi Selection")), /* @__PURE__ */ React48.createElement(Flex20, { justify: "space-between" }, /* @__PURE__ */ React48.createElement(Flex20, { gap: "xs", align: "center" }, /* @__PURE__ */ React48.createElement(FilterTab, { key: "All", label: "All", isActive: !listFilterConfig?.key, onClick: () => handleFilterChange(null) }), Array.isArray(listFilterConfigOptions) && listFilterConfigOptions.length > 0 && listFilterConfigOptions.map(({ key, label, type }) => /* @__PURE__ */ React48.createElement(
|
|
4032
4061
|
FilterTab,
|
|
4033
4062
|
{
|
|
4034
4063
|
key: label,
|
|
@@ -4036,7 +4065,7 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
4036
4065
|
isActive: listFilterConfig?.key === key && listFilterConfig?.value === type,
|
|
4037
4066
|
onClick: () => handleFilterChange({ key, value: type })
|
|
4038
4067
|
}
|
|
4039
|
-
))), /* @__PURE__ */ React48.createElement(Flex20, { gap: "xs" }, /* @__PURE__ */ React48.createElement(Tooltip5, { label: "Refresh", withArrow: true }, /* @__PURE__ */ React48.createElement(
|
|
4068
|
+
))), /* @__PURE__ */ React48.createElement(Flex20, { gap: "xs" }, /* @__PURE__ */ React48.createElement(Tooltip5, { label: "Refresh", withArrow: true }, /* @__PURE__ */ React48.createElement(ActionIcon3, { variant: "subtle", size: "sm", onClick: fetchData, loading }, /* @__PURE__ */ React48.createElement(IconRefresh, { size: 18 }))), editable && /* @__PURE__ */ React48.createElement(Tooltip5, { label: "Settings", withArrow: true }, /* @__PURE__ */ React48.createElement(ActionIcon3, { variant: "subtle", size: "sm", onClick: openPanel }, /* @__PURE__ */ React48.createElement(IconSettings, { size: 18 }))), listConfig && listSortConfigOptions && listSortConfigOptions?.length > 0 && /* @__PURE__ */ React48.createElement(
|
|
4040
4069
|
ListActionsMenu,
|
|
4041
4070
|
{
|
|
4042
4071
|
isMultiSelect,
|
|
@@ -4046,7 +4075,7 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
4046
4075
|
onChange: (sortOption) => handleSortChange(sortOption),
|
|
4047
4076
|
onDownloadCsv: data?.items ? () => downloadArrayAsCsv(data.items) : void 0
|
|
4048
4077
|
}
|
|
4049
|
-
))), /* @__PURE__ */ React48.createElement(Flex20, { flex: 1 }, loading ? /* @__PURE__ */ React48.createElement(
|
|
4078
|
+
))), /* @__PURE__ */ React48.createElement(Flex20, { flex: 1 }, loading ? /* @__PURE__ */ React48.createElement(Center3, { py: "xl", w: "100%" }, /* @__PURE__ */ React48.createElement(Loader2, { size: "md", mx: "auto" })) : error ? /* @__PURE__ */ React48.createElement(BaseAlert, { onRetry: fetchData, errMsg: error }) : /* @__PURE__ */ React48.createElement(Stack30, { flex: 1 }, /* @__PURE__ */ React48.createElement(Stack30, { gap: "md" }, renderListComponent(), /* @__PURE__ */ React48.createElement(
|
|
4050
4079
|
ListPagination,
|
|
4051
4080
|
{
|
|
4052
4081
|
page,
|
|
@@ -4109,7 +4138,7 @@ var ListBlockSpec = createReactBlockSpec2(
|
|
|
4109
4138
|
// src/mantine/blocks/overview/OverviewBlock.tsx
|
|
4110
4139
|
import React51, { useEffect as useEffect8, useState as useState11 } from "react";
|
|
4111
4140
|
import { createReactBlockSpec as createReactBlockSpec3 } from "@blocknote/react";
|
|
4112
|
-
import { Stack as Stack31, Text as
|
|
4141
|
+
import { Stack as Stack31, Text as Text31, Box as Box21, Loader as Loader3, Alert as Alert4, Group as Group8, Accordion as Accordion2, Collapse as Collapse3 } from "@mantine/core";
|
|
4113
4142
|
import { IconChevronRight as IconChevronRight2, IconChevronDown as IconChevronDown3, IconFileDescription, IconWorld, IconCalendar, IconUser, IconCircleCheck } from "@tabler/icons-react";
|
|
4114
4143
|
import { useDisclosure as useDisclosure2 } from "@mantine/hooks";
|
|
4115
4144
|
var OverviewBlockContent = () => {
|
|
@@ -4179,7 +4208,7 @@ var OverviewBlockContent = () => {
|
|
|
4179
4208
|
}
|
|
4180
4209
|
},
|
|
4181
4210
|
/* @__PURE__ */ React51.createElement(Stack31, { gap: "md" }, /* @__PURE__ */ React51.createElement(
|
|
4182
|
-
|
|
4211
|
+
Text31,
|
|
4183
4212
|
{
|
|
4184
4213
|
fz: "32px",
|
|
4185
4214
|
fw: 700,
|
|
@@ -4207,7 +4236,7 @@ var OverviewBlockContent = () => {
|
|
|
4207
4236
|
},
|
|
4208
4237
|
onClick: toggleDetails
|
|
4209
4238
|
},
|
|
4210
|
-
/* @__PURE__ */ React51.createElement(Group8, { gap: "xs" }, detailsOpened ? /* @__PURE__ */ React51.createElement(IconChevronDown3, { size: 20, color: "#ffffff" }) : /* @__PURE__ */ React51.createElement(IconChevronRight2, { size: 20, color: "#ffffff" }), /* @__PURE__ */ React51.createElement(
|
|
4239
|
+
/* @__PURE__ */ React51.createElement(Group8, { gap: "xs" }, detailsOpened ? /* @__PURE__ */ React51.createElement(IconChevronDown3, { size: 20, color: "#ffffff" }) : /* @__PURE__ */ React51.createElement(IconChevronRight2, { size: 20, color: "#ffffff" }), /* @__PURE__ */ React51.createElement(Text31, { size: "sm", fw: 500, c: "#ffffff" }, "Details"))
|
|
4211
4240
|
),
|
|
4212
4241
|
/* @__PURE__ */ React51.createElement(Collapse3, { in: detailsOpened }, /* @__PURE__ */ React51.createElement(
|
|
4213
4242
|
Box21,
|
|
@@ -4216,10 +4245,10 @@ var OverviewBlockContent = () => {
|
|
|
4216
4245
|
padding: "0 16px 16px 16px"
|
|
4217
4246
|
}
|
|
4218
4247
|
},
|
|
4219
|
-
/* @__PURE__ */ React51.createElement(Stack31, { gap: "xs" }, domainCard.entity_type && domainCard.entity_type.length > 0 && /* @__PURE__ */ React51.createElement(Group8, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React51.createElement(IconFileDescription, { size: 20, color: "#adb5bd", style: { flexShrink: 0 } }), /* @__PURE__ */ React51.createElement(
|
|
4248
|
+
/* @__PURE__ */ React51.createElement(Stack31, { gap: "xs" }, domainCard.entity_type && domainCard.entity_type.length > 0 && /* @__PURE__ */ React51.createElement(Group8, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React51.createElement(IconFileDescription, { size: 20, color: "#adb5bd", style: { flexShrink: 0 } }), /* @__PURE__ */ React51.createElement(Text31, { size: "sm", c: "dimmed", style: { width: "140px", flexShrink: 0 } }, "Type"), /* @__PURE__ */ React51.createElement(Text31, { size: "sm", style: { color: "#ffffff" } }, domainCard.entity_type[0].replace("ixo:", ""))), domainCard.valid_from && /* @__PURE__ */ React51.createElement(Group8, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React51.createElement(IconCalendar, { size: 20, color: "#adb5bd", style: { flexShrink: 0 } }), /* @__PURE__ */ React51.createElement(Text31, { size: "sm", c: "dimmed", style: { width: "140px", flexShrink: 0 } }, "Created"), /* @__PURE__ */ React51.createElement(Text31, { size: "sm", style: { color: "#ffffff" } }, new Date(domainCard.valid_from).toLocaleDateString("en-GB", { day: "numeric", month: "short", year: "numeric" }))), /* @__PURE__ */ React51.createElement(Group8, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React51.createElement(IconCircleCheck, { size: 20, color: "#adb5bd", style: { flexShrink: 0 } }), /* @__PURE__ */ React51.createElement(Text31, { size: "sm", c: "dimmed", style: { width: "140px", flexShrink: 0 } }, "Status"), /* @__PURE__ */ React51.createElement(Text31, { size: "sm", style: { color: "#ffffff" } }, "Active")), domainCard.area_served && /* @__PURE__ */ React51.createElement(Group8, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React51.createElement(IconWorld, { size: 20, color: "#adb5bd", style: { flexShrink: 0 } }), /* @__PURE__ */ React51.createElement(Text31, { size: "sm", c: "dimmed", style: { width: "140px", flexShrink: 0 } }, "Country"), /* @__PURE__ */ React51.createElement(Text31, { size: "sm", style: { color: "#ffffff" } }, domainCard.area_served)), domainCard.issuer && /* @__PURE__ */ React51.createElement(Group8, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React51.createElement(IconUser, { size: 20, color: "#adb5bd", style: { flexShrink: 0 } }), /* @__PURE__ */ React51.createElement(Text31, { size: "sm", c: "dimmed", style: { width: "140px", flexShrink: 0 } }, "Issuer"), /* @__PURE__ */ React51.createElement(Text31, { size: "sm", style: { color: "#ffffff" } }, domainCard.issuer)))
|
|
4220
4249
|
))
|
|
4221
|
-
), /* @__PURE__ */ React51.createElement(Box21, { style: { marginTop: "24px" } }, /* @__PURE__ */ React51.createElement(
|
|
4222
|
-
|
|
4250
|
+
), /* @__PURE__ */ React51.createElement(Box21, { style: { marginTop: "24px" } }, /* @__PURE__ */ React51.createElement(Text31, { size: "lg", fw: 600, style: { marginBottom: "12px" } }, "About the Project"), /* @__PURE__ */ React51.createElement(
|
|
4251
|
+
Text31,
|
|
4223
4252
|
{
|
|
4224
4253
|
size: "sm",
|
|
4225
4254
|
c: "dimmed",
|
|
@@ -4228,8 +4257,8 @@ var OverviewBlockContent = () => {
|
|
|
4228
4257
|
}
|
|
4229
4258
|
},
|
|
4230
4259
|
domainCard.summary || domainCard.overview || domainCard.description || "No summary available"
|
|
4231
|
-
)), /* @__PURE__ */ React51.createElement(Box21, { style: { marginTop: "16px" } }, /* @__PURE__ */ React51.createElement(
|
|
4232
|
-
|
|
4260
|
+
)), /* @__PURE__ */ React51.createElement(Box21, { style: { marginTop: "16px" } }, /* @__PURE__ */ React51.createElement(Text31, { size: "lg", fw: 600, style: { marginBottom: "12px" } }, "What are the next steps"), /* @__PURE__ */ React51.createElement(
|
|
4261
|
+
Text31,
|
|
4233
4262
|
{
|
|
4234
4263
|
size: "sm",
|
|
4235
4264
|
c: "dimmed",
|
|
@@ -4267,7 +4296,7 @@ import React88, { useCallback as useCallback12 } from "react";
|
|
|
4267
4296
|
|
|
4268
4297
|
// src/mantine/blocks/proposal/template/GeneralTab.tsx
|
|
4269
4298
|
import React53, { useEffect as useEffect9, useState as useState12 } from "react";
|
|
4270
|
-
import { Stack as Stack33, Text as
|
|
4299
|
+
import { Stack as Stack33, Text as Text32, Loader as Loader4, SegmentedControl as SegmentedControl4 } from "@mantine/core";
|
|
4271
4300
|
|
|
4272
4301
|
// src/mantine/components/Base/BaseSection.tsx
|
|
4273
4302
|
import { Stack as Stack32 } from "@mantine/core";
|
|
@@ -4343,7 +4372,7 @@ var GeneralTab3 = ({ title, description, coreAddress, onTitleChange, onDescripti
|
|
|
4343
4372
|
onDescriptionChange(newDescription);
|
|
4344
4373
|
}
|
|
4345
4374
|
}
|
|
4346
|
-
), /* @__PURE__ */ React53.createElement(Stack33, { gap: "xs" }, /* @__PURE__ */ React53.createElement(
|
|
4375
|
+
), /* @__PURE__ */ React53.createElement(Stack33, { gap: "xs" }, /* @__PURE__ */ React53.createElement(Text32, { size: "sm", fw: 600 }, "Group"), /* @__PURE__ */ React53.createElement(
|
|
4347
4376
|
SegmentedControl4,
|
|
4348
4377
|
{
|
|
4349
4378
|
value: inputMode,
|
|
@@ -4395,7 +4424,7 @@ import { Card as Card10, Stack as Stack66 } from "@mantine/core";
|
|
|
4395
4424
|
|
|
4396
4425
|
// src/mantine/blocks/proposal/actions-components/ActionsCard.tsx
|
|
4397
4426
|
import React54 from "react";
|
|
4398
|
-
import { Card as Card3, Group as Group9, Text as
|
|
4427
|
+
import { Card as Card3, Group as Group9, Text as Text33, Badge as Badge4, Stack as Stack34, ActionIcon as ActionIcon4, ScrollArea } from "@mantine/core";
|
|
4399
4428
|
var getActionSummary = (action) => {
|
|
4400
4429
|
switch (action.type) {
|
|
4401
4430
|
case "Spend":
|
|
@@ -4444,7 +4473,7 @@ var ActionsCard = ({ actions, isSelected, onClick, onEditAction, onRemoveAction,
|
|
|
4444
4473
|
},
|
|
4445
4474
|
onClick: handleCardClick
|
|
4446
4475
|
},
|
|
4447
|
-
/* @__PURE__ */ React54.createElement(Group9, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React54.createElement(Stack34, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React54.createElement(
|
|
4476
|
+
/* @__PURE__ */ React54.createElement(Group9, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React54.createElement(Stack34, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React54.createElement(Text33, { size: "md", fw: 600, style: { color: "#f1f3f5" } }, "Proposal Actions (", actions.length, ")"), actions.length === 0 ? /* @__PURE__ */ React54.createElement(Text33, { size: "sm", style: { color: "#868e96" } }, "No actions added yet.") : /* @__PURE__ */ React54.createElement(ScrollArea, { h: actions.length > 3 ? 150 : void 0, style: { marginTop: 8 } }, /* @__PURE__ */ React54.createElement(Stack34, { gap: "xs" }, actions.map((action, index) => /* @__PURE__ */ React54.createElement(
|
|
4448
4477
|
Card3,
|
|
4449
4478
|
{
|
|
4450
4479
|
key: index,
|
|
@@ -4466,8 +4495,8 @@ var ActionsCard = ({ actions, isSelected, onClick, onEditAction, onRemoveAction,
|
|
|
4466
4495
|
}
|
|
4467
4496
|
},
|
|
4468
4497
|
action.type
|
|
4469
|
-
), /* @__PURE__ */ React54.createElement(
|
|
4470
|
-
|
|
4498
|
+
), /* @__PURE__ */ React54.createElement(Text33, { size: "sm", style: { color: "#adb5bd" } }, getActionSummary(action))), !disabled && /* @__PURE__ */ React54.createElement(Group9, { gap: 4 }, /* @__PURE__ */ React54.createElement(
|
|
4499
|
+
ActionIcon4,
|
|
4471
4500
|
{
|
|
4472
4501
|
size: "sm",
|
|
4473
4502
|
variant: "subtle",
|
|
@@ -4480,7 +4509,7 @@ var ActionsCard = ({ actions, isSelected, onClick, onEditAction, onRemoveAction,
|
|
|
4480
4509
|
},
|
|
4481
4510
|
"\u270F\uFE0F"
|
|
4482
4511
|
), /* @__PURE__ */ React54.createElement(
|
|
4483
|
-
|
|
4512
|
+
ActionIcon4,
|
|
4484
4513
|
{
|
|
4485
4514
|
size: "sm",
|
|
4486
4515
|
variant: "subtle",
|
|
@@ -4499,7 +4528,7 @@ var ActionsCard = ({ actions, isSelected, onClick, onEditAction, onRemoveAction,
|
|
|
4499
4528
|
|
|
4500
4529
|
// src/mantine/blocks/proposal/ActionsPanel.tsx
|
|
4501
4530
|
import React85, { useState as useState19, useEffect as useEffect11, useMemo as useMemo9 } from "react";
|
|
4502
|
-
import { Stack as Stack65, Button as Button10, Group as Group20, Text as
|
|
4531
|
+
import { Stack as Stack65, Button as Button10, Group as Group20, Text as Text41, Card as Card9, Badge as Badge7, Divider as Divider4, ScrollArea as ScrollArea3, Alert as Alert7, Tabs as Tabs2, SimpleGrid, Paper as Paper4 } from "@mantine/core";
|
|
4503
4532
|
|
|
4504
4533
|
// src/mantine/blocks/proposal/actions-components/SpendActionForm.tsx
|
|
4505
4534
|
import React55 from "react";
|
|
@@ -4510,7 +4539,7 @@ var SpendActionForm = ({ data, onChange }) => {
|
|
|
4510
4539
|
|
|
4511
4540
|
// src/mantine/blocks/proposal/actions-components/UpdateMembersActionForm.tsx
|
|
4512
4541
|
import React56, { useState as useState13 } from "react";
|
|
4513
|
-
import { Stack as Stack36, Button as Button5, Group as Group10, Text as
|
|
4542
|
+
import { Stack as Stack36, Button as Button5, Group as Group10, Text as Text34, Card as Card4, Badge as Badge5, ActionIcon as ActionIcon5, Divider as Divider3, ScrollArea as ScrollArea2 } from "@mantine/core";
|
|
4514
4543
|
var UpdateMembersActionForm = ({ data, onChange }) => {
|
|
4515
4544
|
const [newMember, setNewMember] = useState13({ addr: "", weight: 1 });
|
|
4516
4545
|
const [newRemoveAddress, setNewRemoveAddress] = useState13("");
|
|
@@ -4542,7 +4571,7 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
|
|
|
4542
4571
|
remove: (data.remove || []).filter((_, i) => i !== index)
|
|
4543
4572
|
});
|
|
4544
4573
|
};
|
|
4545
|
-
return /* @__PURE__ */ React56.createElement(Stack36, null, /* @__PURE__ */ React56.createElement(Stack36, { gap: "xs" }, /* @__PURE__ */ React56.createElement(
|
|
4574
|
+
return /* @__PURE__ */ React56.createElement(Stack36, null, /* @__PURE__ */ React56.createElement(Stack36, { gap: "xs" }, /* @__PURE__ */ React56.createElement(Text34, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Members to Add"), /* @__PURE__ */ React56.createElement(ScrollArea2, { h: 150 }, /* @__PURE__ */ React56.createElement(Stack36, { gap: "xs" }, (data.add || []).map((member, index) => /* @__PURE__ */ React56.createElement(
|
|
4546
4575
|
Card4,
|
|
4547
4576
|
{
|
|
4548
4577
|
key: index,
|
|
@@ -4553,7 +4582,7 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
|
|
|
4553
4582
|
borderColor: "#333"
|
|
4554
4583
|
}
|
|
4555
4584
|
},
|
|
4556
|
-
/* @__PURE__ */ React56.createElement(Group10, { justify: "space-between" }, /* @__PURE__ */ React56.createElement("div", null, /* @__PURE__ */ React56.createElement(
|
|
4585
|
+
/* @__PURE__ */ React56.createElement(Group10, { justify: "space-between" }, /* @__PURE__ */ React56.createElement("div", null, /* @__PURE__ */ React56.createElement(Text34, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, member.addr.slice(0, 20), "..."), /* @__PURE__ */ React56.createElement(
|
|
4557
4586
|
Badge5,
|
|
4558
4587
|
{
|
|
4559
4588
|
size: "sm",
|
|
@@ -4564,7 +4593,7 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
|
|
|
4564
4593
|
},
|
|
4565
4594
|
"Weight: ",
|
|
4566
4595
|
member.weight
|
|
4567
|
-
)), /* @__PURE__ */ React56.createElement(
|
|
4596
|
+
)), /* @__PURE__ */ React56.createElement(ActionIcon5, { size: "sm", variant: "subtle", onClick: () => handleRemoveMember(index), style: { color: "#ff6b6b" } }, "\u{1F5D1}\uFE0F"))
|
|
4568
4597
|
)))), /* @__PURE__ */ React56.createElement(Group10, { grow: true }, /* @__PURE__ */ React56.createElement(BaseTextInput, { placeholder: "Member address", value: newMember.addr, onChange: (e) => setNewMember({ ...newMember, addr: e.currentTarget.value }) }), /* @__PURE__ */ React56.createElement(BaseNumberInput, { placeholder: "Weight", value: newMember.weight, onChange: (value) => setNewMember({ ...newMember, weight: Number(value) || 1 }), min: 1 }), /* @__PURE__ */ React56.createElement(
|
|
4569
4598
|
Button5,
|
|
4570
4599
|
{
|
|
@@ -4578,7 +4607,7 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
|
|
|
4578
4607
|
}
|
|
4579
4608
|
},
|
|
4580
4609
|
"\u2795 Add"
|
|
4581
|
-
))), /* @__PURE__ */ React56.createElement(Divider3, { color: "#333" }), /* @__PURE__ */ React56.createElement(Stack36, { gap: "xs" }, /* @__PURE__ */ React56.createElement(
|
|
4610
|
+
))), /* @__PURE__ */ React56.createElement(Divider3, { color: "#333" }), /* @__PURE__ */ React56.createElement(Stack36, { gap: "xs" }, /* @__PURE__ */ React56.createElement(Text34, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Members to Remove"), /* @__PURE__ */ React56.createElement(ScrollArea2, { h: 100 }, /* @__PURE__ */ React56.createElement(Stack36, { gap: "xs" }, (data.remove || []).map((item, index) => /* @__PURE__ */ React56.createElement(
|
|
4582
4611
|
Card4,
|
|
4583
4612
|
{
|
|
4584
4613
|
key: index,
|
|
@@ -4589,7 +4618,7 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
|
|
|
4589
4618
|
borderColor: "#333"
|
|
4590
4619
|
}
|
|
4591
4620
|
},
|
|
4592
|
-
/* @__PURE__ */ React56.createElement(Group10, { justify: "space-between" }, /* @__PURE__ */ React56.createElement(
|
|
4621
|
+
/* @__PURE__ */ React56.createElement(Group10, { justify: "space-between" }, /* @__PURE__ */ React56.createElement(Text34, { size: "sm", style: { color: "#adb5bd" } }, item.addr.slice(0, 30), "..."), /* @__PURE__ */ React56.createElement(ActionIcon5, { size: "sm", variant: "subtle", onClick: () => handleRemoveRemoveAddress(index), style: { color: "#ff6b6b" } }, "\u{1F5D1}\uFE0F"))
|
|
4593
4622
|
)))), /* @__PURE__ */ React56.createElement(Group10, { grow: true }, /* @__PURE__ */ React56.createElement(BaseTextInput, { placeholder: "Address to remove", value: newRemoveAddress, onChange: (e) => setNewRemoveAddress(e.currentTarget.value) }), /* @__PURE__ */ React56.createElement(
|
|
4594
4623
|
Button5,
|
|
4595
4624
|
{
|
|
@@ -4689,7 +4718,7 @@ var MintActionForm = ({ data, onChange }) => {
|
|
|
4689
4718
|
|
|
4690
4719
|
// src/mantine/blocks/proposal/actions-components/forms/ExecuteActionForm.tsx
|
|
4691
4720
|
import React60, { useState as useState14 } from "react";
|
|
4692
|
-
import { Stack as Stack40, Button as Button6, Group as Group11, Text as
|
|
4721
|
+
import { Stack as Stack40, Button as Button6, Group as Group11, Text as Text35, Card as Card5 } from "@mantine/core";
|
|
4693
4722
|
var ExecuteActionForm = ({ data, onChange }) => {
|
|
4694
4723
|
const [newFund, setNewFund] = useState14({ denom: "uixo", amount: "" });
|
|
4695
4724
|
const handleAddFund = () => {
|
|
@@ -4725,7 +4754,7 @@ var ExecuteActionForm = ({ data, onChange }) => {
|
|
|
4725
4754
|
minRows: 4,
|
|
4726
4755
|
required: true
|
|
4727
4756
|
}
|
|
4728
|
-
), /* @__PURE__ */ React60.createElement(Stack40, { gap: "xs" }, /* @__PURE__ */ React60.createElement(
|
|
4757
|
+
), /* @__PURE__ */ React60.createElement(Stack40, { gap: "xs" }, /* @__PURE__ */ React60.createElement(Text35, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Funds (Optional)"), (data.funds || []).map((fund, index) => /* @__PURE__ */ React60.createElement(Card5, { key: index, withBorder: true, padding: "xs", style: { backgroundColor: "#2a2a2a", borderColor: "#333" } }, /* @__PURE__ */ React60.createElement(Group11, { justify: "space-between" }, /* @__PURE__ */ React60.createElement(Text35, { size: "sm", style: { color: "#f1f3f5" } }, fund.amount, " ", fund.denom), /* @__PURE__ */ React60.createElement(Button6, { size: "xs", variant: "subtle", onClick: () => handleRemoveFund(index), style: { color: "#ff6b6b" } }, "Remove")))), /* @__PURE__ */ React60.createElement(Group11, { grow: true }, /* @__PURE__ */ React60.createElement(BaseTextInput, { placeholder: "Amount", value: newFund.amount, onChange: (e) => setNewFund({ ...newFund, amount: e.currentTarget.value }) }), /* @__PURE__ */ React60.createElement(BaseTextInput, { placeholder: "Denom (e.g., uixo)", value: newFund.denom, onChange: (e) => setNewFund({ ...newFund, denom: e.currentTarget.value }) }), /* @__PURE__ */ React60.createElement(
|
|
4729
4758
|
Button6,
|
|
4730
4759
|
{
|
|
4731
4760
|
size: "sm",
|
|
@@ -4741,7 +4770,7 @@ var ExecuteActionForm = ({ data, onChange }) => {
|
|
|
4741
4770
|
|
|
4742
4771
|
// src/mantine/blocks/proposal/actions-components/forms/CustomActionForm.tsx
|
|
4743
4772
|
import React61, { useState as useState15, useEffect as useEffect10 } from "react";
|
|
4744
|
-
import { Stack as Stack41, Alert as Alert5, Group as Group12, Text as
|
|
4773
|
+
import { Stack as Stack41, Alert as Alert5, Group as Group12, Text as Text36, Badge as Badge6 } from "@mantine/core";
|
|
4745
4774
|
var CustomActionForm = ({ data, onChange }) => {
|
|
4746
4775
|
const [isValid, setIsValid] = useState15(true);
|
|
4747
4776
|
const [error, setError] = useState15("");
|
|
@@ -4765,7 +4794,7 @@ var CustomActionForm = ({ data, onChange }) => {
|
|
|
4765
4794
|
return data.message;
|
|
4766
4795
|
}
|
|
4767
4796
|
};
|
|
4768
|
-
return /* @__PURE__ */ React61.createElement(Stack41, { gap: "md" }, /* @__PURE__ */ React61.createElement(Alert5, { color: "yellow", style: { backgroundColor: "#2a2a2a", borderColor: "#ffd43b" } }, /* @__PURE__ */ React61.createElement(
|
|
4797
|
+
return /* @__PURE__ */ React61.createElement(Stack41, { gap: "md" }, /* @__PURE__ */ React61.createElement(Alert5, { color: "yellow", style: { backgroundColor: "#2a2a2a", borderColor: "#ffd43b" } }, /* @__PURE__ */ React61.createElement(Text36, { size: "sm", style: { color: "#ffd43b" } }, "\u26A0\uFE0F Custom actions require valid JSON messages. Supports both Wasm and Stargate message formats.")), /* @__PURE__ */ React61.createElement("div", null, /* @__PURE__ */ React61.createElement(Group12, { gap: "xs", mb: "xs" }, /* @__PURE__ */ React61.createElement(Text36, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Custom Message (JSON)"), /* @__PURE__ */ React61.createElement(
|
|
4769
4798
|
Badge6,
|
|
4770
4799
|
{
|
|
4771
4800
|
size: "sm",
|
|
@@ -4984,7 +5013,7 @@ var ManageCw721ActionForm = ({ data, onChange }) => {
|
|
|
4984
5013
|
|
|
4985
5014
|
// src/mantine/blocks/proposal/actions-components/forms/InstantiateActionForm.tsx
|
|
4986
5015
|
import React67, { useState as useState16 } from "react";
|
|
4987
|
-
import { Stack as Stack47, Button as Button7, Group as Group14, Text as
|
|
5016
|
+
import { Stack as Stack47, Button as Button7, Group as Group14, Text as Text37, Card as Card6 } from "@mantine/core";
|
|
4988
5017
|
var InstantiateActionForm = ({ data, onChange }) => {
|
|
4989
5018
|
const [newFund, setNewFund] = useState16({ denom: "uixo", amount: "" });
|
|
4990
5019
|
const handleAddFund = () => {
|
|
@@ -5020,7 +5049,7 @@ var InstantiateActionForm = ({ data, onChange }) => {
|
|
|
5020
5049
|
minRows: 4,
|
|
5021
5050
|
required: true
|
|
5022
5051
|
}
|
|
5023
|
-
), /* @__PURE__ */ React67.createElement(Stack47, { gap: "xs" }, /* @__PURE__ */ React67.createElement(
|
|
5052
|
+
), /* @__PURE__ */ React67.createElement(Stack47, { gap: "xs" }, /* @__PURE__ */ React67.createElement(Text37, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Funds (Optional)"), (data.funds || []).map((fund, index) => /* @__PURE__ */ React67.createElement(Card6, { key: index, withBorder: true, padding: "xs", style: { backgroundColor: "#2a2a2a", borderColor: "#333" } }, /* @__PURE__ */ React67.createElement(Group14, { justify: "space-between" }, /* @__PURE__ */ React67.createElement(Text37, { size: "sm", style: { color: "#f1f3f5" } }, fund.amount, " ", fund.denom), /* @__PURE__ */ React67.createElement(Button7, { size: "xs", variant: "subtle", onClick: () => handleRemoveFund(index), style: { color: "#ff6b6b" } }, "Remove")))), /* @__PURE__ */ React67.createElement(Group14, { grow: true }, /* @__PURE__ */ React67.createElement(BaseTextInput, { placeholder: "Amount", value: newFund.amount, onChange: (e) => setNewFund({ ...newFund, amount: e.currentTarget.value }) }), /* @__PURE__ */ React67.createElement(BaseTextInput, { placeholder: "Denom (e.g., uixo)", value: newFund.denom, onChange: (e) => setNewFund({ ...newFund, denom: e.currentTarget.value }) }), /* @__PURE__ */ React67.createElement(
|
|
5024
5053
|
Button7,
|
|
5025
5054
|
{
|
|
5026
5055
|
size: "sm",
|
|
@@ -5095,7 +5124,7 @@ var ManageCw20ActionForm = ({ data, onChange }) => {
|
|
|
5095
5124
|
|
|
5096
5125
|
// src/mantine/blocks/proposal/actions-components/forms/ManageSubDaosActionForm.tsx
|
|
5097
5126
|
import React71, { useState as useState17 } from "react";
|
|
5098
|
-
import { Stack as Stack51, Button as Button8, Group as Group16, Text as
|
|
5127
|
+
import { Stack as Stack51, Button as Button8, Group as Group16, Text as Text38, Card as Card7 } from "@mantine/core";
|
|
5099
5128
|
var ManageSubDaosActionForm = ({ data, onChange }) => {
|
|
5100
5129
|
const [newSubDao, setNewSubDao] = useState17({ addr: "", charter: "" });
|
|
5101
5130
|
const [newRemoveAddress, setNewRemoveAddress] = useState17("");
|
|
@@ -5129,7 +5158,7 @@ var ManageSubDaosActionForm = ({ data, onChange }) => {
|
|
|
5129
5158
|
toRemove: (data.toRemove || []).filter((_, i) => i !== index)
|
|
5130
5159
|
});
|
|
5131
5160
|
};
|
|
5132
|
-
return /* @__PURE__ */ React71.createElement(Stack51, { gap: "md" }, /* @__PURE__ */ React71.createElement(Stack51, { gap: "xs" }, /* @__PURE__ */ React71.createElement(
|
|
5161
|
+
return /* @__PURE__ */ React71.createElement(Stack51, { gap: "md" }, /* @__PURE__ */ React71.createElement(Stack51, { gap: "xs" }, /* @__PURE__ */ React71.createElement(Text38, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "SubDAOs to Add"), (data.toAdd || []).map((subDao, index) => /* @__PURE__ */ React71.createElement(Card7, { key: index, withBorder: true, padding: "xs", style: { backgroundColor: "#2a2a2a", borderColor: "#333" } }, /* @__PURE__ */ React71.createElement(Stack51, { gap: "xs" }, /* @__PURE__ */ React71.createElement(Group16, { justify: "space-between" }, /* @__PURE__ */ React71.createElement(Text38, { size: "sm", style: { color: "#f1f3f5" } }, subDao.addr), /* @__PURE__ */ React71.createElement(Button8, { size: "xs", variant: "subtle", onClick: () => handleRemoveFromAddList(index), style: { color: "#ff6b6b" } }, "Remove")), subDao.charter && /* @__PURE__ */ React71.createElement(Text38, { size: "xs", style: { color: "#adb5bd" } }, "Charter: ", subDao.charter)))), /* @__PURE__ */ React71.createElement(Stack51, { gap: "xs" }, /* @__PURE__ */ React71.createElement(BaseTextInput, { placeholder: "SubDAO Address", value: newSubDao.addr, onChange: (e) => setNewSubDao({ ...newSubDao, addr: e.currentTarget.value }) }), /* @__PURE__ */ React71.createElement(
|
|
5133
5162
|
BaseTextArea,
|
|
5134
5163
|
{
|
|
5135
5164
|
placeholder: "Charter (optional)",
|
|
@@ -5148,7 +5177,7 @@ var ManageSubDaosActionForm = ({ data, onChange }) => {
|
|
|
5148
5177
|
}
|
|
5149
5178
|
},
|
|
5150
5179
|
"Add SubDAO"
|
|
5151
|
-
))), /* @__PURE__ */ React71.createElement(Stack51, { gap: "xs" }, /* @__PURE__ */ React71.createElement(
|
|
5180
|
+
))), /* @__PURE__ */ React71.createElement(Stack51, { gap: "xs" }, /* @__PURE__ */ React71.createElement(Text38, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "SubDAOs to Remove"), (data.toRemove || []).map((subDao, index) => /* @__PURE__ */ React71.createElement(Card7, { key: index, withBorder: true, padding: "xs", style: { backgroundColor: "#2a2a2a", borderColor: "#333" } }, /* @__PURE__ */ React71.createElement(Group16, { justify: "space-between" }, /* @__PURE__ */ React71.createElement(Text38, { size: "sm", style: { color: "#f1f3f5" } }, subDao.address), /* @__PURE__ */ React71.createElement(Button8, { size: "xs", variant: "subtle", onClick: () => handleRemoveFromRemoveList(index), style: { color: "#ff6b6b" } }, "Remove")))), /* @__PURE__ */ React71.createElement(Group16, { grow: true }, /* @__PURE__ */ React71.createElement(BaseTextInput, { placeholder: "SubDAO Address to Remove", value: newRemoveAddress, onChange: (e) => setNewRemoveAddress(e.currentTarget.value) }), /* @__PURE__ */ React71.createElement(
|
|
5152
5181
|
Button8,
|
|
5153
5182
|
{
|
|
5154
5183
|
size: "sm",
|
|
@@ -5255,7 +5284,7 @@ var ManageStorageItemsActionForm = ({ data, onChange }) => {
|
|
|
5255
5284
|
|
|
5256
5285
|
// src/mantine/blocks/proposal/actions-components/forms/DaoAdminExecActionForm.tsx
|
|
5257
5286
|
import React74, { useState as useState18 } from "react";
|
|
5258
|
-
import { Stack as Stack54, Button as Button9, Group as Group18, Text as
|
|
5287
|
+
import { Stack as Stack54, Button as Button9, Group as Group18, Text as Text39, Card as Card8 } from "@mantine/core";
|
|
5259
5288
|
var DaoAdminExecActionForm = ({ data, onChange }) => {
|
|
5260
5289
|
const [newMsg, setNewMsg] = useState18("");
|
|
5261
5290
|
const handleAddMessage = () => {
|
|
@@ -5277,7 +5306,7 @@ var DaoAdminExecActionForm = ({ data, onChange }) => {
|
|
|
5277
5306
|
msgs: (data.msgs || []).filter((_, i) => i !== index)
|
|
5278
5307
|
});
|
|
5279
5308
|
};
|
|
5280
|
-
return /* @__PURE__ */ React74.createElement(Stack54, { gap: "md" }, /* @__PURE__ */ React74.createElement(BaseTextInput, { label: "Core Address", placeholder: "ixo1...", value: data.coreAddress, onChange: (e) => onChange({ ...data, coreAddress: e.currentTarget.value }), required: true }), /* @__PURE__ */ React74.createElement(Stack54, { gap: "xs" }, /* @__PURE__ */ React74.createElement(
|
|
5309
|
+
return /* @__PURE__ */ React74.createElement(Stack54, { gap: "md" }, /* @__PURE__ */ React74.createElement(BaseTextInput, { label: "Core Address", placeholder: "ixo1...", value: data.coreAddress, onChange: (e) => onChange({ ...data, coreAddress: e.currentTarget.value }), required: true }), /* @__PURE__ */ React74.createElement(Stack54, { gap: "xs" }, /* @__PURE__ */ React74.createElement(Text39, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Messages to Execute"), (data.msgs || []).map((msg, index) => /* @__PURE__ */ React74.createElement(Card8, { key: index, withBorder: true, padding: "xs", style: { backgroundColor: "#2a2a2a", borderColor: "#333" } }, /* @__PURE__ */ React74.createElement(Group18, { justify: "space-between" }, /* @__PURE__ */ React74.createElement(Text39, { size: "sm", style: { color: "#f1f3f5" } }, "Message ", index + 1), /* @__PURE__ */ React74.createElement(Button9, { size: "xs", variant: "subtle", onClick: () => handleRemoveMessage(index), style: { color: "#ff6b6b" } }, "Remove")), /* @__PURE__ */ React74.createElement(Text39, { size: "xs", style: { color: "#adb5bd", fontFamily: "monospace" } }, JSON.stringify(msg, null, 2).substring(0, 100), "..."))), /* @__PURE__ */ React74.createElement(
|
|
5281
5310
|
BaseTextArea,
|
|
5282
5311
|
{
|
|
5283
5312
|
placeholder: 'Add cosmos message as JSON:\\n{"bank": {"send": {"to_address": "ixo1...", "amount": [{"denom": "uixo", "amount": "1000"}]}}}',
|
|
@@ -5326,7 +5355,7 @@ var AcceptToMarketplaceActionForm = ({ data, onChange }) => {
|
|
|
5326
5355
|
|
|
5327
5356
|
// src/mantine/blocks/proposal/actions-components/forms/CreateEntityActionForm.tsx
|
|
5328
5357
|
import React76 from "react";
|
|
5329
|
-
import { Stack as Stack56, Alert as Alert6, Text as
|
|
5358
|
+
import { Stack as Stack56, Alert as Alert6, Text as Text40 } from "@mantine/core";
|
|
5330
5359
|
var CreateEntityActionForm = ({ data, onChange }) => {
|
|
5331
5360
|
const handleJsonChange = (value) => {
|
|
5332
5361
|
try {
|
|
@@ -5335,7 +5364,7 @@ var CreateEntityActionForm = ({ data, onChange }) => {
|
|
|
5335
5364
|
} catch {
|
|
5336
5365
|
}
|
|
5337
5366
|
};
|
|
5338
|
-
return /* @__PURE__ */ React76.createElement(Stack56, { gap: "md" }, /* @__PURE__ */ React76.createElement(Alert6, { color: "blue", style: { backgroundColor: "#2a2a2a", borderColor: "rgba(0, 255, 157, 1)" } }, /* @__PURE__ */ React76.createElement(
|
|
5367
|
+
return /* @__PURE__ */ React76.createElement(Stack56, { gap: "md" }, /* @__PURE__ */ React76.createElement(Alert6, { color: "blue", style: { backgroundColor: "#2a2a2a", borderColor: "rgba(0, 255, 157, 1)" } }, /* @__PURE__ */ React76.createElement(Text40, { size: "sm", style: { color: "rgba(0, 255, 157, 1)" } }, "This is a complex entity creation action. Please provide the complete entity data as JSON.")), /* @__PURE__ */ React76.createElement(
|
|
5339
5368
|
BaseTextArea,
|
|
5340
5369
|
{
|
|
5341
5370
|
label: "Entity Data (JSON)",
|
|
@@ -6413,7 +6442,7 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
|
|
|
6413
6442
|
};
|
|
6414
6443
|
const renderActionForm = () => {
|
|
6415
6444
|
if (!currentActionConfig) {
|
|
6416
|
-
return /* @__PURE__ */ React85.createElement(Alert7, { color: "red", style: { backgroundColor: "#2a2a2a", borderColor: "#ff6b6b" } }, /* @__PURE__ */ React85.createElement(
|
|
6445
|
+
return /* @__PURE__ */ React85.createElement(Alert7, { color: "red", style: { backgroundColor: "#2a2a2a", borderColor: "#ff6b6b" } }, /* @__PURE__ */ React85.createElement(Text41, { size: "sm", style: { color: "#ff6b6b" } }, "Unknown action type selected"));
|
|
6417
6446
|
}
|
|
6418
6447
|
const FormComponent = currentActionConfig.FormComponent;
|
|
6419
6448
|
return /* @__PURE__ */ React85.createElement(FormComponent, { data: actionData, onChange: setActionData, isTemplateMode });
|
|
@@ -6431,7 +6460,7 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
|
|
|
6431
6460
|
};
|
|
6432
6461
|
return colors[category] || "#6b7280";
|
|
6433
6462
|
};
|
|
6434
|
-
return /* @__PURE__ */ React85.createElement(Stack65, { style: { backgroundColor: "#1a1a1a", color: "#f1f3f5", height: "100%" } }, /* @__PURE__ */ React85.createElement(
|
|
6463
|
+
return /* @__PURE__ */ React85.createElement(Stack65, { style: { backgroundColor: "#1a1a1a", color: "#f1f3f5", height: "100%" } }, /* @__PURE__ */ React85.createElement(Text41, { fw: 600, style: { color: "#f1f3f5" } }, isEditing ? "Edit Action" : "Add New Action"), !isEditing ? /* @__PURE__ */ React85.createElement(Stack65, { gap: "md" }, /* @__PURE__ */ React85.createElement(Text41, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Select Action Type"), /* @__PURE__ */ React85.createElement(
|
|
6435
6464
|
Tabs2,
|
|
6436
6465
|
{
|
|
6437
6466
|
defaultValue: ACTION_CATEGORIES[0].id,
|
|
@@ -6454,7 +6483,7 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
|
|
|
6454
6483
|
},
|
|
6455
6484
|
/* @__PURE__ */ React85.createElement(Tabs2.List, null, ACTION_CATEGORIES.map((category) => /* @__PURE__ */ React85.createElement(Tabs2.Tab, { key: category.id, value: category.id }, /* @__PURE__ */ React85.createElement(Group20, { gap: "xs" }, /* @__PURE__ */ React85.createElement("span", null, category.icon), /* @__PURE__ */ React85.createElement("span", null, category.label))))),
|
|
6456
6485
|
ACTION_CATEGORIES.map((category) => /* @__PURE__ */ React85.createElement(Tabs2.Panel, { key: category.id, value: category.id, mt: 10 }, /* @__PURE__ */ React85.createElement(SimpleGrid, { cols: 2, spacing: "xs" }, (categorizedActions.get(category.id) || []).map((config) => /* @__PURE__ */ React85.createElement(
|
|
6457
|
-
|
|
6486
|
+
Paper4,
|
|
6458
6487
|
{
|
|
6459
6488
|
key: config.value,
|
|
6460
6489
|
withBorder: true,
|
|
@@ -6467,7 +6496,7 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
|
|
|
6467
6496
|
},
|
|
6468
6497
|
onClick: () => setSelectedActionType(config.value)
|
|
6469
6498
|
},
|
|
6470
|
-
/* @__PURE__ */ React85.createElement(Stack65, { gap: "xs" }, /* @__PURE__ */ React85.createElement(Group20, { justify: "space-between" }, /* @__PURE__ */ React85.createElement(
|
|
6499
|
+
/* @__PURE__ */ React85.createElement(Stack65, { gap: "xs" }, /* @__PURE__ */ React85.createElement(Group20, { justify: "space-between" }, /* @__PURE__ */ React85.createElement(Text41, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, config.label), selectedActionType === config.value && /* @__PURE__ */ React85.createElement(Badge7, { size: "xs", style: { backgroundColor: "rgba(0, 255, 157, 1)" } }, "Selected")), config.description && /* @__PURE__ */ React85.createElement(Text41, { size: "xs", style: { color: "#adb5bd" } }, config.description))
|
|
6471
6500
|
)))))
|
|
6472
6501
|
)) : /* @__PURE__ */ React85.createElement(
|
|
6473
6502
|
Card9,
|
|
@@ -6489,8 +6518,8 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
|
|
|
6489
6518
|
}
|
|
6490
6519
|
},
|
|
6491
6520
|
currentActionConfig?.label || selectedActionType
|
|
6492
|
-
), /* @__PURE__ */ React85.createElement(
|
|
6493
|
-
), /* @__PURE__ */ React85.createElement(Divider4, { color: "#333" }), /* @__PURE__ */ React85.createElement(ScrollArea3, { style: { flex: 1 } }, renderActionForm()), /* @__PURE__ */ React85.createElement(Divider4, { color: "#333" }), /* @__PURE__ */ React85.createElement(Stack65, { gap: "xs" }, /* @__PURE__ */ React85.createElement(
|
|
6521
|
+
), /* @__PURE__ */ React85.createElement(Text41, { size: "sm", style: { color: "#adb5bd" } }, "(Editing)")))
|
|
6522
|
+
), /* @__PURE__ */ React85.createElement(Divider4, { color: "#333" }), /* @__PURE__ */ React85.createElement(ScrollArea3, { style: { flex: 1 } }, renderActionForm()), /* @__PURE__ */ React85.createElement(Divider4, { color: "#333" }), /* @__PURE__ */ React85.createElement(Stack65, { gap: "xs" }, /* @__PURE__ */ React85.createElement(Text41, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Current Actions (", actions.length, ")"), /* @__PURE__ */ React85.createElement(ScrollArea3, { h: 100 }, /* @__PURE__ */ React85.createElement(Stack65, { gap: "xs" }, actions.map((action, index) => {
|
|
6494
6523
|
const config = getActionConfig(action.type);
|
|
6495
6524
|
return /* @__PURE__ */ React85.createElement(
|
|
6496
6525
|
Card9,
|
|
@@ -6515,7 +6544,7 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
|
|
|
6515
6544
|
}
|
|
6516
6545
|
},
|
|
6517
6546
|
config?.label || action.type
|
|
6518
|
-
), /* @__PURE__ */ React85.createElement(
|
|
6547
|
+
), /* @__PURE__ */ React85.createElement(Text41, { size: "sm", style: { color: "#adb5bd" } }, config?.getSummary(action.data) || "Action"), index === editingIndex && /* @__PURE__ */ React85.createElement(Badge7, { size: "xs", style: { backgroundColor: "rgba(0, 255, 157, 1)", color: "#fff" } }, "Editing"))
|
|
6519
6548
|
);
|
|
6520
6549
|
})))), /* @__PURE__ */ React85.createElement(Group20, { justify: "flex-end", mt: "md" }, /* @__PURE__ */ React85.createElement(
|
|
6521
6550
|
Button10,
|
|
@@ -6683,13 +6712,13 @@ var TemplateConfig3 = ({ editor, block }) => {
|
|
|
6683
6712
|
};
|
|
6684
6713
|
|
|
6685
6714
|
// src/mantine/blocks/proposal/template/TemplateView.tsx
|
|
6686
|
-
import { Group as Group21, Stack as Stack68, Text as
|
|
6715
|
+
import { Group as Group21, Stack as Stack68, Text as Text42 } from "@mantine/core";
|
|
6687
6716
|
var PROPOSAL_TEMPLATE_PANEL_ID = "proposal-template-panel";
|
|
6688
6717
|
var ProposalTemplateView = ({ editor, block }) => {
|
|
6689
6718
|
const panelId = `${PROPOSAL_TEMPLATE_PANEL_ID}-${block.id}`;
|
|
6690
6719
|
const panelContent = useMemo10(() => /* @__PURE__ */ React89.createElement(TemplateConfig3, { editor, block }), [editor, block]);
|
|
6691
6720
|
const { open } = usePanel(panelId, panelContent);
|
|
6692
|
-
return /* @__PURE__ */ React89.createElement(BaseContainer, { onClick: open }, /* @__PURE__ */ React89.createElement(Group21, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React89.createElement(Group21, { wrap: "nowrap", align: "center" }, getIcon("file-text", block.props.icon), /* @__PURE__ */ React89.createElement(Stack68, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React89.createElement(
|
|
6721
|
+
return /* @__PURE__ */ React89.createElement(BaseContainer, { onClick: open }, /* @__PURE__ */ React89.createElement(Group21, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React89.createElement(Group21, { wrap: "nowrap", align: "center" }, getIcon("file-text", block.props.icon), /* @__PURE__ */ React89.createElement(Stack68, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React89.createElement(Text42, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Proposal Title"), /* @__PURE__ */ React89.createElement(Text42, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description || "Proposal description"))), /* @__PURE__ */ React89.createElement(Text42, { size: "xs", c: "dimmed", contentEditable: false }, block.props.status || "draft")));
|
|
6693
6722
|
};
|
|
6694
6723
|
|
|
6695
6724
|
// src/mantine/blocks/proposal/flow/FlowView.tsx
|
|
@@ -6697,7 +6726,7 @@ import React94, { useMemo as useMemo11 } from "react";
|
|
|
6697
6726
|
|
|
6698
6727
|
// src/mantine/blocks/proposal/components/OnChainProposalCard.tsx
|
|
6699
6728
|
import React90 from "react";
|
|
6700
|
-
import { Card as Card11, Group as Group22, Stack as Stack69, Text as
|
|
6729
|
+
import { Card as Card11, Group as Group22, Stack as Stack69, Text as Text43, Skeleton, Badge as Badge8, Button as Button11 } from "@mantine/core";
|
|
6701
6730
|
var statusColor = {
|
|
6702
6731
|
open: "#4dabf7",
|
|
6703
6732
|
passed: "#51cf66",
|
|
@@ -6740,8 +6769,8 @@ var OnChainProposalCard = ({
|
|
|
6740
6769
|
onClick
|
|
6741
6770
|
},
|
|
6742
6771
|
isFetching && /* @__PURE__ */ React90.createElement(Stack69, null, /* @__PURE__ */ React90.createElement(Skeleton, { height: 20, width: "70%" }), /* @__PURE__ */ React90.createElement(Skeleton, { height: 16 }), /* @__PURE__ */ React90.createElement(Skeleton, { height: 16, width: "40%" })),
|
|
6743
|
-
error && /* @__PURE__ */ React90.createElement(
|
|
6744
|
-
!isFetching && /* @__PURE__ */ React90.createElement(Group22, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React90.createElement(Group22, { align: "flex-start", gap: "md", style: { flex: 1 } }, getIcon("file-text", icon), /* @__PURE__ */ React90.createElement(Stack69, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React90.createElement(Group22, { gap: "xs" }, /* @__PURE__ */ React90.createElement(
|
|
6772
|
+
error && /* @__PURE__ */ React90.createElement(Text43, { size: "sm", c: "red" }, typeof error === "string" ? error : error.message || "An error occurred while loading the proposal."),
|
|
6773
|
+
!isFetching && /* @__PURE__ */ React90.createElement(Group22, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React90.createElement(Group22, { align: "flex-start", gap: "md", style: { flex: 1 } }, getIcon("file-text", icon), /* @__PURE__ */ React90.createElement(Stack69, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React90.createElement(Group22, { gap: "xs" }, /* @__PURE__ */ React90.createElement(Text43, { size: "md", fw: 600 }, title || "Proposal"), /* @__PURE__ */ React90.createElement(Badge8, { color: statusColor[status], variant: "filled", size: "sm", radius: "sm" }, status.replace(/_/g, " ").toUpperCase())), /* @__PURE__ */ React90.createElement(Text43, { size: "sm", c: "dimmed" }, getDisplayDescription(description)))), /* @__PURE__ */ React90.createElement(Group22, { gap: "xs" }, voteEnabled && onVote && status === "open" && /* @__PURE__ */ React90.createElement(
|
|
6745
6774
|
Button11,
|
|
6746
6775
|
{
|
|
6747
6776
|
size: "sm",
|
|
@@ -6774,7 +6803,7 @@ var OnChainProposalCard = ({
|
|
|
6774
6803
|
|
|
6775
6804
|
// src/mantine/blocks/proposal/flow/FlowConfig.tsx
|
|
6776
6805
|
import React93, { useCallback as useCallback14, useState as useState25, useEffect as useEffect16 } from "react";
|
|
6777
|
-
import { Stack as Stack72, Button as Button14, Text as
|
|
6806
|
+
import { Stack as Stack72, Button as Button14, Text as Text46, Card as Card14, Loader as Loader5, SegmentedControl as SegmentedControl5 } from "@mantine/core";
|
|
6778
6807
|
|
|
6779
6808
|
// src/mantine/blocks/proposal/flow/useFlowBusinessLogic.ts
|
|
6780
6809
|
import { useEffect as useEffect13, useState as useState21 } from "react";
|
|
@@ -7003,7 +7032,7 @@ var useVoteBusinessLogic = ({ block }) => {
|
|
|
7003
7032
|
|
|
7004
7033
|
// src/mantine/blocks/proposal/flow/VoteGeneralTab.tsx
|
|
7005
7034
|
import React91, { useState as useState23 } from "react";
|
|
7006
|
-
import { Stack as Stack70, Text as
|
|
7035
|
+
import { Stack as Stack70, Text as Text44, Group as Group23, Card as Card12, Button as Button12, Progress as Progress2, Box as Box22, Tooltip as Tooltip6 } from "@mantine/core";
|
|
7007
7036
|
var getVoteIcon = (voteType) => {
|
|
7008
7037
|
switch (voteType) {
|
|
7009
7038
|
case "yes":
|
|
@@ -7066,8 +7095,8 @@ var FlowGeneralTab = ({
|
|
|
7066
7095
|
borderRadius: "50%"
|
|
7067
7096
|
}
|
|
7068
7097
|
}
|
|
7069
|
-
), /* @__PURE__ */ React91.createElement(
|
|
7070
|
-
/* @__PURE__ */ React91.createElement(
|
|
7098
|
+
), /* @__PURE__ */ React91.createElement(Text44, { size: "sm", fw: 500, style: { color: "#ffd43b" } }, "Waiting for Proposal Submission")),
|
|
7099
|
+
/* @__PURE__ */ React91.createElement(Text44, { size: "xs", style: { color: "#adb5bd", marginTop: 4 } }, "The connected proposal needs to be submitted before voting can begin.")
|
|
7071
7100
|
), /* @__PURE__ */ React91.createElement(
|
|
7072
7101
|
Card12,
|
|
7073
7102
|
{
|
|
@@ -7090,8 +7119,8 @@ var FlowGeneralTab = ({
|
|
|
7090
7119
|
borderRadius: "50%"
|
|
7091
7120
|
}
|
|
7092
7121
|
}
|
|
7093
|
-
), /* @__PURE__ */ React91.createElement(
|
|
7094
|
-
|
|
7122
|
+
), /* @__PURE__ */ React91.createElement(Text44, { size: "sm", style: { color: "#adb5bd" } }, "Status")), /* @__PURE__ */ React91.createElement(Text44, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, hasSubmittedProposal ? proposalStatus === "open" ? "Active" : proposalStatus || "Active" : "Waiting")), /* @__PURE__ */ React91.createElement(Group23, { justify: "space-between" }, /* @__PURE__ */ React91.createElement(Group23, { gap: "xs" }, /* @__PURE__ */ React91.createElement(Box22, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React91.createElement(Text44, { size: "sm", style: { color: "#adb5bd" } }, "Proposal ID")), /* @__PURE__ */ React91.createElement(Text44, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, hasSubmittedProposal ? `#${proposalId}` : "TBD")), /* @__PURE__ */ React91.createElement(Group23, { justify: "space-between" }, /* @__PURE__ */ React91.createElement(Group23, { gap: "xs" }, /* @__PURE__ */ React91.createElement(Box22, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React91.createElement(Text44, { size: "sm", style: { color: "#adb5bd" } }, "Title")), /* @__PURE__ */ React91.createElement(
|
|
7123
|
+
Text44,
|
|
7095
7124
|
{
|
|
7096
7125
|
size: "sm",
|
|
7097
7126
|
fw: 500,
|
|
@@ -7100,8 +7129,8 @@ var FlowGeneralTab = ({
|
|
|
7100
7129
|
}
|
|
7101
7130
|
},
|
|
7102
7131
|
hasSubmittedProposal ? proposalTitle || "Untitled" : "N/A"
|
|
7103
|
-
)), /* @__PURE__ */ React91.createElement(Group23, { justify: "space-between" }, /* @__PURE__ */ React91.createElement(Group23, { gap: "xs" }, /* @__PURE__ */ React91.createElement(Box22, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React91.createElement(
|
|
7104
|
-
/* @__PURE__ */ React91.createElement(Stack70, { gap: "xs" }, /* @__PURE__ */ React91.createElement(
|
|
7132
|
+
)), /* @__PURE__ */ React91.createElement(Group23, { justify: "space-between" }, /* @__PURE__ */ React91.createElement(Group23, { gap: "xs" }, /* @__PURE__ */ React91.createElement(Box22, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React91.createElement(Text44, { size: "sm", style: { color: "#adb5bd" } }, "Description")), /* @__PURE__ */ React91.createElement(Text44, { size: "sm", fw: 500, style: { color: "#f1f3f5" }, title: proposalDescription }, hasSubmittedProposal ? proposalDescription ? proposalDescription.length > 30 ? proposalDescription.substring(0, 30) + "..." : proposalDescription : "No description" : "N/A")), /* @__PURE__ */ React91.createElement(Group23, { justify: "space-between" }, /* @__PURE__ */ React91.createElement(Group23, { gap: "xs" }, /* @__PURE__ */ React91.createElement(Box22, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React91.createElement(Text44, { size: "sm", style: { color: "#adb5bd" } }, "My Vote")), /* @__PURE__ */ React91.createElement(Text44, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, hasSubmittedProposal ? userVote?.vote ? userVote.vote.vote : "Pending" : "N/A"))),
|
|
7133
|
+
/* @__PURE__ */ React91.createElement(Stack70, { gap: "xs" }, /* @__PURE__ */ React91.createElement(Text44, { size: "sm", style: { color: "#adb5bd" } }, hasSubmittedProposal ? "Voting is open" : "Voting pending"), /* @__PURE__ */ React91.createElement(
|
|
7105
7134
|
Progress2,
|
|
7106
7135
|
{
|
|
7107
7136
|
value: hasSubmittedProposal ? 75 : 0,
|
|
@@ -7135,7 +7164,7 @@ var FlowGeneralTab = ({
|
|
|
7135
7164
|
borderRadius: "50%"
|
|
7136
7165
|
}
|
|
7137
7166
|
}
|
|
7138
|
-
), /* @__PURE__ */ React91.createElement(
|
|
7167
|
+
), /* @__PURE__ */ React91.createElement(Text44, { size: "sm", fw: 500, style: { color: "#ffd43b" } }, isDisabled.message))
|
|
7139
7168
|
), /* @__PURE__ */ React91.createElement(Stack70, { gap: "md" }, ["yes", "no", "no_with_veto", "abstain"].map((voteType) => /* @__PURE__ */ React91.createElement(Tooltip6, { key: voteType, label: disabled ? isDisabled?.message : void 0, disabled: !disabled, position: "top" }, /* @__PURE__ */ React91.createElement(
|
|
7140
7169
|
Button12,
|
|
7141
7170
|
{
|
|
@@ -7155,7 +7184,7 @@ var FlowGeneralTab = ({
|
|
|
7155
7184
|
opacity: disabled ? 0.5 : 1
|
|
7156
7185
|
}
|
|
7157
7186
|
},
|
|
7158
|
-
/* @__PURE__ */ React91.createElement(
|
|
7187
|
+
/* @__PURE__ */ React91.createElement(Text44, { fw: 500, tt: "capitalize", style: { textAlign: "left" } }, voteType === "no_with_veto" ? "No with Veto" : voteType)
|
|
7159
7188
|
)))), /* @__PURE__ */ React91.createElement(
|
|
7160
7189
|
BaseTextArea,
|
|
7161
7190
|
{
|
|
@@ -7176,7 +7205,7 @@ var FlowGeneralTab = ({
|
|
|
7176
7205
|
border: "1px solid #333"
|
|
7177
7206
|
}
|
|
7178
7207
|
},
|
|
7179
|
-
/* @__PURE__ */ React91.createElement(Stack70, { gap: "xs" }, /* @__PURE__ */ React91.createElement(
|
|
7208
|
+
/* @__PURE__ */ React91.createElement(Stack70, { gap: "xs" }, /* @__PURE__ */ React91.createElement(Text44, { fw: 500, size: "sm", style: { color: "#f1f3f5" } }, "Proposal Executed"), /* @__PURE__ */ React91.createElement(Text44, { size: "sm", style: { color: "#adb5bd" } }, "This proposal has been successfully executed."))
|
|
7180
7209
|
), !hasSubmittedProposal && /* @__PURE__ */ React91.createElement(Stack70, { gap: "lg" }, /* @__PURE__ */ React91.createElement(Stack70, { gap: "md" }, ["yes", "no", "no_with_veto", "abstain"].map((voteType) => /* @__PURE__ */ React91.createElement(Tooltip6, { key: voteType, label: "Proposal must be submitted before voting", position: "top" }, /* @__PURE__ */ React91.createElement(
|
|
7181
7210
|
Button12,
|
|
7182
7211
|
{
|
|
@@ -7194,7 +7223,7 @@ var FlowGeneralTab = ({
|
|
|
7194
7223
|
opacity: 0.5
|
|
7195
7224
|
}
|
|
7196
7225
|
},
|
|
7197
|
-
/* @__PURE__ */ React91.createElement(
|
|
7226
|
+
/* @__PURE__ */ React91.createElement(Text44, { fw: 500, tt: "capitalize", style: { textAlign: "left" } }, voteType === "no_with_veto" ? "No with Veto" : voteType)
|
|
7198
7227
|
))))), hasSubmittedProposal && !hasVoted && selectedVote && (status === "open" || proposalStatus === "open") && /* @__PURE__ */ React91.createElement(Tooltip6, { label: disabled ? isDisabled?.message : "Sign to vote", position: "top" }, /* @__PURE__ */ React91.createElement("div", null, /* @__PURE__ */ React91.createElement(
|
|
7199
7228
|
Button12,
|
|
7200
7229
|
{
|
|
@@ -7232,13 +7261,13 @@ var FlowGeneralTab = ({
|
|
|
7232
7261
|
borderRadius: "50%"
|
|
7233
7262
|
}
|
|
7234
7263
|
}
|
|
7235
|
-
), /* @__PURE__ */ React91.createElement(
|
|
7264
|
+
), /* @__PURE__ */ React91.createElement(Text44, { size: "sm", fw: 500, style: { color: "#51cf66" } }, "Vote Submitted")), /* @__PURE__ */ React91.createElement(Text44, { size: "xs", style: { color: "#adb5bd" } }, "You have already voted on this proposal. Your vote:", " ", /* @__PURE__ */ React91.createElement(Text44, { span: true, fw: 500, tt: "capitalize" }, userVote?.vote?.vote)))
|
|
7236
7265
|
));
|
|
7237
7266
|
};
|
|
7238
7267
|
|
|
7239
7268
|
// src/mantine/blocks/proposal/flow/ActionsTab.tsx
|
|
7240
7269
|
import React92, { useCallback as useCallback13, useEffect as useEffect15, useState as useState24 } from "react";
|
|
7241
|
-
import { Alert as Alert8, Button as Button13, Card as Card13, Stack as Stack71, Text as
|
|
7270
|
+
import { Alert as Alert8, Button as Button13, Card as Card13, Stack as Stack71, Text as Text45 } from "@mantine/core";
|
|
7242
7271
|
var ActionsTab2 = ({ actions, onActionsChange, isProposalCreated }) => {
|
|
7243
7272
|
const [isEditorVisible, setIsEditorVisible] = useState24(false);
|
|
7244
7273
|
const [editingIndex, setEditingIndex] = useState24(null);
|
|
@@ -7296,7 +7325,7 @@ var ActionsTab2 = ({ actions, onActionsChange, isProposalCreated }) => {
|
|
|
7296
7325
|
setIsEditorVisible(false);
|
|
7297
7326
|
setEditingIndex(null);
|
|
7298
7327
|
}, []);
|
|
7299
|
-
return /* @__PURE__ */ React92.createElement(Stack71, { gap: "md" }, isProposalCreated && /* @__PURE__ */ React92.createElement(Alert8, { color: "yellow", title: "Actions Locked" }, /* @__PURE__ */ React92.createElement(
|
|
7328
|
+
return /* @__PURE__ */ React92.createElement(Stack71, { gap: "md" }, isProposalCreated && /* @__PURE__ */ React92.createElement(Alert8, { color: "yellow", title: "Actions Locked" }, /* @__PURE__ */ React92.createElement(Text45, { size: "sm" }, "Actions cannot be edited after the proposal has been created. These actions are now part of the on-chain proposal.")), /* @__PURE__ */ React92.createElement(Stack71, { gap: "sm" }, !isProposalCreated && /* @__PURE__ */ React92.createElement(
|
|
7300
7329
|
Button13,
|
|
7301
7330
|
{
|
|
7302
7331
|
onClick: handleAddAction,
|
|
@@ -7415,7 +7444,7 @@ var FlowConfig = ({ editor, block }) => {
|
|
|
7415
7444
|
setIsCreating(false);
|
|
7416
7445
|
}
|
|
7417
7446
|
};
|
|
7418
|
-
const createProposalTab = /* @__PURE__ */ React93.createElement(Stack72, { gap: "lg" }, /* @__PURE__ */ React93.createElement(Stack72, { gap: "xs" }, /* @__PURE__ */ React93.createElement(
|
|
7447
|
+
const createProposalTab = /* @__PURE__ */ React93.createElement(Stack72, { gap: "lg" }, /* @__PURE__ */ React93.createElement(Stack72, { gap: "xs" }, /* @__PURE__ */ React93.createElement(Text46, { size: "sm", fw: 600 }, "DAO Group"), /* @__PURE__ */ React93.createElement(
|
|
7419
7448
|
SegmentedControl5,
|
|
7420
7449
|
{
|
|
7421
7450
|
value: inputMode,
|
|
@@ -7460,7 +7489,7 @@ var FlowConfig = ({ editor, block }) => {
|
|
|
7460
7489
|
},
|
|
7461
7490
|
disabled: isProposalCreated
|
|
7462
7491
|
}
|
|
7463
|
-
), coreAddress && /* @__PURE__ */ React93.createElement(Card14, { padding: "sm", radius: "md", withBorder: true }, /* @__PURE__ */ React93.createElement(
|
|
7492
|
+
), coreAddress && /* @__PURE__ */ React93.createElement(Card14, { padding: "sm", radius: "md", withBorder: true }, /* @__PURE__ */ React93.createElement(Text46, { size: "xs", c: "dimmed" }, "Core Address:", " ", /* @__PURE__ */ React93.createElement(Text46, { span: true, ff: "monospace", c: "bright" }, coreAddress.slice(0, 20), "...", coreAddress.slice(-10))))), /* @__PURE__ */ React93.createElement(
|
|
7464
7493
|
BaseTextInput,
|
|
7465
7494
|
{
|
|
7466
7495
|
label: "Title",
|
|
@@ -7483,7 +7512,7 @@ var FlowConfig = ({ editor, block }) => {
|
|
|
7483
7512
|
required: true,
|
|
7484
7513
|
disabled: isProposalCreated
|
|
7485
7514
|
}
|
|
7486
|
-
), errors.general && /* @__PURE__ */ React93.createElement(
|
|
7515
|
+
), errors.general && /* @__PURE__ */ React93.createElement(Text46, { size: "sm", c: "red" }, errors.general), isProposalCreated && /* @__PURE__ */ React93.createElement(Card14, { padding: "md", radius: "md", withBorder: true, style: { borderColor: "var(--mantine-color-green-6)" } }, /* @__PURE__ */ React93.createElement(Text46, { fw: 500, size: "sm", c: "green" }, "Proposal Created Successfully"), /* @__PURE__ */ React93.createElement(Text46, { size: "sm", c: "dimmed" }, "Your proposal has been created and is now open for voting.")), /* @__PURE__ */ React93.createElement(Button14, { fullWidth: true, onClick: handleCreateProposal, disabled: isProposalCreated, loading: isCreating }, isProposalCreated ? "Proposal Created" : "Create Proposal"));
|
|
7487
7516
|
const handleActionsChange = useCallback14(
|
|
7488
7517
|
(newActions) => {
|
|
7489
7518
|
updateProp("actions", JSON.stringify(newActions));
|
|
@@ -7630,12 +7659,12 @@ var ProposalBlockSpec = createReactBlockSpec4(
|
|
|
7630
7659
|
|
|
7631
7660
|
// src/mantine/components/AuthorizationTab.tsx
|
|
7632
7661
|
import React98, { useMemo as useMemo12, useState as useState27, useEffect as useEffect17, useCallback as useCallback16 } from "react";
|
|
7633
|
-
import { Stack as Stack74, TextInput as TextInput3, Text as
|
|
7662
|
+
import { Stack as Stack74, TextInput as TextInput3, Text as Text48, Badge as Badge10, Group as Group25, Switch as Switch4, Select as Select2, Divider as Divider6, Radio as Radio5, Paper as Paper6, Button as Button16, ActionIcon as ActionIcon7, Alert as Alert10 } from "@mantine/core";
|
|
7634
7663
|
import { IconPlus as IconPlus2, IconX as IconX2, IconUsers, IconShieldPlus as IconShieldPlus2, IconShieldCheck, IconTrash, IconUser as IconUser3, IconRobot as IconRobot2, IconKey } from "@tabler/icons-react";
|
|
7635
7664
|
|
|
7636
7665
|
// src/mantine/components/GrantPermissionPanel.tsx
|
|
7637
7666
|
import React97, { useState as useState26, useCallback as useCallback15 } from "react";
|
|
7638
|
-
import { Stack as Stack73, Text as
|
|
7667
|
+
import { Stack as Stack73, Text as Text47, TextInput as TextInput2, Button as Button15, Group as Group24, Radio as Radio4, Checkbox as Checkbox10, Alert as Alert9, Paper as Paper5, Loader as Loader6, Badge as Badge9, ActionIcon as ActionIcon6, Divider as Divider5, NumberInput as NumberInput2, Title as Title3 } from "@mantine/core";
|
|
7639
7668
|
import { IconSearch as IconSearch2, IconUser as IconUser2, IconRobot, IconX, IconShieldPlus, IconArrowLeft } from "@tabler/icons-react";
|
|
7640
7669
|
var GrantPermissionPanel = ({ onBack, flowUri, blocks, targetBlockId, searchUsers, getOracles, onGrant }) => {
|
|
7641
7670
|
const singleBlockMode = !!targetBlockId || blocks.length === 1;
|
|
@@ -7742,7 +7771,7 @@ var GrantPermissionPanel = ({ onBack, flowUri, blocks, targetBlockId, searchUser
|
|
|
7742
7771
|
onBack();
|
|
7743
7772
|
}
|
|
7744
7773
|
};
|
|
7745
|
-
return /* @__PURE__ */ React97.createElement(Stack73, { gap: "md" }, /* @__PURE__ */ React97.createElement(Group24, { gap: "xs" }, /* @__PURE__ */ React97.createElement(
|
|
7774
|
+
return /* @__PURE__ */ React97.createElement(Stack73, { gap: "md" }, /* @__PURE__ */ React97.createElement(Group24, { gap: "xs" }, /* @__PURE__ */ React97.createElement(ActionIcon6, { variant: "subtle", onClick: handleBack, disabled: loading }, /* @__PURE__ */ React97.createElement(IconArrowLeft, { size: 20 })), /* @__PURE__ */ React97.createElement(IconShieldPlus, { size: 20 }), /* @__PURE__ */ React97.createElement(Title3, { order: 5 }, "Grant Permission")), /* @__PURE__ */ React97.createElement(Stack73, { gap: "xs" }, /* @__PURE__ */ React97.createElement(Text47, { size: "sm", fw: 500 }, "Recipient Type"), /* @__PURE__ */ React97.createElement(
|
|
7746
7775
|
Radio4.Group,
|
|
7747
7776
|
{
|
|
7748
7777
|
value: recipientType,
|
|
@@ -7763,12 +7792,12 @@ var GrantPermissionPanel = ({ onBack, flowUri, blocks, targetBlockId, searchUser
|
|
|
7763
7792
|
onChange: (e) => setSearchQuery(e.currentTarget.value),
|
|
7764
7793
|
onKeyDown: (e) => e.key === "Enter" && handleSearch()
|
|
7765
7794
|
}
|
|
7766
|
-
), selectedRecipient ? /* @__PURE__ */ React97.createElement(
|
|
7795
|
+
), selectedRecipient ? /* @__PURE__ */ React97.createElement(Paper5, { p: "sm", withBorder: true }, /* @__PURE__ */ React97.createElement(Group24, { justify: "space-between" }, /* @__PURE__ */ React97.createElement(Group24, { gap: "xs" }, recipientType === "oracle" ? /* @__PURE__ */ React97.createElement(IconRobot, { size: 16 }) : /* @__PURE__ */ React97.createElement(IconUser2, { size: 16 }), /* @__PURE__ */ React97.createElement(Text47, { size: "sm" }, selectedRecipient.displayName), /* @__PURE__ */ React97.createElement(Badge9, { size: "xs", variant: "light" }, selectedRecipient.did.slice(-12))), /* @__PURE__ */ React97.createElement(ActionIcon6, { size: "sm", variant: "subtle", onClick: () => setSelectedRecipient(null) }, /* @__PURE__ */ React97.createElement(IconX, { size: 14 })))) : searchResults.length > 0 ? /* @__PURE__ */ React97.createElement(Paper5, { p: "xs", withBorder: true, style: { maxHeight: 150, overflow: "auto" } }, /* @__PURE__ */ React97.createElement(Stack73, { gap: 4 }, searchResults.map((result) => /* @__PURE__ */ React97.createElement(Button15, { key: result.did, variant: "subtle", size: "sm", justify: "flex-start", onClick: () => setSelectedRecipient(result) }, result.displayName)))) : null) : /* @__PURE__ */ React97.createElement(TextInput2, { label: "Recipient DID", placeholder: "did:ixo:...", value: manualDid, onChange: (e) => setManualDid(e.currentTarget.value) }), /* @__PURE__ */ React97.createElement(Divider5, null), /* @__PURE__ */ React97.createElement(Stack73, { gap: "xs" }, /* @__PURE__ */ React97.createElement(Text47, { size: "sm", fw: 500 }, "Permission Scope"), singleBlockMode && fixedBlock ? (
|
|
7767
7796
|
// Single block mode: show fixed block info
|
|
7768
|
-
/* @__PURE__ */ React97.createElement(
|
|
7797
|
+
/* @__PURE__ */ React97.createElement(Paper5, { p: "sm", withBorder: true }, /* @__PURE__ */ React97.createElement(Group24, { gap: "xs" }, /* @__PURE__ */ React97.createElement(Badge9, { variant: "light", color: "blue" }, fixedBlock.type), /* @__PURE__ */ React97.createElement(Text47, { size: "sm" }, fixedBlock.name || `Block ${fixedBlock.id.slice(-8)}`)), /* @__PURE__ */ React97.createElement(Text47, { size: "xs", c: "dimmed", mt: "xs" }, "Permission will be granted to execute this specific block."))
|
|
7769
7798
|
) : (
|
|
7770
7799
|
// Multi-block mode: show scope selection
|
|
7771
|
-
/* @__PURE__ */ React97.createElement(React97.Fragment, null, /* @__PURE__ */ React97.createElement(Radio4.Group, { value: scopeType, onChange: (v) => setScopeType(v) }, /* @__PURE__ */ React97.createElement(Stack73, { gap: "xs" }, /* @__PURE__ */ React97.createElement(Radio4, { value: "full", label: "Full flow access (can execute any block)" }), /* @__PURE__ */ React97.createElement(Radio4, { value: "blocks", label: "Specific blocks only" }))), scopeType === "blocks" && /* @__PURE__ */ React97.createElement(
|
|
7800
|
+
/* @__PURE__ */ React97.createElement(React97.Fragment, null, /* @__PURE__ */ React97.createElement(Radio4.Group, { value: scopeType, onChange: (v) => setScopeType(v) }, /* @__PURE__ */ React97.createElement(Stack73, { gap: "xs" }, /* @__PURE__ */ React97.createElement(Radio4, { value: "full", label: "Full flow access (can execute any block)" }), /* @__PURE__ */ React97.createElement(Radio4, { value: "blocks", label: "Specific blocks only" }))), scopeType === "blocks" && /* @__PURE__ */ React97.createElement(Paper5, { p: "sm", withBorder: true, style: { maxHeight: 150, overflow: "auto" } }, /* @__PURE__ */ React97.createElement(Stack73, { gap: "xs" }, blocks.map((block) => /* @__PURE__ */ React97.createElement(
|
|
7772
7801
|
Checkbox10,
|
|
7773
7802
|
{
|
|
7774
7803
|
key: block.id,
|
|
@@ -8077,9 +8106,9 @@ var AuthorizationTab = ({
|
|
|
8077
8106
|
)
|
|
8078
8107
|
);
|
|
8079
8108
|
}
|
|
8080
|
-
return /* @__PURE__ */ React98.createElement(Stack74, { gap: "md" }, /* @__PURE__ */ React98.createElement(Stack74, { gap: "xs" }, /* @__PURE__ */ React98.createElement(
|
|
8109
|
+
return /* @__PURE__ */ React98.createElement(Stack74, { gap: "md" }, /* @__PURE__ */ React98.createElement(Stack74, { gap: "xs" }, /* @__PURE__ */ React98.createElement(Text48, { fw: 600, size: "sm" }, "Who can execute this block?"), /* @__PURE__ */ React98.createElement(Radio5.Group, { value: authMode, onChange: (v) => handleAuthModeChange(v) }, /* @__PURE__ */ React98.createElement(Stack74, { gap: "xs" }, /* @__PURE__ */ React98.createElement(Radio5, { value: "anyone", label: "Anyone with flow access", description: "All users who have been granted permission to this flow" }), /* @__PURE__ */ React98.createElement(Radio5, { value: "actors", label: "Only specific actors (simple whitelist)", description: "Restrict by DID without capability signing" }), /* @__PURE__ */ React98.createElement(Radio5, { value: "capability", label: "UCAN capability-based authorization", description: "Grant signed capabilities to specific users" })))), authMode === "actors" && /* @__PURE__ */ React98.createElement(Paper6, { p: "sm", withBorder: true }, /* @__PURE__ */ React98.createElement(Stack74, { gap: "xs" }, /* @__PURE__ */ React98.createElement(Group25, { justify: "space-between" }, /* @__PURE__ */ React98.createElement(Text48, { size: "sm", fw: 500 }, "Authorized Actors"), onOpenFlowPermissions && /* @__PURE__ */ React98.createElement(Button16, { variant: "subtle", size: "xs", leftSection: /* @__PURE__ */ React98.createElement(IconUsers, { size: 14 }), onClick: onOpenFlowPermissions }, "View flow permissions")), actorList.length > 0 && /* @__PURE__ */ React98.createElement(Stack74, { gap: 4 }, actorList.map((actor) => {
|
|
8081
8110
|
const flowActor = flowActors.find((f) => f.did === actor);
|
|
8082
|
-
return /* @__PURE__ */ React98.createElement(Group25, { key: actor, justify: "space-between" }, /* @__PURE__ */ React98.createElement(Group25, { gap: "xs" }, /* @__PURE__ */ React98.createElement(Badge10, { size: "sm", variant: "light" }, flowActor?.displayName || actor.slice(-12)), flowActor && /* @__PURE__ */ React98.createElement(
|
|
8111
|
+
return /* @__PURE__ */ React98.createElement(Group25, { key: actor, justify: "space-between" }, /* @__PURE__ */ React98.createElement(Group25, { gap: "xs" }, /* @__PURE__ */ React98.createElement(Badge10, { size: "sm", variant: "light" }, flowActor?.displayName || actor.slice(-12)), flowActor && /* @__PURE__ */ React98.createElement(Text48, { size: "xs", c: "dimmed" }, "(from flow permissions)")), /* @__PURE__ */ React98.createElement(ActionIcon7, { size: "sm", variant: "subtle", color: "red", onClick: () => removeActor(actor) }, /* @__PURE__ */ React98.createElement(IconX2, { size: 14 })));
|
|
8083
8112
|
})), flowActors.length > 0 && /* @__PURE__ */ React98.createElement(
|
|
8084
8113
|
Select2,
|
|
8085
8114
|
{
|
|
@@ -8088,7 +8117,7 @@ var AuthorizationTab = ({
|
|
|
8088
8117
|
onChange: (v) => v && addActor(v),
|
|
8089
8118
|
clearable: true
|
|
8090
8119
|
}
|
|
8091
|
-
), /* @__PURE__ */ React98.createElement(Group25, { gap: "xs" }, /* @__PURE__ */ React98.createElement(TextInput3, { placeholder: "Enter DID manually...", value: newActorDid, onChange: (e) => setNewActorDid(e.currentTarget.value), style: { flex: 1 } }), /* @__PURE__ */ React98.createElement(
|
|
8120
|
+
), /* @__PURE__ */ React98.createElement(Group25, { gap: "xs" }, /* @__PURE__ */ React98.createElement(TextInput3, { placeholder: "Enter DID manually...", value: newActorDid, onChange: (e) => setNewActorDid(e.currentTarget.value), style: { flex: 1 } }), /* @__PURE__ */ React98.createElement(ActionIcon7, { onClick: () => addActor(newActorDid), disabled: !newActorDid.trim() }, /* @__PURE__ */ React98.createElement(IconPlus2, { size: 16 }))))), authMode === "capability" && /* @__PURE__ */ React98.createElement(Paper6, { p: "sm", withBorder: true }, /* @__PURE__ */ React98.createElement(Stack74, { gap: "sm" }, rootCapability ? /* @__PURE__ */ React98.createElement(Alert10, { color: "green", variant: "light", icon: /* @__PURE__ */ React98.createElement(IconKey, { size: 16 }) }, /* @__PURE__ */ React98.createElement(Group25, { gap: "xs" }, /* @__PURE__ */ React98.createElement(Text48, { size: "xs", fw: 500 }, "Root capability established"), /* @__PURE__ */ React98.createElement(Badge10, { size: "xs", variant: "light" }, "Owner: ", flowOwnerDid?.slice(-12) || "Unknown"))) : /* @__PURE__ */ React98.createElement(Alert10, { color: "orange", variant: "light", icon: /* @__PURE__ */ React98.createElement(IconKey, { size: 16 }) }, /* @__PURE__ */ React98.createElement(Stack74, { gap: 4 }, /* @__PURE__ */ React98.createElement(Text48, { size: "xs", fw: 500 }, "Root capability not found"), /* @__PURE__ */ React98.createElement(Text48, { size: "xs" }, "The flow's root signing authority has not been established. This should be set up when the flow is created."), isFlowOwner && handlers.signCapability && /* @__PURE__ */ React98.createElement(
|
|
8092
8121
|
Button16,
|
|
8093
8122
|
{
|
|
8094
8123
|
size: "xs",
|
|
@@ -8110,7 +8139,7 @@ var AuthorizationTab = ({
|
|
|
8110
8139
|
leftSection: /* @__PURE__ */ React98.createElement(IconKey, { size: 14 })
|
|
8111
8140
|
},
|
|
8112
8141
|
"Initialize Signing Authority"
|
|
8113
|
-
), rootCapabilityError && /* @__PURE__ */ React98.createElement(
|
|
8142
|
+
), rootCapabilityError && /* @__PURE__ */ React98.createElement(Text48, { size: "xs", c: "red" }, rootCapabilityError))), !isFlowOwner && flowOwnerDid && /* @__PURE__ */ React98.createElement(Alert10, { color: "blue", variant: "light" }, /* @__PURE__ */ React98.createElement(Text48, { size: "xs" }, "You are not the flow owner. Only the flow owner (", flowOwnerDid.slice(-16), ") can grant capabilities.")), /* @__PURE__ */ React98.createElement(Group25, { justify: "space-between" }, /* @__PURE__ */ React98.createElement(Text48, { size: "sm", fw: 500 }, "Granted Capabilities"), /* @__PURE__ */ React98.createElement(
|
|
8114
8143
|
Button16,
|
|
8115
8144
|
{
|
|
8116
8145
|
variant: "light",
|
|
@@ -8120,7 +8149,7 @@ var AuthorizationTab = ({
|
|
|
8120
8149
|
disabled: !handlers.signCapability || !rootCapability || !isFlowOwner
|
|
8121
8150
|
},
|
|
8122
8151
|
"Grant Permission"
|
|
8123
|
-
)), !handlers.signCapability && /* @__PURE__ */ React98.createElement(Alert10, { color: "yellow", variant: "light" }, /* @__PURE__ */ React98.createElement(
|
|
8152
|
+
)), !handlers.signCapability && /* @__PURE__ */ React98.createElement(Alert10, { color: "yellow", variant: "light" }, /* @__PURE__ */ React98.createElement(Text48, { size: "xs" }, "User signing is not configured. Please set up user signing to grant capabilities.")), blockCapabilities.length === 0 ? /* @__PURE__ */ React98.createElement(Text48, { size: "sm", c: "dimmed" }, "No capabilities granted for this block yet.") : /* @__PURE__ */ React98.createElement(Stack74, { gap: "xs" }, blockCapabilities.map((cap) => /* @__PURE__ */ React98.createElement(Paper6, { key: cap.id, p: "xs", withBorder: true }, /* @__PURE__ */ React98.createElement(Group25, { justify: "space-between" }, /* @__PURE__ */ React98.createElement(Group25, { gap: "xs" }, /* @__PURE__ */ React98.createElement(IconShieldCheck, { size: 16, color: "var(--mantine-color-green-6)" }), /* @__PURE__ */ React98.createElement(Stack74, { gap: 2 }, /* @__PURE__ */ React98.createElement(Group25, { gap: "xs" }, cap.audience.includes(":oracle:") ? /* @__PURE__ */ React98.createElement(IconRobot2, { size: 14 }) : /* @__PURE__ */ React98.createElement(IconUser3, { size: 14 }), /* @__PURE__ */ React98.createElement(Text48, { size: "sm", fw: 500 }, cap.audience.slice(-16))), /* @__PURE__ */ React98.createElement(Group25, { gap: "xs" }, /* @__PURE__ */ React98.createElement(Text48, { size: "xs", c: "dimmed" }, "Expires: ", formatExpiration(cap.expiration)), /* @__PURE__ */ React98.createElement(Badge10, { size: "xs", variant: "light" }, cap.capabilities.map((c) => c.can).join(", "))))), /* @__PURE__ */ React98.createElement(ActionIcon7, { size: "sm", variant: "subtle", color: "red", onClick: () => handleRevokeCapability(cap.id) }, /* @__PURE__ */ React98.createElement(IconTrash, { size: 14 })))))))), /* @__PURE__ */ React98.createElement(Divider6, { label: "Activation Condition", labelPosition: "center" }), /* @__PURE__ */ React98.createElement(Stack74, { gap: "xs" }, /* @__PURE__ */ React98.createElement(Text48, { size: "sm", c: "dimmed" }, "This block activates when an upstream block reaches a certain status. Leave empty for immediate activation."), /* @__PURE__ */ React98.createElement(
|
|
8124
8153
|
Select2,
|
|
8125
8154
|
{
|
|
8126
8155
|
label: "Upstream block",
|
|
@@ -8157,7 +8186,7 @@ var AuthorizationTab = ({
|
|
|
8157
8186
|
|
|
8158
8187
|
// src/mantine/components/EvaluationTab.tsx
|
|
8159
8188
|
import React99, { useMemo as useMemo13, useState as useState28, useEffect as useEffect18, useCallback as useCallback17 } from "react";
|
|
8160
|
-
import { Stack as Stack75, TextInput as TextInput4, Text as
|
|
8189
|
+
import { Stack as Stack75, TextInput as TextInput4, Text as Text49 } from "@mantine/core";
|
|
8161
8190
|
var EvaluationTab = ({
|
|
8162
8191
|
editor,
|
|
8163
8192
|
block: initialBlock
|
|
@@ -8189,7 +8218,7 @@ var EvaluationTab = ({
|
|
|
8189
8218
|
},
|
|
8190
8219
|
[editor, block.id]
|
|
8191
8220
|
);
|
|
8192
|
-
return /* @__PURE__ */ React99.createElement(Stack75, { gap: "md" }, /* @__PURE__ */ React99.createElement(
|
|
8221
|
+
return /* @__PURE__ */ React99.createElement(Stack75, { gap: "md" }, /* @__PURE__ */ React99.createElement(Text49, { size: "sm", c: "dimmed" }, "Configure evaluation settings for this block. When a linked claim collection is set, execution must yield a claim for that collection."), /* @__PURE__ */ React99.createElement(
|
|
8193
8222
|
TextInput4,
|
|
8194
8223
|
{
|
|
8195
8224
|
label: "Linked claim collection ID",
|
|
@@ -8216,17 +8245,17 @@ import React104, { useCallback as useCallback19, useMemo as useMemo16 } from "re
|
|
|
8216
8245
|
|
|
8217
8246
|
// src/mantine/blocks/apiRequest/template/GeneralTab.tsx
|
|
8218
8247
|
import React102, { useEffect as useEffect19, useState as useState31 } from "react";
|
|
8219
|
-
import { Divider as Divider7, Stack as Stack77, Text as
|
|
8248
|
+
import { Divider as Divider7, Stack as Stack77, Text as Text51, Button as Button17, Group as Group28, ActionIcon as ActionIcon10, Paper as Paper7 } from "@mantine/core";
|
|
8220
8249
|
import { IconTrash as IconTrash2, IconPlus as IconPlus3 } from "@tabler/icons-react";
|
|
8221
8250
|
|
|
8222
8251
|
// src/mantine/components/DataInput/DataInput.tsx
|
|
8223
8252
|
import React101, { useState as useState30, useCallback as useCallback18, useMemo as useMemo15 } from "react";
|
|
8224
|
-
import { Input as Input2, ActionIcon as
|
|
8253
|
+
import { Input as Input2, ActionIcon as ActionIcon9, Tooltip as Tooltip8, Badge as Badge12, Group as Group27 } from "@mantine/core";
|
|
8225
8254
|
import { IconVariable, IconX as IconX4 } from "@tabler/icons-react";
|
|
8226
8255
|
|
|
8227
8256
|
// src/mantine/components/DataInput/BlockPropSelector.tsx
|
|
8228
8257
|
import React100, { useState as useState29, useMemo as useMemo14 } from "react";
|
|
8229
|
-
import { Popover, Text as
|
|
8258
|
+
import { Popover, Text as Text50, Stack as Stack76, Group as Group26, ActionIcon as ActionIcon8, Input, ScrollArea as ScrollArea4, Badge as Badge11, Box as Box23, Tooltip as Tooltip7 } from "@mantine/core";
|
|
8230
8259
|
import { IconSearch as IconSearch3, IconX as IconX3, IconCircle, IconChevronRight as IconChevronRight3, IconArrowLeft as IconArrowLeft2 } from "@tabler/icons-react";
|
|
8231
8260
|
function buildPropertyTree(properties) {
|
|
8232
8261
|
const root = [];
|
|
@@ -8349,7 +8378,7 @@ function BlockPropSelector({ children, opened, onClose, onSelect, editorDocument
|
|
|
8349
8378
|
setSearchQuery("");
|
|
8350
8379
|
onClose();
|
|
8351
8380
|
};
|
|
8352
|
-
return /* @__PURE__ */ React100.createElement(Popover, { opened, onClose: handleClose, position: "bottom-end", width: 420, shadow: "md", withinPortal: true }, /* @__PURE__ */ React100.createElement(Popover.Target, null, children), /* @__PURE__ */ React100.createElement(Popover.Dropdown, { p: "md" }, /* @__PURE__ */ React100.createElement(Stack76, { gap: "md" }, /* @__PURE__ */ React100.createElement(Group26, { justify: "space-between", align: "center" }, /* @__PURE__ */ React100.createElement(Group26, { gap: "xs" }, (selectedBlock || navigationPath.length > 0) && /* @__PURE__ */ React100.createElement(
|
|
8381
|
+
return /* @__PURE__ */ React100.createElement(Popover, { opened, onClose: handleClose, position: "bottom-end", width: 420, shadow: "md", withinPortal: true }, /* @__PURE__ */ React100.createElement(Popover.Target, null, children), /* @__PURE__ */ React100.createElement(Popover.Dropdown, { p: "md" }, /* @__PURE__ */ React100.createElement(Stack76, { gap: "md" }, /* @__PURE__ */ React100.createElement(Group26, { justify: "space-between", align: "center" }, /* @__PURE__ */ React100.createElement(Group26, { gap: "xs" }, (selectedBlock || navigationPath.length > 0) && /* @__PURE__ */ React100.createElement(ActionIcon8, { variant: "subtle", size: "sm", onClick: handleBack }, /* @__PURE__ */ React100.createElement(IconArrowLeft2, { size: 16 })), /* @__PURE__ */ React100.createElement(Text50, { fw: 600, size: "sm" }, !selectedBlock ? "Select a Block" : navigationPath.length === 0 ? `${selectedBlock.displayName} - Select Property` : `${navigationPath[navigationPath.length - 1].displayName}`)), /* @__PURE__ */ React100.createElement(ActionIcon8, { variant: "subtle", size: "sm", onClick: handleClose }, /* @__PURE__ */ React100.createElement(IconX3, { size: 16 }))), !selectedBlock && /* @__PURE__ */ React100.createElement(
|
|
8353
8382
|
Input,
|
|
8354
8383
|
{
|
|
8355
8384
|
placeholder: "Search blocks and properties...",
|
|
@@ -8357,11 +8386,11 @@ function BlockPropSelector({ children, opened, onClose, onSelect, editorDocument
|
|
|
8357
8386
|
value: searchQuery,
|
|
8358
8387
|
onChange: (e) => setSearchQuery(e.currentTarget.value),
|
|
8359
8388
|
size: "xs",
|
|
8360
|
-
rightSection: searchQuery && /* @__PURE__ */ React100.createElement(
|
|
8389
|
+
rightSection: searchQuery && /* @__PURE__ */ React100.createElement(ActionIcon8, { variant: "subtle", onClick: () => setSearchQuery(""), size: "xs" }, /* @__PURE__ */ React100.createElement(IconX3, { size: 12 }))
|
|
8361
8390
|
}
|
|
8362
8391
|
), /* @__PURE__ */ React100.createElement(ScrollArea4, { h: 300, type: "auto" }, !selectedBlock ? (
|
|
8363
8392
|
// Block selection view
|
|
8364
|
-
filteredBlocks.length === 0 ? /* @__PURE__ */ React100.createElement(
|
|
8393
|
+
filteredBlocks.length === 0 ? /* @__PURE__ */ React100.createElement(Text50, { c: "dimmed", ta: "center", py: "xl", size: "sm" }, availableBlocks.length === 0 ? "No blocks with referenceable properties found" : "No blocks match your search") : /* @__PURE__ */ React100.createElement(Stack76, { gap: "sm" }, filteredBlocks.map((block) => /* @__PURE__ */ React100.createElement(
|
|
8365
8394
|
Box23,
|
|
8366
8395
|
{
|
|
8367
8396
|
key: block.id,
|
|
@@ -8389,11 +8418,11 @@ function BlockPropSelector({ children, opened, onClose, onSelect, editorDocument
|
|
|
8389
8418
|
fill: `var(--mantine-color-${getBlockTypeColor(block.type)}-6)`,
|
|
8390
8419
|
color: `var(--mantine-color-${getBlockTypeColor(block.type)}-6)`
|
|
8391
8420
|
}
|
|
8392
|
-
), /* @__PURE__ */ React100.createElement(
|
|
8421
|
+
), /* @__PURE__ */ React100.createElement(Text50, { fw: 500, size: "sm" }, block.displayName), /* @__PURE__ */ React100.createElement(Badge11, { size: "xs", variant: "light", color: getBlockTypeColor(block.type) }, block.type)), /* @__PURE__ */ React100.createElement(IconChevronRight3, { size: 16, color: "var(--mantine-color-gray-5)" }))
|
|
8393
8422
|
)))
|
|
8394
8423
|
) : (
|
|
8395
8424
|
// Property navigation view
|
|
8396
|
-
currentNodes.length === 0 ? /* @__PURE__ */ React100.createElement(
|
|
8425
|
+
currentNodes.length === 0 ? /* @__PURE__ */ React100.createElement(Text50, { c: "dimmed", ta: "center", py: "xl", size: "sm" }, "No properties available") : /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, currentNodes.map((node, index) => /* @__PURE__ */ React100.createElement(Tooltip7, { key: index, label: node.isLeaf ? `Select ${node.displayName}` : `Navigate into ${node.displayName}`, position: "left", withArrow: true }, /* @__PURE__ */ React100.createElement(
|
|
8397
8426
|
Box23,
|
|
8398
8427
|
{
|
|
8399
8428
|
onClick: () => handleNodeClick(node),
|
|
@@ -8413,7 +8442,7 @@ function BlockPropSelector({ children, opened, onClose, onSelect, editorDocument
|
|
|
8413
8442
|
e.currentTarget.style.borderColor = "transparent";
|
|
8414
8443
|
}
|
|
8415
8444
|
},
|
|
8416
|
-
/* @__PURE__ */ React100.createElement(Group26, { gap: "xs", justify: "space-between" }, /* @__PURE__ */ React100.createElement(Group26, { gap: "xs" }, /* @__PURE__ */ React100.createElement(
|
|
8445
|
+
/* @__PURE__ */ React100.createElement(Group26, { gap: "xs", justify: "space-between" }, /* @__PURE__ */ React100.createElement(Group26, { gap: "xs" }, /* @__PURE__ */ React100.createElement(Text50, { size: "sm" }, node.displayName), /* @__PURE__ */ React100.createElement(Badge11, { size: "xs", variant: "dot", color: "gray" }, node.type)), !node.isLeaf && /* @__PURE__ */ React100.createElement(IconChevronRight3, { size: 16, color: "var(--mantine-color-gray-5)" }))
|
|
8417
8446
|
))))
|
|
8418
8447
|
)))));
|
|
8419
8448
|
}
|
|
@@ -8562,7 +8591,7 @@ function DataInput({
|
|
|
8562
8591
|
currentBlockId
|
|
8563
8592
|
},
|
|
8564
8593
|
/* @__PURE__ */ React101.createElement(Tooltip8, { label: "Insert reference to another block's property", position: "left" }, /* @__PURE__ */ React101.createElement(
|
|
8565
|
-
|
|
8594
|
+
ActionIcon9,
|
|
8566
8595
|
{
|
|
8567
8596
|
variant: containsReferences ? "light" : "subtle",
|
|
8568
8597
|
color: containsReferences ? "blue" : "gray",
|
|
@@ -8693,7 +8722,7 @@ var GeneralTab4 = ({
|
|
|
8693
8722
|
onEndpointChange(newEndpoint);
|
|
8694
8723
|
}
|
|
8695
8724
|
}
|
|
8696
|
-
), /* @__PURE__ */ React102.createElement(Divider7, { variant: "dashed" }), /* @__PURE__ */ React102.createElement(Stack77, { gap: "xs" }, /* @__PURE__ */ React102.createElement(Group28, { justify: "space-between" }, /* @__PURE__ */ React102.createElement(
|
|
8725
|
+
), /* @__PURE__ */ React102.createElement(Divider7, { variant: "dashed" }), /* @__PURE__ */ React102.createElement(Stack77, { gap: "xs" }, /* @__PURE__ */ React102.createElement(Group28, { justify: "space-between" }, /* @__PURE__ */ React102.createElement(Text51, { size: "sm", fw: 600 }, "Request Headers"), /* @__PURE__ */ React102.createElement(Button17, { size: "xs", variant: "light", leftSection: /* @__PURE__ */ React102.createElement(IconPlus3, { size: 14 }), onClick: handleAddHeader }, "Add Header")), /* @__PURE__ */ React102.createElement(Text51, { size: "xs" }, "Add custom headers to your API request (e.g., Authorization, Content-Type)"), localHeaders.length > 0 && /* @__PURE__ */ React102.createElement(Stack77, { gap: "xs" }, localHeaders.map((header, index) => /* @__PURE__ */ React102.createElement(Paper7, { key: index, p: "xs" }, /* @__PURE__ */ React102.createElement(Group28, { gap: "xs", align: "flex-start" }, /* @__PURE__ */ React102.createElement(
|
|
8697
8726
|
DataInput,
|
|
8698
8727
|
{
|
|
8699
8728
|
placeholder: "Header key (e.g., Authorization)",
|
|
@@ -8713,7 +8742,7 @@ var GeneralTab4 = ({
|
|
|
8713
8742
|
currentBlockId: blockId,
|
|
8714
8743
|
size: "sm"
|
|
8715
8744
|
}
|
|
8716
|
-
), /* @__PURE__ */ React102.createElement(
|
|
8745
|
+
), /* @__PURE__ */ React102.createElement(ActionIcon10, { color: "red", variant: "subtle", onClick: () => handleRemoveHeader(index) }, /* @__PURE__ */ React102.createElement(IconTrash2, { size: 16 }))))))), /* @__PURE__ */ React102.createElement(Divider7, { variant: "dashed" }), /* @__PURE__ */ React102.createElement(Stack77, { gap: "xs" }, /* @__PURE__ */ React102.createElement(Group28, { justify: "space-between" }, /* @__PURE__ */ React102.createElement(Text51, { size: "sm", fw: 600 }, "Request Body (JSON)"), /* @__PURE__ */ React102.createElement(Button17, { size: "xs", variant: "light", leftSection: /* @__PURE__ */ React102.createElement(IconPlus3, { size: 14 }), onClick: handleAddBodyField }, "Add Field")), /* @__PURE__ */ React102.createElement(Text51, { size: "xs" }, "Build your JSON request body as key-value pairs"), localBody.length > 0 && /* @__PURE__ */ React102.createElement(Stack77, { gap: "xs" }, localBody.map((field, index) => /* @__PURE__ */ React102.createElement(Paper7, { key: index, p: "xs" }, /* @__PURE__ */ React102.createElement(Group28, { gap: "xs", align: "flex-start" }, /* @__PURE__ */ React102.createElement(
|
|
8717
8746
|
DataInput,
|
|
8718
8747
|
{
|
|
8719
8748
|
placeholder: "Field key (e.g., name)",
|
|
@@ -8733,12 +8762,12 @@ var GeneralTab4 = ({
|
|
|
8733
8762
|
currentBlockId: blockId,
|
|
8734
8763
|
size: "sm"
|
|
8735
8764
|
}
|
|
8736
|
-
), /* @__PURE__ */ React102.createElement(
|
|
8765
|
+
), /* @__PURE__ */ React102.createElement(ActionIcon10, { color: "red", variant: "subtle", onClick: () => handleRemoveBodyField(index) }, /* @__PURE__ */ React102.createElement(IconTrash2, { size: 16 }))))))));
|
|
8737
8766
|
};
|
|
8738
8767
|
|
|
8739
8768
|
// src/mantine/blocks/apiRequest/template/ResponseSchemaTab.tsx
|
|
8740
8769
|
import React103 from "react";
|
|
8741
|
-
import { Stack as Stack78, Text as
|
|
8770
|
+
import { Stack as Stack78, Text as Text52, Button as Button18, Group as Group29, ActionIcon as ActionIcon11, Paper as Paper8, Alert as Alert11, Code } from "@mantine/core";
|
|
8742
8771
|
import { IconTrash as IconTrash3, IconPlus as IconPlus4, IconInfoCircle } from "@tabler/icons-react";
|
|
8743
8772
|
var ResponseSchemaTab = ({ schema, onSchemaChange, blockId }) => {
|
|
8744
8773
|
const fields = schema?.fields || [];
|
|
@@ -8763,7 +8792,7 @@ var ResponseSchemaTab = ({ schema, onSchemaChange, blockId }) => {
|
|
|
8763
8792
|
newFields[index] = { ...newFields[index], [key]: value };
|
|
8764
8793
|
onSchemaChange({ fields: newFields });
|
|
8765
8794
|
};
|
|
8766
|
-
return /* @__PURE__ */ React103.createElement(Stack78, { gap: "lg" }, /* @__PURE__ */ React103.createElement(Alert11, { icon: /* @__PURE__ */ React103.createElement(IconInfoCircle, { size: 16 }), title: "Response Schema", color: "blue" }, /* @__PURE__ */ React103.createElement(
|
|
8795
|
+
return /* @__PURE__ */ React103.createElement(Stack78, { gap: "lg" }, /* @__PURE__ */ React103.createElement(Alert11, { icon: /* @__PURE__ */ React103.createElement(IconInfoCircle, { size: 16 }), title: "Response Schema", color: "blue" }, /* @__PURE__ */ React103.createElement(Text52, { size: "xs" }, "Define the expected structure of your API response. This allows other blocks to reference specific fields from the response data using the DataInput component.")), /* @__PURE__ */ React103.createElement(Stack78, { gap: "xs" }, /* @__PURE__ */ React103.createElement(Text52, { size: "sm", fw: 600 }, "How it works"), /* @__PURE__ */ React103.createElement(Text52, { size: "xs", c: "dimmed" }, "1. Define response fields using dot notation (e.g., ", /* @__PURE__ */ React103.createElement(Code, null, "customer.email"), ")"), /* @__PURE__ */ React103.createElement(Text52, { size: "xs", c: "dimmed" }, "2. Fields become available in DataInput selectors across other blocks"), /* @__PURE__ */ React103.createElement(Text52, { size: "xs", c: "dimmed" }, "3. Reference them like: ", /* @__PURE__ */ React103.createElement(Code, null, `{{${blockId}.response.customer.email}}`))), /* @__PURE__ */ React103.createElement(Stack78, { gap: "xs" }, /* @__PURE__ */ React103.createElement(Group29, { justify: "space-between" }, /* @__PURE__ */ React103.createElement(Text52, { size: "sm", fw: 600 }, "Response Fields"), /* @__PURE__ */ React103.createElement(Button18, { size: "xs", variant: "light", leftSection: /* @__PURE__ */ React103.createElement(IconPlus4, { size: 14 }), onClick: handleAddField }, "Add Field")), fields.length === 0 ? /* @__PURE__ */ React103.createElement(Code, { p: "md" }, 'No response fields defined yet. Click "Add Field" to start defining your response structure.') : /* @__PURE__ */ React103.createElement(Stack78, { gap: "md" }, fields.map((field, index) => /* @__PURE__ */ React103.createElement(Paper8, { key: index, p: "md", withBorder: true }, /* @__PURE__ */ React103.createElement(Stack78, { gap: "sm" }, /* @__PURE__ */ React103.createElement(Group29, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React103.createElement(Text52, { size: "sm", fw: 500 }, "Field ", index + 1), /* @__PURE__ */ React103.createElement(ActionIcon11, { color: "red", variant: "subtle", onClick: () => handleRemoveField(index) }, /* @__PURE__ */ React103.createElement(IconTrash3, { size: 16 }))), /* @__PURE__ */ React103.createElement(
|
|
8767
8796
|
BaseTextInput,
|
|
8768
8797
|
{
|
|
8769
8798
|
label: "Field Path",
|
|
@@ -8811,7 +8840,7 @@ var ResponseSchemaTab = ({ schema, onSchemaChange, blockId }) => {
|
|
|
8811
8840
|
minRows: 2,
|
|
8812
8841
|
size: "sm"
|
|
8813
8842
|
}
|
|
8814
|
-
), field.path && field.displayName && /* @__PURE__ */ React103.createElement(Stack78, { gap: 4 }, /* @__PURE__ */ React103.createElement(
|
|
8843
|
+
), field.path && field.displayName && /* @__PURE__ */ React103.createElement(Stack78, { gap: 4 }, /* @__PURE__ */ React103.createElement(Text52, { size: "xs", c: "dimmed" }, "Reference format:"), /* @__PURE__ */ React103.createElement(Code, { block: true, style: { fontSize: "11px" } }, `{{${blockId}.response.${field.path}}}`))))))), fields.length === 0 && /* @__PURE__ */ React103.createElement(Stack78, { gap: "xs" }, /* @__PURE__ */ React103.createElement(Text52, { size: "sm", fw: 600 }, "Example Schema"), /* @__PURE__ */ React103.createElement(Text52, { size: "xs", c: "dimmed" }, "For a typical API response like:"), /* @__PURE__ */ React103.createElement(Code, { block: true, style: { fontSize: "11px" } }, `{
|
|
8815
8844
|
"customer": {
|
|
8816
8845
|
"email": "user@example.com",
|
|
8817
8846
|
"name": "John Doe"
|
|
@@ -8820,7 +8849,7 @@ var ResponseSchemaTab = ({ schema, onSchemaChange, blockId }) => {
|
|
|
8820
8849
|
"id": "l1v6r07b",
|
|
8821
8850
|
"name": "Product-1"
|
|
8822
8851
|
}
|
|
8823
|
-
}`), /* @__PURE__ */ React103.createElement(
|
|
8852
|
+
}`), /* @__PURE__ */ React103.createElement(Text52, { size: "xs", c: "dimmed" }, "You would define fields like:"), /* @__PURE__ */ React103.createElement(Text52, { size: "xs", c: "dimmed" }, "\u2022 Path: ", /* @__PURE__ */ React103.createElement(Code, null, "customer.email"), ', Display Name: "Customer Email", Type: string'), /* @__PURE__ */ React103.createElement(Text52, { size: "xs", c: "dimmed" }, "\u2022 Path: ", /* @__PURE__ */ React103.createElement(Code, null, "customer.name"), ', Display Name: "Customer Name", Type: string'), /* @__PURE__ */ React103.createElement(Text52, { size: "xs", c: "dimmed" }, "\u2022 Path: ", /* @__PURE__ */ React103.createElement(Code, null, "product.id"), ', Display Name: "Product ID", Type: string'), /* @__PURE__ */ React103.createElement(Text52, { size: "xs", c: "dimmed" }, "\u2022 Path: ", /* @__PURE__ */ React103.createElement(Code, null, "product.name"), ', Display Name: "Product Name", Type: string')));
|
|
8824
8853
|
};
|
|
8825
8854
|
|
|
8826
8855
|
// src/mantine/blocks/apiRequest/template/TemplateConfig.tsx
|
|
@@ -8931,7 +8960,7 @@ var TemplateConfig4 = ({ editor, block }) => {
|
|
|
8931
8960
|
};
|
|
8932
8961
|
|
|
8933
8962
|
// src/mantine/blocks/apiRequest/template/TemplateView.tsx
|
|
8934
|
-
import { Group as Group30, Stack as Stack79, Text as
|
|
8963
|
+
import { Group as Group30, Stack as Stack79, Text as Text53, Badge as Badge13 } from "@mantine/core";
|
|
8935
8964
|
var API_REQUEST_TEMPLATE_PANEL_ID = "api-request-template-panel";
|
|
8936
8965
|
var ApiRequestTemplateView = ({ editor, block }) => {
|
|
8937
8966
|
const panelId = `${API_REQUEST_TEMPLATE_PANEL_ID}-${block.id}`;
|
|
@@ -8955,12 +8984,12 @@ var ApiRequestTemplateView = ({ editor, block }) => {
|
|
|
8955
8984
|
return "gray";
|
|
8956
8985
|
}
|
|
8957
8986
|
};
|
|
8958
|
-
return /* @__PURE__ */ React105.createElement(BaseContainer, { onClick: open }, /* @__PURE__ */ React105.createElement(Group30, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React105.createElement(Group30, { wrap: "nowrap", align: "center" }, getIcon("square-check", block.props.icon), /* @__PURE__ */ React105.createElement(Stack79, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React105.createElement(Group30, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React105.createElement(Badge13, { size: "sm", variant: "filled", color: getMethodColor(method) }, method), /* @__PURE__ */ React105.createElement(
|
|
8987
|
+
return /* @__PURE__ */ React105.createElement(BaseContainer, { onClick: open }, /* @__PURE__ */ React105.createElement(Group30, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React105.createElement(Group30, { wrap: "nowrap", align: "center" }, getIcon("square-check", block.props.icon), /* @__PURE__ */ React105.createElement(Stack79, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React105.createElement(Group30, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React105.createElement(Badge13, { size: "sm", variant: "filled", color: getMethodColor(method) }, method), /* @__PURE__ */ React105.createElement(Text53, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "API Request")), /* @__PURE__ */ React105.createElement(Text53, { size: "xs", c: "dimmed", contentEditable: false, lineClamp: 1 }, endpoint), block.props.description && /* @__PURE__ */ React105.createElement(Text53, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description)))));
|
|
8959
8988
|
};
|
|
8960
8989
|
|
|
8961
8990
|
// src/mantine/blocks/apiRequest/flow/FlowView.tsx
|
|
8962
8991
|
import React106, { useState as useState32 } from "react";
|
|
8963
|
-
import { Group as Group31, Stack as Stack80, Text as
|
|
8992
|
+
import { Group as Group31, Stack as Stack80, Text as Text54, ActionIcon as ActionIcon12, Tooltip as Tooltip9, Button as Button19, Badge as Badge14, Collapse as Collapse4, Code as Code2, Loader as Loader7, Alert as Alert12 } from "@mantine/core";
|
|
8964
8993
|
import { IconSend, IconChevronDown as IconChevronDown4, IconChevronUp as IconChevronUp2, IconAlertTriangle } from "@tabler/icons-react";
|
|
8965
8994
|
var ApiRequestFlowView = ({ editor, block, isDisabled }) => {
|
|
8966
8995
|
const disabled = isDisabled?.isDisabled === "disable";
|
|
@@ -9100,8 +9129,8 @@ var ApiRequestFlowView = ({ editor, block, isDisabled }) => {
|
|
|
9100
9129
|
},
|
|
9101
9130
|
isLoading ? "Sending..." : "Execute"
|
|
9102
9131
|
);
|
|
9103
|
-
return /* @__PURE__ */ React106.createElement(BaseContainer, null, /* @__PURE__ */ React106.createElement(Stack80, { gap: "md" }, /* @__PURE__ */ React106.createElement(Group31, { wrap: "nowrap", justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React106.createElement(Group31, { wrap: "nowrap", align: "flex-start", style: { flex: 1 } }, getIcon("square-check", block.props.icon), /* @__PURE__ */ React106.createElement(Stack80, { gap: "xs", style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React106.createElement(Group31, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React106.createElement(Badge14, { size: "sm", variant: "filled", color: getMethodColor(method) }, method), /* @__PURE__ */ React106.createElement(
|
|
9104
|
-
|
|
9132
|
+
return /* @__PURE__ */ React106.createElement(BaseContainer, null, /* @__PURE__ */ React106.createElement(Stack80, { gap: "md" }, /* @__PURE__ */ React106.createElement(Group31, { wrap: "nowrap", justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React106.createElement(Group31, { wrap: "nowrap", align: "flex-start", style: { flex: 1 } }, getIcon("square-check", block.props.icon), /* @__PURE__ */ React106.createElement(Stack80, { gap: "xs", style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React106.createElement(Group31, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React106.createElement(Badge14, { size: "sm", variant: "filled", color: getMethodColor(method) }, method), /* @__PURE__ */ React106.createElement(Text54, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "API Request"), status !== "idle" && /* @__PURE__ */ React106.createElement(Badge14, { size: "xs", variant: "dot", color: getStatusColor2(status) }, status)), /* @__PURE__ */ React106.createElement(
|
|
9133
|
+
Text54,
|
|
9105
9134
|
{
|
|
9106
9135
|
size: "xs",
|
|
9107
9136
|
c: "dimmed",
|
|
@@ -9113,7 +9142,7 @@ var ApiRequestFlowView = ({ editor, block, isDisabled }) => {
|
|
|
9113
9142
|
}
|
|
9114
9143
|
},
|
|
9115
9144
|
endpoint || "No endpoint configured"
|
|
9116
|
-
), block.props.description && /* @__PURE__ */ React106.createElement(
|
|
9145
|
+
), block.props.description && /* @__PURE__ */ React106.createElement(Text54, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description))), /* @__PURE__ */ React106.createElement(Group31, { gap: "xs", style: { flexShrink: 0 } }, disabled && isDisabled?.message ? /* @__PURE__ */ React106.createElement(Tooltip9, { label: isDisabled.message, position: "left", withArrow: true }, executeButton) : executeButton, /* @__PURE__ */ React106.createElement(ActionIcon12, { variant: "subtle", onClick: () => setShowDetails(!showDetails), disabled: headers.length === 0 && body.length === 0 && !response }, showDetails ? /* @__PURE__ */ React106.createElement(IconChevronUp2, { size: 16 }) : /* @__PURE__ */ React106.createElement(IconChevronDown4, { size: 16 })))), /* @__PURE__ */ React106.createElement(Collapse4, { in: showDetails }, /* @__PURE__ */ React106.createElement(Stack80, { gap: "md" }, validationWarnings.length > 0 && /* @__PURE__ */ React106.createElement(Alert12, { icon: /* @__PURE__ */ React106.createElement(IconAlertTriangle, { size: 16 }), title: "Schema Validation Warnings", color: "yellow" }, /* @__PURE__ */ React106.createElement(Stack80, { gap: "xs" }, /* @__PURE__ */ React106.createElement(Text54, { size: "xs" }, "The API response does not match the defined schema:"), validationWarnings.map((warning, index) => /* @__PURE__ */ React106.createElement(Text54, { key: index, size: "xs", c: "dimmed" }, "\u2022 ", warning)))), headers.length > 0 && /* @__PURE__ */ React106.createElement(Stack80, { gap: "xs" }, /* @__PURE__ */ React106.createElement(Text54, { size: "xs", fw: 600, c: "dimmed" }, "Headers:"), /* @__PURE__ */ React106.createElement(Code2, { block: true, style: { fontSize: "11px" } }, JSON.stringify(
|
|
9117
9146
|
headers.reduce(
|
|
9118
9147
|
(acc, h) => {
|
|
9119
9148
|
if (h.key && h.value) acc[h.key] = h.value;
|
|
@@ -9123,7 +9152,7 @@ var ApiRequestFlowView = ({ editor, block, isDisabled }) => {
|
|
|
9123
9152
|
),
|
|
9124
9153
|
null,
|
|
9125
9154
|
2
|
|
9126
|
-
))), method !== "GET" && body.length > 0 && /* @__PURE__ */ React106.createElement(Stack80, { gap: "xs" }, /* @__PURE__ */ React106.createElement(
|
|
9155
|
+
))), method !== "GET" && body.length > 0 && /* @__PURE__ */ React106.createElement(Stack80, { gap: "xs" }, /* @__PURE__ */ React106.createElement(Text54, { size: "xs", fw: 600, c: "dimmed" }, "Body:"), /* @__PURE__ */ React106.createElement(Code2, { block: true, style: { fontSize: "11px" } }, JSON.stringify(
|
|
9127
9156
|
body.reduce(
|
|
9128
9157
|
(acc, b) => {
|
|
9129
9158
|
if (b.key && b.value) acc[b.key] = b.value;
|
|
@@ -9133,7 +9162,7 @@ var ApiRequestFlowView = ({ editor, block, isDisabled }) => {
|
|
|
9133
9162
|
),
|
|
9134
9163
|
null,
|
|
9135
9164
|
2
|
|
9136
|
-
))), response && /* @__PURE__ */ React106.createElement(Stack80, { gap: "xs" }, /* @__PURE__ */ React106.createElement(
|
|
9165
|
+
))), response && /* @__PURE__ */ React106.createElement(Stack80, { gap: "xs" }, /* @__PURE__ */ React106.createElement(Text54, { size: "xs", fw: 600, c: "dimmed" }, "Response:"), status === "error" ? /* @__PURE__ */ React106.createElement(Alert12, { color: "red", title: "Error", styles: { message: { fontSize: "11px" } } }, /* @__PURE__ */ React106.createElement(Code2, { block: true, style: { fontSize: "11px" } }, response)) : /* @__PURE__ */ React106.createElement(Code2, { block: true, style: { fontSize: "11px", maxHeight: "300px", overflow: "auto" } }, response))))));
|
|
9137
9166
|
};
|
|
9138
9167
|
|
|
9139
9168
|
// src/mantine/blocks/apiRequest/ApiRequestBlock.tsx
|
|
@@ -9704,7 +9733,7 @@ import { createReactBlockSpec as createReactBlockSpec6 } from "@blocknote/react"
|
|
|
9704
9733
|
|
|
9705
9734
|
// src/mantine/blocks/dynamicList/DynamicListBlock.tsx
|
|
9706
9735
|
import React110, { useMemo as useMemo19, useState as useState34, useCallback as useCallback20, useEffect as useEffect20, useRef as useRef3 } from "react";
|
|
9707
|
-
import { Box as Box25, Stack as Stack82, Text as
|
|
9736
|
+
import { Box as Box25, Stack as Stack82, Text as Text56, Paper as Paper10, Group as Group33, Button as Button20, ActionIcon as ActionIcon13, Tooltip as Tooltip10, Code as Code4, Flex as Flex21, Collapse as Collapse6, Title as Title4, Badge as Badge15, TextInput as TextInput5, CloseButton as CloseButton4, Select as Select3, Menu as Menu2 } from "@mantine/core";
|
|
9708
9737
|
import { useDisclosure as useDisclosure3 } from "@mantine/hooks";
|
|
9709
9738
|
import {
|
|
9710
9739
|
IconCamera,
|
|
@@ -9725,7 +9754,7 @@ import {
|
|
|
9725
9754
|
|
|
9726
9755
|
// src/mantine/blocks/dynamicList/DynamicListSelectionPanel.tsx
|
|
9727
9756
|
import React109, { useMemo as useMemo18, useState as useState33 } from "react";
|
|
9728
|
-
import { Paper as
|
|
9757
|
+
import { Paper as Paper9, CloseButton as CloseButton3, Stack as Stack81, Text as Text55, Box as Box24, Group as Group32, Divider as Divider8, Code as Code3, ScrollArea as ScrollArea5, Collapse as Collapse5 } from "@mantine/core";
|
|
9729
9758
|
import { IconSparkles, IconChevronDown as IconChevronDown5, IconChevronRight as IconChevronRight4 } from "@tabler/icons-react";
|
|
9730
9759
|
function formatKeyAsLabel(key) {
|
|
9731
9760
|
return key.replace(/([A-Z])/g, " $1").replace(/[_-]/g, " ").replace(/^\s/, "").split(" ").map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(" ");
|
|
@@ -9765,14 +9794,14 @@ function DefaultKeyValueView({
|
|
|
9765
9794
|
const titleColumn = columns.find((col) => col.position === "topLeft");
|
|
9766
9795
|
const title = titleColumn ? item[titleColumn.key] : Object.values(item)[0];
|
|
9767
9796
|
const itemKeys = Object.keys(item).filter((key) => !key.startsWith("_"));
|
|
9768
|
-
return /* @__PURE__ */ React109.createElement(Stack81, { gap: "md", style: { flex: 1 } }, /* @__PURE__ */ React109.createElement(Box24, null, /* @__PURE__ */ React109.createElement(
|
|
9797
|
+
return /* @__PURE__ */ React109.createElement(Stack81, { gap: "md", style: { flex: 1 } }, /* @__PURE__ */ React109.createElement(Box24, null, /* @__PURE__ */ React109.createElement(Text55, { size: "lg", fw: 600 }, formatValue(title)), titleColumn && /* @__PURE__ */ React109.createElement(Text55, { size: "xs", c: "dimmed" }, titleColumn.label)), panelDescription && /* @__PURE__ */ React109.createElement(React109.Fragment, null, /* @__PURE__ */ React109.createElement(Divider8, null), /* @__PURE__ */ React109.createElement(Text55, { size: "sm", c: "dimmed" }, panelDescription)), /* @__PURE__ */ React109.createElement(Divider8, null), /* @__PURE__ */ React109.createElement(Box24, null, /* @__PURE__ */ React109.createElement(Group32, { gap: "xs", style: { cursor: "pointer" }, onClick: () => setValuesExpanded(!valuesExpanded) }, valuesExpanded ? /* @__PURE__ */ React109.createElement(IconChevronDown5, { size: 16, color: "var(--mantine-color-blue-4)" }) : /* @__PURE__ */ React109.createElement(IconChevronRight4, { size: 16, color: "var(--mantine-color-blue-4)" }), /* @__PURE__ */ React109.createElement(Text55, { size: "sm", fw: 500 }, "Values"), /* @__PURE__ */ React109.createElement(Text55, { size: "xs", c: "dimmed" }, "(", itemKeys.length, " fields)")), /* @__PURE__ */ React109.createElement(Collapse5, { in: valuesExpanded }, /* @__PURE__ */ React109.createElement(ScrollArea5, { style: { maxHeight: 300 }, mt: "sm" }, /* @__PURE__ */ React109.createElement(Stack81, { gap: "sm" }, itemKeys.map((key) => {
|
|
9769
9798
|
const column = columnMap[key];
|
|
9770
9799
|
const label = column?.label || formatKeyAsLabel(key);
|
|
9771
9800
|
const value = item[key];
|
|
9772
9801
|
const formattedValue = formatValue(value, column?.type);
|
|
9773
9802
|
const isObject = typeof value === "object" && value !== null;
|
|
9774
|
-
return /* @__PURE__ */ React109.createElement(Box24, { key }, /* @__PURE__ */ React109.createElement(
|
|
9775
|
-
}))))), /* @__PURE__ */ React109.createElement(Box24, { style: { flex: 1 } }), dataSource && /* @__PURE__ */ React109.createElement(React109.Fragment, null, /* @__PURE__ */ React109.createElement(Divider8, null), /* @__PURE__ */ React109.createElement(Box24, null, /* @__PURE__ */ React109.createElement(Group32, { gap: "xs", mb: "xs" }, /* @__PURE__ */ React109.createElement(IconSparkles, { size: 14, color: "var(--mantine-color-blue-4)" }), /* @__PURE__ */ React109.createElement(
|
|
9803
|
+
return /* @__PURE__ */ React109.createElement(Box24, { key }, /* @__PURE__ */ React109.createElement(Text55, { size: "xs", c: "dimmed", fw: 500 }, label), isObject ? /* @__PURE__ */ React109.createElement(Code3, { block: true, style: { fontSize: "12px", whiteSpace: "pre-wrap", maxHeight: 150, overflow: "auto" } }, formattedValue) : /* @__PURE__ */ React109.createElement(Text55, { size: "sm", c: column?.color || void 0 }, formattedValue));
|
|
9804
|
+
}))))), /* @__PURE__ */ React109.createElement(Box24, { style: { flex: 1 } }), dataSource && /* @__PURE__ */ React109.createElement(React109.Fragment, null, /* @__PURE__ */ React109.createElement(Divider8, null), /* @__PURE__ */ React109.createElement(Box24, null, /* @__PURE__ */ React109.createElement(Group32, { gap: "xs", mb: "xs" }, /* @__PURE__ */ React109.createElement(IconSparkles, { size: 14, color: "var(--mantine-color-blue-4)" }), /* @__PURE__ */ React109.createElement(Text55, { size: "xs", fw: 500, c: "dimmed" }, "Data Source")), dataSource.oracleName && /* @__PURE__ */ React109.createElement(Text55, { size: "xs", c: "dimmed" }, "Oracle: ", dataSource.oracleName), dataSource.query && /* @__PURE__ */ React109.createElement(Box24, { mt: "xs" }, /* @__PURE__ */ React109.createElement(Text55, { size: "xs", c: "dimmed", mb: 4 }, "Query:"), /* @__PURE__ */ React109.createElement(Code3, { block: true, style: { fontSize: "11px", whiteSpace: "pre-wrap" } }, dataSource.query)))));
|
|
9776
9805
|
}
|
|
9777
9806
|
var DynamicListSelectionPanel = ({
|
|
9778
9807
|
selectedItem,
|
|
@@ -9790,7 +9819,7 @@ var DynamicListSelectionPanel = ({
|
|
|
9790
9819
|
};
|
|
9791
9820
|
if (!selectedItem) {
|
|
9792
9821
|
return /* @__PURE__ */ React109.createElement(
|
|
9793
|
-
|
|
9822
|
+
Paper9,
|
|
9794
9823
|
{
|
|
9795
9824
|
p: "md",
|
|
9796
9825
|
shadow: "sm",
|
|
@@ -9813,12 +9842,12 @@ var DynamicListSelectionPanel = ({
|
|
|
9813
9842
|
}
|
|
9814
9843
|
}
|
|
9815
9844
|
),
|
|
9816
|
-
/* @__PURE__ */ React109.createElement(Stack81, { align: "center", justify: "center", style: { flex: 1 } }, /* @__PURE__ */ React109.createElement(
|
|
9845
|
+
/* @__PURE__ */ React109.createElement(Stack81, { align: "center", justify: "center", style: { flex: 1 } }, /* @__PURE__ */ React109.createElement(Text55, { c: "dimmed" }, "No item selected"))
|
|
9817
9846
|
);
|
|
9818
9847
|
}
|
|
9819
9848
|
const customContent = dynamicListPanelRenderer ? dynamicListPanelRenderer(selectedItem, columns, dataSource, panelDescription, void 0, onClose) : null;
|
|
9820
9849
|
return /* @__PURE__ */ React109.createElement(
|
|
9821
|
-
|
|
9850
|
+
Paper9,
|
|
9822
9851
|
{
|
|
9823
9852
|
p: "md",
|
|
9824
9853
|
shadow: "sm",
|
|
@@ -10148,15 +10177,15 @@ function DynamicListBlock({ block, editor }) {
|
|
|
10148
10177
|
};
|
|
10149
10178
|
const renderField = (row, col, defaultText) => {
|
|
10150
10179
|
if (!col)
|
|
10151
|
-
return defaultText ? /* @__PURE__ */ React110.createElement(
|
|
10180
|
+
return defaultText ? /* @__PURE__ */ React110.createElement(Text56, { size: "sm", c: "dimmed" }, defaultText) : null;
|
|
10152
10181
|
const value = formatValue2(row[col.key], col.type);
|
|
10153
10182
|
if (!value) return null;
|
|
10154
|
-
return /* @__PURE__ */ React110.createElement(
|
|
10183
|
+
return /* @__PURE__ */ React110.createElement(Text56, { size: "sm", c: col.color || void 0, fw: col.position === "topLeft" || col.position === "topRight" ? 500 : void 0 }, value);
|
|
10155
10184
|
};
|
|
10156
10185
|
if (!listId) {
|
|
10157
|
-
return /* @__PURE__ */ React110.createElement(
|
|
10186
|
+
return /* @__PURE__ */ React110.createElement(Paper10, { p: "xl", withBorder: true, w: "100%", radius: "lg" }, /* @__PURE__ */ React110.createElement(Stack82, { align: "center", gap: "sm" }, /* @__PURE__ */ React110.createElement(IconDatabase, { size: 32, color: "var(--mantine-color-dimmed)" }), /* @__PURE__ */ React110.createElement(Text56, { fz: "18", ta: "center" }, "Dynamic List Block"), /* @__PURE__ */ React110.createElement(Text56, { fz: "sm", c: "dimmed", ta: "center" }, "This block will display dynamic data from AG-UI.", /* @__PURE__ */ React110.createElement("br", null), "Add a list from the AG-UI Canvas to populate it.")));
|
|
10158
10187
|
}
|
|
10159
|
-
return /* @__PURE__ */ React110.createElement(Stack82, { w: "100%" }, /* @__PURE__ */ React110.createElement(Flex21, { px: 5, align: "center", justify: "space-between" }, /* @__PURE__ */ React110.createElement(
|
|
10188
|
+
return /* @__PURE__ */ React110.createElement(Stack82, { w: "100%" }, /* @__PURE__ */ React110.createElement(Flex21, { px: 5, align: "center", justify: "space-between" }, /* @__PURE__ */ React110.createElement(Title4, { order: 4 }, title || "Dynamic List"), /* @__PURE__ */ React110.createElement(ActionIcon13, { variant: "subtle", size: "sm", onClick: toggle, "aria-label": opened ? "Collapse" : "Expand" }, opened ? /* @__PURE__ */ React110.createElement(IconChevronUp3, { size: 18 }) : /* @__PURE__ */ React110.createElement(IconChevronDown6, { size: 18 }))), /* @__PURE__ */ React110.createElement(Collapse6, { in: showInfo }, /* @__PURE__ */ React110.createElement(
|
|
10160
10189
|
Box25,
|
|
10161
10190
|
{
|
|
10162
10191
|
mx: 5,
|
|
@@ -10168,8 +10197,8 @@ function DynamicListBlock({ block, editor }) {
|
|
|
10168
10197
|
border: "1px solid var(--mantine-color-dark-4)"
|
|
10169
10198
|
}
|
|
10170
10199
|
},
|
|
10171
|
-
/* @__PURE__ */ React110.createElement(Flex21, { justify: "space-between", align: "flex-start", mb: "xs" }, /* @__PURE__ */ React110.createElement(Group33, { gap: "xs" }, /* @__PURE__ */ React110.createElement(IconInfoCircle2, { size: 14, color: "var(--mantine-color-blue-4)" }), /* @__PURE__ */ React110.createElement(
|
|
10172
|
-
/* @__PURE__ */ React110.createElement(Stack82, { gap: 6 }, parsedDataSource?.oracleName && /* @__PURE__ */ React110.createElement(Group33, { gap: "xs" }, /* @__PURE__ */ React110.createElement(
|
|
10200
|
+
/* @__PURE__ */ React110.createElement(Flex21, { justify: "space-between", align: "flex-start", mb: "xs" }, /* @__PURE__ */ React110.createElement(Group33, { gap: "xs" }, /* @__PURE__ */ React110.createElement(IconInfoCircle2, { size: 14, color: "var(--mantine-color-blue-4)" }), /* @__PURE__ */ React110.createElement(Text56, { fz: "xs", fw: 500, c: "dimmed" }, "Data Source")), /* @__PURE__ */ React110.createElement(ActionIcon13, { variant: "subtle", size: "xs", onClick: () => setShowInfo(false), "aria-label": "Close info" }, /* @__PURE__ */ React110.createElement(IconX5, { size: 14 }))),
|
|
10201
|
+
/* @__PURE__ */ React110.createElement(Stack82, { gap: 6 }, parsedDataSource?.oracleName && /* @__PURE__ */ React110.createElement(Group33, { gap: "xs" }, /* @__PURE__ */ React110.createElement(Text56, { fz: "xs", c: "dimmed", w: 70 }, "Oracle:"), /* @__PURE__ */ React110.createElement(Text56, { fz: "xs" }, parsedDataSource.oracleName)), parsedDataSource?.oracleDid && /* @__PURE__ */ React110.createElement(Group33, { gap: "xs" }, /* @__PURE__ */ React110.createElement(Text56, { fz: "xs", c: "dimmed", w: 70 }, "DID:"), /* @__PURE__ */ React110.createElement(Text56, { fz: "xs", style: { wordBreak: "break-all" } }, parsedDataSource.oracleDid)), parsedDataSource?.toolName && /* @__PURE__ */ React110.createElement(Group33, { gap: "xs" }, /* @__PURE__ */ React110.createElement(Text56, { fz: "xs", c: "dimmed", w: 70 }, "Tool:"), /* @__PURE__ */ React110.createElement(Text56, { fz: "xs" }, parsedDataSource.toolName)), parsedDataSource?.query && /* @__PURE__ */ React110.createElement(Box25, null, /* @__PURE__ */ React110.createElement(Text56, { fz: "xs", c: "dimmed", mb: 4 }, "Query:"), /* @__PURE__ */ React110.createElement(Text56, { fz: "xs", style: { whiteSpace: "pre-wrap" } }, parsedDataSource.query)), parsedDataSource?.description && /* @__PURE__ */ React110.createElement(Box25, null, /* @__PURE__ */ React110.createElement(Text56, { fz: "xs", c: "dimmed", mb: 4 }, "Description:"), /* @__PURE__ */ React110.createElement(Text56, { fz: "xs", fs: "italic" }, parsedDataSource.description)), parsedDataSource?.params && Object.keys(parsedDataSource.params).length > 0 && /* @__PURE__ */ React110.createElement(Box25, null, /* @__PURE__ */ React110.createElement(Text56, { fz: "xs", c: "dimmed", mb: 4 }, "Params:"), /* @__PURE__ */ React110.createElement(Code4, { block: true, style: { fontSize: "11px", whiteSpace: "pre-wrap" } }, JSON.stringify(parsedDataSource.params, null, 2))))
|
|
10173
10202
|
)), /* @__PURE__ */ React110.createElement(Collapse6, { pb: 5, px: 5, in: opened }, /* @__PURE__ */ React110.createElement(Stack82, { w: "100%" }, /* @__PURE__ */ React110.createElement(Collapse6, { in: showSearch }, /* @__PURE__ */ React110.createElement(Flex21, { gap: "xs", align: "center" }, /* @__PURE__ */ React110.createElement(
|
|
10174
10203
|
TextInput5,
|
|
10175
10204
|
{
|
|
@@ -10191,7 +10220,7 @@ function DynamicListBlock({ block, editor }) {
|
|
|
10191
10220
|
}
|
|
10192
10221
|
}
|
|
10193
10222
|
}
|
|
10194
|
-
), /* @__PURE__ */ React110.createElement(
|
|
10223
|
+
), /* @__PURE__ */ React110.createElement(ActionIcon13, { variant: "subtle", size: "sm", onClick: handleSearchToggle, "aria-label": "Close search", title: "Close search" }, /* @__PURE__ */ React110.createElement(IconChevronUp3, { size: 16 })))), sortConfig && /* @__PURE__ */ React110.createElement(Flex21, { align: "center", gap: "xs" }, /* @__PURE__ */ React110.createElement(Text56, { fz: "xs", c: "dimmed" }, "Sorted by ", parsedColumns.find((c) => c.key === sortConfig.key)?.label || sortConfig.key), sortConfig.direction === "asc" ? /* @__PURE__ */ React110.createElement(IconArrowUp3, { size: 14 }) : /* @__PURE__ */ React110.createElement(IconArrowDown3, { size: 14 })), hasData && /* @__PURE__ */ React110.createElement(Flex21, { justify: "space-between", align: "center" }, /* @__PURE__ */ React110.createElement(Group33, { gap: "xs" }, /* @__PURE__ */ React110.createElement(Text56, { fz: "sm", c: "dimmed" }, totalItems, " ", totalItems === 1 ? "item" : "items", searchQuery && rawData && ` of ${rawData.length}`, selectedIds.size > 0 && ` \u2022 ${selectedIds.size} selected`), useSnapshot && snapshotTimestamp && /* @__PURE__ */ React110.createElement(Tooltip10, { label: `Snapshot from ${new Date(snapshotTimestamp).toLocaleString()}` }, /* @__PURE__ */ React110.createElement(Text56, { fz: "xs", c: "yellow", style: { cursor: "help" } }, "(snapshot)")), useSnapshot && !snapshotTimestamp && /* @__PURE__ */ React110.createElement(Text56, { fz: "xs", c: "yellow" }, "(snapshot)"), !useSnapshot && /* @__PURE__ */ React110.createElement(Text56, { fz: "xs", c: "green" }, "(live)")), /* @__PURE__ */ React110.createElement(Group33, { gap: "xs" }, editable && /* @__PURE__ */ React110.createElement(React110.Fragment, null, useSnapshot && liveData.items && liveData.items.length > 0 && /* @__PURE__ */ React110.createElement(Button20, { size: "compact-xs", variant: "subtle", onClick: handleUseLiveData, leftSection: /* @__PURE__ */ React110.createElement(IconRefresh2, { size: 12 }) }, "Use Live"), !useSnapshot && hasSnapshot && /* @__PURE__ */ React110.createElement(Button20, { size: "compact-xs", variant: "subtle", onClick: handleUseSnapshot, leftSection: /* @__PURE__ */ React110.createElement(IconCamera, { size: 12 }) }, "Use Snapshot"), !useSnapshot && liveData.items && liveData.items.length > 0 && /* @__PURE__ */ React110.createElement(Tooltip10, { label: "Save current data as snapshot" }, /* @__PURE__ */ React110.createElement(ActionIcon13, { variant: "subtle", size: "sm", onClick: handleSaveSnapshot }, /* @__PURE__ */ React110.createElement(IconCamera, { size: 16 })))), /* @__PURE__ */ React110.createElement(
|
|
10195
10224
|
Menu2,
|
|
10196
10225
|
{
|
|
10197
10226
|
shadow: "md",
|
|
@@ -10219,8 +10248,8 @@ function DynamicListBlock({ block, editor }) {
|
|
|
10219
10248
|
}
|
|
10220
10249
|
}
|
|
10221
10250
|
},
|
|
10222
|
-
/* @__PURE__ */ React110.createElement(Menu2.Target, null, /* @__PURE__ */ React110.createElement(
|
|
10223
|
-
/* @__PURE__ */ React110.createElement(Menu2.Dropdown, null, sortOptions.length > 0 && /* @__PURE__ */ React110.createElement(React110.Fragment, null, /* @__PURE__ */ React110.createElement(Menu2.Label, { onClick: () => setOrderByCollapsed(!orderByCollapsed), style: { cursor: "pointer" } }, /* @__PURE__ */ React110.createElement(Flex21, { align: "center", gap: 10 }, orderByCollapsed ? /* @__PURE__ */ React110.createElement(IconChevronRight5, { size: 14 }) : /* @__PURE__ */ React110.createElement(IconChevronDown6, { size: 14 }), /* @__PURE__ */ React110.createElement(
|
|
10251
|
+
/* @__PURE__ */ React110.createElement(Menu2.Target, null, /* @__PURE__ */ React110.createElement(ActionIcon13, { variant: "subtle", size: "sm", "aria-label": "List actions", title: "List actions" }, /* @__PURE__ */ React110.createElement(IconAdjustmentsHorizontal2, { size: 18 }))),
|
|
10252
|
+
/* @__PURE__ */ React110.createElement(Menu2.Dropdown, null, sortOptions.length > 0 && /* @__PURE__ */ React110.createElement(React110.Fragment, null, /* @__PURE__ */ React110.createElement(Menu2.Label, { onClick: () => setOrderByCollapsed(!orderByCollapsed), style: { cursor: "pointer" } }, /* @__PURE__ */ React110.createElement(Flex21, { align: "center", gap: 10 }, orderByCollapsed ? /* @__PURE__ */ React110.createElement(IconChevronRight5, { size: 14 }) : /* @__PURE__ */ React110.createElement(IconChevronDown6, { size: 14 }), /* @__PURE__ */ React110.createElement(Text56, { fz: "14" }, "Order By"))), /* @__PURE__ */ React110.createElement(Collapse6, { in: !orderByCollapsed }, sortOptions.map((opt) => {
|
|
10224
10253
|
const isAscActive = sortConfig?.key === opt.key && sortConfig?.direction === "asc";
|
|
10225
10254
|
const isDescActive = sortConfig?.key === opt.key && sortConfig?.direction === "desc";
|
|
10226
10255
|
const isRowActive = isAscActive || isDescActive;
|
|
@@ -10237,7 +10266,7 @@ function DynamicListBlock({ block, editor }) {
|
|
|
10237
10266
|
}
|
|
10238
10267
|
},
|
|
10239
10268
|
/* @__PURE__ */ React110.createElement(Flex21, { align: "center", justify: "space-between", gap: "xs" }, /* @__PURE__ */ React110.createElement(
|
|
10240
|
-
|
|
10269
|
+
ActionIcon13,
|
|
10241
10270
|
{
|
|
10242
10271
|
variant: "subtle",
|
|
10243
10272
|
size: "xs",
|
|
@@ -10254,8 +10283,8 @@ function DynamicListBlock({ block, editor }) {
|
|
|
10254
10283
|
}
|
|
10255
10284
|
},
|
|
10256
10285
|
/* @__PURE__ */ React110.createElement(IconArrowUp3, { size: 14 })
|
|
10257
|
-
), /* @__PURE__ */ React110.createElement(
|
|
10258
|
-
|
|
10286
|
+
), /* @__PURE__ */ React110.createElement(Text56, { fz: "sm", style: { flex: 1, textAlign: "center" } }, opt.label), /* @__PURE__ */ React110.createElement(
|
|
10287
|
+
ActionIcon13,
|
|
10259
10288
|
{
|
|
10260
10289
|
variant: "subtle",
|
|
10261
10290
|
size: "xs",
|
|
@@ -10274,7 +10303,7 @@ function DynamicListBlock({ block, editor }) {
|
|
|
10274
10303
|
/* @__PURE__ */ React110.createElement(IconArrowDown3, { size: 14 })
|
|
10275
10304
|
))
|
|
10276
10305
|
);
|
|
10277
|
-
})), /* @__PURE__ */ React110.createElement(Menu2.Divider, null)), parsedColumns.length > 0 && /* @__PURE__ */ React110.createElement(React110.Fragment, null, /* @__PURE__ */ React110.createElement(Menu2.Label, { onClick: () => setColumnsCollapsed(!columnsCollapsed), style: { cursor: "pointer" } }, /* @__PURE__ */ React110.createElement(Flex21, { align: "center", gap: 10 }, columnsCollapsed ? /* @__PURE__ */ React110.createElement(IconChevronRight5, { size: 14 }) : /* @__PURE__ */ React110.createElement(IconChevronDown6, { size: 14 }), /* @__PURE__ */ React110.createElement(
|
|
10306
|
+
})), /* @__PURE__ */ React110.createElement(Menu2.Divider, null)), parsedColumns.length > 0 && /* @__PURE__ */ React110.createElement(React110.Fragment, null, /* @__PURE__ */ React110.createElement(Menu2.Label, { onClick: () => setColumnsCollapsed(!columnsCollapsed), style: { cursor: "pointer" } }, /* @__PURE__ */ React110.createElement(Flex21, { align: "center", gap: 10 }, columnsCollapsed ? /* @__PURE__ */ React110.createElement(IconChevronRight5, { size: 14 }) : /* @__PURE__ */ React110.createElement(IconChevronDown6, { size: 14 }), /* @__PURE__ */ React110.createElement(Text56, { fz: "14" }, "Columns"))), /* @__PURE__ */ React110.createElement(Collapse6, { in: !columnsCollapsed }, parsedColumns.map((col) => /* @__PURE__ */ React110.createElement(Box25, { key: col.key, px: "sm", py: 4, style: { margin: "2px 4px" } }, /* @__PURE__ */ React110.createElement(Flex21, { align: "center", justify: "space-between", gap: "xs" }, /* @__PURE__ */ React110.createElement(Text56, { fz: "xs", style: { flex: 1, minWidth: 0 }, lineClamp: 1 }, col.label), /* @__PURE__ */ React110.createElement(
|
|
10278
10307
|
Select3,
|
|
10279
10308
|
{
|
|
10280
10309
|
size: "xs",
|
|
@@ -10301,7 +10330,7 @@ function DynamicListBlock({ block, editor }) {
|
|
|
10301
10330
|
}
|
|
10302
10331
|
}
|
|
10303
10332
|
},
|
|
10304
|
-
renderOption: ({ option, checked }) => /* @__PURE__ */ React110.createElement(
|
|
10333
|
+
renderOption: ({ option, checked }) => /* @__PURE__ */ React110.createElement(Text56, { fz: "xs", c: checked ? "blue.4" : "#fff" }, option.label),
|
|
10305
10334
|
styles: {
|
|
10306
10335
|
input: {
|
|
10307
10336
|
fontSize: "12px",
|
|
@@ -10323,11 +10352,11 @@ function DynamicListBlock({ block, editor }) {
|
|
|
10323
10352
|
},
|
|
10324
10353
|
isMultiSelect ? "Done Selecting" : "Multi Select"
|
|
10325
10354
|
), allData && allData.length > 0 && /* @__PURE__ */ React110.createElement(React110.Fragment, null, /* @__PURE__ */ React110.createElement(Menu2.Divider, null), /* @__PURE__ */ React110.createElement(Menu2.Item, { onClick: () => downloadArrayAsCsv(allData), leftSection: /* @__PURE__ */ React110.createElement(IconDownload2, { size: 16 }) }, "Download CSV")))
|
|
10326
|
-
))), !useSnapshot && liveData.loading && /* @__PURE__ */ React110.createElement(
|
|
10355
|
+
))), !useSnapshot && liveData.loading && /* @__PURE__ */ React110.createElement(Paper10, { p: "lg", bg: "var(--mantine-color-dark-6)", radius: "sm" }, /* @__PURE__ */ React110.createElement(Text56, { c: "dimmed", ta: "center" }, "Loading data...")), !useSnapshot && liveData.error && /* @__PURE__ */ React110.createElement(Paper10, { p: "lg", bg: "var(--mantine-color-red-9)", radius: "sm" }, /* @__PURE__ */ React110.createElement(Text56, { c: "white", ta: "center" }, "Error: ", liveData.error)), hasData && paginatedData && /* @__PURE__ */ React110.createElement(Stack82, { gap: "xs" }, paginatedData.map((row, index) => {
|
|
10327
10356
|
const rowId = getRowId(row, index);
|
|
10328
10357
|
const isChecked = isItemChecked(rowId);
|
|
10329
|
-
return /* @__PURE__ */ React110.createElement(ListItemContainer, { key: rowId, isChecked, onClick: () => onItemCheck(rowId, !isChecked) }, /* @__PURE__ */ React110.createElement(Flex21, { align: "center", gap: "sm" }, /* @__PURE__ */ React110.createElement(Stack82, { gap: 2 }, renderField(row, columnsByPosition.topLeft), columnsByPosition.bottomLeft && /* @__PURE__ */ React110.createElement(
|
|
10330
|
-
})), hasData && totalPages > 1 && /* @__PURE__ */ React110.createElement(ListPagination, { page, setPage, totalPages }), !hasData && !liveData.loading && searchQuery && rawData && rawData.length > 0 && /* @__PURE__ */ React110.createElement(
|
|
10358
|
+
return /* @__PURE__ */ React110.createElement(ListItemContainer, { key: rowId, isChecked, onClick: () => onItemCheck(rowId, !isChecked) }, /* @__PURE__ */ React110.createElement(Flex21, { align: "center", gap: "sm" }, /* @__PURE__ */ React110.createElement(Stack82, { gap: 2 }, renderField(row, columnsByPosition.topLeft), columnsByPosition.bottomLeft && /* @__PURE__ */ React110.createElement(Text56, { size: "xs", c: columnsByPosition.bottomLeft.color || "dimmed", lineClamp: 1 }, formatValue2(row[columnsByPosition.bottomLeft.key], columnsByPosition.bottomLeft.type) || ""))), /* @__PURE__ */ React110.createElement(Flex21, { align: "center", gap: "md" }, /* @__PURE__ */ React110.createElement(Stack82, { gap: 2, align: "flex-end" }, columnsByPosition.topRight && /* @__PURE__ */ React110.createElement(Text56, { size: "sm", fw: 500, c: columnsByPosition.topRight.color || void 0 }, formatValue2(row[columnsByPosition.topRight.key], columnsByPosition.topRight.type) || ""), columnsByPosition.bottomRight && /* @__PURE__ */ React110.createElement(Text56, { size: "xs", c: columnsByPosition.bottomRight.color || "dimmed", tt: "capitalize" }, formatValue2(row[columnsByPosition.bottomRight.key], columnsByPosition.bottomRight.type) || "")), isMultiSelect && /* @__PURE__ */ React110.createElement(ListItemCheckbox, { ariaLabel: `Select ${rowId}`, checked: isChecked, onCheck: (checked) => onItemCheck(rowId, checked) })));
|
|
10359
|
+
})), hasData && totalPages > 1 && /* @__PURE__ */ React110.createElement(ListPagination, { page, setPage, totalPages }), !hasData && !liveData.loading && searchQuery && rawData && rawData.length > 0 && /* @__PURE__ */ React110.createElement(Text56, { c: "dimmed", ta: "center", fz: "sm" }, "No matching items for \u201C", searchQuery, "\u201D"), !hasData && !liveData.loading && !searchQuery && parsedDataSource && /* @__PURE__ */ React110.createElement(Paper10, { p: "lg", bg: "var(--mantine-color-dark-6)", radius: "sm" }, /* @__PURE__ */ React110.createElement(Stack82, { gap: "sm" }, /* @__PURE__ */ React110.createElement(Group33, { gap: "xs" }, /* @__PURE__ */ React110.createElement(IconSparkles2, { size: 16, color: "var(--mantine-color-blue-4)" }), /* @__PURE__ */ React110.createElement(Text56, { fz: "sm", fw: 500 }, "Data Source")), parsedDataSource.oracleName && /* @__PURE__ */ React110.createElement(Group33, { gap: "xs" }, /* @__PURE__ */ React110.createElement(Text56, { size: "xs", c: "dimmed" }, "Oracle:"), /* @__PURE__ */ React110.createElement(Badge15, { size: "sm", variant: "light" }, parsedDataSource.oracleName)), parsedDataSource.query && /* @__PURE__ */ React110.createElement(Box25, null, /* @__PURE__ */ React110.createElement(Text56, { size: "xs", c: "dimmed", mb: 4 }, "Query:"), /* @__PURE__ */ React110.createElement(Code4, { block: true, style: { fontSize: "12px", whiteSpace: "pre-wrap" } }, parsedDataSource.query)), parsedDataSource.description && /* @__PURE__ */ React110.createElement(Text56, { size: "xs", c: "dimmed", fs: "italic" }, parsedDataSource.description), /* @__PURE__ */ React110.createElement(Text56, { size: "xs", c: "dimmed", ta: "center", mt: "xs" }, "Ask your oracle this query to populate the list."))), !hasData && !liveData.loading && !searchQuery && !parsedDataSource && /* @__PURE__ */ React110.createElement(Paper10, { p: "lg", bg: "var(--mantine-color-dark-6)", radius: "sm" }, /* @__PURE__ */ React110.createElement(Text56, { c: "dimmed", ta: "center", fz: "sm" }, "No data available. Add data from the AG-UI Canvas.")))));
|
|
10331
10360
|
}
|
|
10332
10361
|
|
|
10333
10362
|
// src/mantine/blocks/dynamicList/DynamicListBlockSpec.tsx
|
|
@@ -10373,17 +10402,17 @@ var DynamicListBlockSpec = createReactBlockSpec6(
|
|
|
10373
10402
|
// src/mantine/blocks/enumChecklist/EnumChecklistBlock.tsx
|
|
10374
10403
|
import React118, { useState as useState36, useEffect as useEffect21, useMemo as useMemo20, useCallback as useCallback21 } from "react";
|
|
10375
10404
|
import { createReactBlockSpec as createReactBlockSpec7 } from "@blocknote/react";
|
|
10376
|
-
import { Stack as Stack88, Text as
|
|
10405
|
+
import { Stack as Stack88, Text as Text62, Button as Button25, ActionIcon as ActionIcon14, Center as Center4, Flex as Flex23 } from "@mantine/core";
|
|
10377
10406
|
|
|
10378
10407
|
// src/mantine/blocks/enumChecklist/oracle_personalities/index.tsx
|
|
10379
10408
|
import React112 from "react";
|
|
10380
|
-
import { Box as Box26, Flex as Flex22, Stack as Stack83, Text as
|
|
10409
|
+
import { Box as Box26, Flex as Flex22, Stack as Stack83, Text as Text57, Image as Image14 } from "@mantine/core";
|
|
10381
10410
|
function OraclePersonalitiesEnumList({ selectionMode, isItemChecked, onItemCheck, items }) {
|
|
10382
10411
|
if (!items || items.length === 0) {
|
|
10383
|
-
return /* @__PURE__ */ React112.createElement(
|
|
10412
|
+
return /* @__PURE__ */ React112.createElement(Text57, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No assets found");
|
|
10384
10413
|
}
|
|
10385
10414
|
const rows = items.map(({ id, name, description, voice, icon }) => /* @__PURE__ */ React112.createElement(ListItemContainer, { key: id, isChecked: false, onClick: () => {
|
|
10386
|
-
} }, /* @__PURE__ */ React112.createElement(Flex22, { align: "center", gap: "sm" }, /* @__PURE__ */ React112.createElement(Image14, { radius: 16, w: 62, h: 62, src: icon, alt: name }), /* @__PURE__ */ React112.createElement(Stack83, { gap: 0 }, /* @__PURE__ */ React112.createElement(
|
|
10415
|
+
} }, /* @__PURE__ */ React112.createElement(Flex22, { align: "center", gap: "sm" }, /* @__PURE__ */ React112.createElement(Image14, { radius: 16, w: 62, h: 62, src: icon, alt: name }), /* @__PURE__ */ React112.createElement(Stack83, { gap: 0 }, /* @__PURE__ */ React112.createElement(Text57, { size: "sm", fw: 500 }, name || "-"), description !== void 0 && /* @__PURE__ */ React112.createElement(Text57, { size: "sm", c: "dimmed" }, description))), /* @__PURE__ */ React112.createElement(Flex22, { align: "center", gap: "md" }, /* @__PURE__ */ React112.createElement(Stack83, { ta: "right", gap: 0 }, /* @__PURE__ */ React112.createElement(Text57, { size: "sm", fw: 500 }, "Voice"), /* @__PURE__ */ React112.createElement(Text57, { size: "sm", c: "dimmed" }, voice)), selectionMode && /* @__PURE__ */ React112.createElement(ListItemCheckbox, { ariaLabel: `Select oracle ${name}`, checked: isItemChecked?.(id), onCheck: (checked) => onItemCheck?.(id, checked) }))));
|
|
10387
10416
|
return /* @__PURE__ */ React112.createElement(Box26, { flex: 1 }, /* @__PURE__ */ React112.createElement(Stack83, null, rows));
|
|
10388
10417
|
}
|
|
10389
10418
|
|
|
@@ -10393,7 +10422,7 @@ import { Modal, Group as Group37, Box as Box28 } from "@mantine/core";
|
|
|
10393
10422
|
|
|
10394
10423
|
// src/mantine/blocks/list/modal/ModalNavigation.tsx
|
|
10395
10424
|
import React113 from "react";
|
|
10396
|
-
import { Stack as Stack84, Button as Button21, Text as
|
|
10425
|
+
import { Stack as Stack84, Button as Button21, Text as Text58 } from "@mantine/core";
|
|
10397
10426
|
var ModalNavigation = ({ steps, activeStep, onStepChange, showUpdateButton = false, onUpdateBlock }) => {
|
|
10398
10427
|
return /* @__PURE__ */ React113.createElement(Stack84, { gap: "xs", style: { height: "100%" } }, /* @__PURE__ */ React113.createElement(Stack84, { gap: "xs", style: { flex: 1 } }, steps.map((step) => /* @__PURE__ */ React113.createElement(
|
|
10399
10428
|
Button21,
|
|
@@ -10413,13 +10442,13 @@ var ModalNavigation = ({ steps, activeStep, onStepChange, showUpdateButton = fal
|
|
|
10413
10442
|
}
|
|
10414
10443
|
}
|
|
10415
10444
|
},
|
|
10416
|
-
/* @__PURE__ */ React113.createElement(Stack84, { gap: 2, align: "flex-start" }, /* @__PURE__ */ React113.createElement(
|
|
10445
|
+
/* @__PURE__ */ React113.createElement(Stack84, { gap: 2, align: "flex-start" }, /* @__PURE__ */ React113.createElement(Text58, { size: "sm", fw: 500 }, step.label), /* @__PURE__ */ React113.createElement(Text58, { size: "xs", opacity: 0.7 }, step.description))
|
|
10417
10446
|
))), showUpdateButton && /* @__PURE__ */ React113.createElement(Button21, { variant: "filled", color: "blue", onClick: onUpdateBlock, style: { marginTop: "auto" } }, "Update Block"));
|
|
10418
10447
|
};
|
|
10419
10448
|
|
|
10420
10449
|
// src/mantine/blocks/enumChecklist/EnumChecklistTypeSelection.tsx
|
|
10421
10450
|
import React114 from "react";
|
|
10422
|
-
import { Stack as Stack85, Card as Card15, Group as Group34, Text as
|
|
10451
|
+
import { Stack as Stack85, Card as Card15, Group as Group34, Text as Text59, Box as Box27, Button as Button22 } from "@mantine/core";
|
|
10423
10452
|
|
|
10424
10453
|
// src/mantine/blocks/enumChecklist/oracle_personalities/config.ts
|
|
10425
10454
|
var oraclePersonalitiesMetadata = {
|
|
@@ -10548,7 +10577,7 @@ function getEnumListItems(type) {
|
|
|
10548
10577
|
// src/mantine/blocks/enumChecklist/EnumChecklistTypeSelection.tsx
|
|
10549
10578
|
var EnumChecklistTypeSelection = ({ selectedType, onTypeSelect, onNext }) => {
|
|
10550
10579
|
const enumListsMeta = getEnumListTypesMetadata();
|
|
10551
|
-
return /* @__PURE__ */ React114.createElement(Stack85, { gap: "md" }, /* @__PURE__ */ React114.createElement("div", null, /* @__PURE__ */ React114.createElement(
|
|
10580
|
+
return /* @__PURE__ */ React114.createElement(Stack85, { gap: "md" }, /* @__PURE__ */ React114.createElement("div", null, /* @__PURE__ */ React114.createElement(Text59, { size: "lg", fw: 600, mb: "xs" }, "Choose List Type"), /* @__PURE__ */ React114.createElement(Text59, { size: "sm", c: "dimmed" }, "Select the type of list you want to create")), /* @__PURE__ */ React114.createElement(Stack85, { gap: "sm" }, enumListsMeta.map((enumChecklistMeta) => /* @__PURE__ */ React114.createElement(
|
|
10552
10581
|
Card15,
|
|
10553
10582
|
{
|
|
10554
10583
|
key: enumChecklistMeta.id,
|
|
@@ -10577,13 +10606,13 @@ var EnumChecklistTypeSelection = ({ selectedType, onTypeSelect, onNext }) => {
|
|
|
10577
10606
|
}
|
|
10578
10607
|
},
|
|
10579
10608
|
enumChecklistMeta.icon
|
|
10580
|
-
), /* @__PURE__ */ React114.createElement(Stack85, { gap: 2, style: { flex: 1 } }, /* @__PURE__ */ React114.createElement(
|
|
10609
|
+
), /* @__PURE__ */ React114.createElement(Stack85, { gap: 2, style: { flex: 1 } }, /* @__PURE__ */ React114.createElement(Text59, { size: "md", fw: 600 }, enumChecklistMeta.name), /* @__PURE__ */ React114.createElement(Text59, { size: "sm", c: "dimmed" }, enumChecklistMeta.description)))
|
|
10581
10610
|
))), /* @__PURE__ */ React114.createElement(Group34, { justify: "flex-end", mt: "md" }, /* @__PURE__ */ React114.createElement(Button22, { onClick: onNext, disabled: !selectedType }, "Next")));
|
|
10582
10611
|
};
|
|
10583
10612
|
|
|
10584
10613
|
// src/mantine/blocks/enumChecklist/EnumChecklistPreviewStep.tsx
|
|
10585
10614
|
import React115 from "react";
|
|
10586
|
-
import { Stack as Stack86, Text as
|
|
10615
|
+
import { Stack as Stack86, Text as Text60, Button as Button23, Group as Group35 } from "@mantine/core";
|
|
10587
10616
|
var EnumChecklistPreviewStep = ({ listType, onAddToBlock, onPrev }) => {
|
|
10588
10617
|
const renderListComponent = () => {
|
|
10589
10618
|
switch (listType) {
|
|
@@ -10593,12 +10622,12 @@ var EnumChecklistPreviewStep = ({ listType, onAddToBlock, onPrev }) => {
|
|
|
10593
10622
|
return null;
|
|
10594
10623
|
}
|
|
10595
10624
|
};
|
|
10596
|
-
return /* @__PURE__ */ React115.createElement(Stack86, { gap: "md" }, /* @__PURE__ */ React115.createElement("div", null, /* @__PURE__ */ React115.createElement(
|
|
10625
|
+
return /* @__PURE__ */ React115.createElement(Stack86, { gap: "md" }, /* @__PURE__ */ React115.createElement("div", null, /* @__PURE__ */ React115.createElement(Text60, { size: "lg", fw: 600, mb: "xs" }, "Preview ", getEnumListNameByType(listType)), /* @__PURE__ */ React115.createElement(Text60, { size: "sm", c: "dimmed" }, "Preview how your list will look with the current configuration")), /* @__PURE__ */ React115.createElement("div", { style: { maxHeight: "400px", overflow: "auto" } }, renderListComponent()), /* @__PURE__ */ React115.createElement(Group35, { justify: "space-between", mt: "md" }, /* @__PURE__ */ React115.createElement(Button23, { variant: "subtle", onClick: onPrev }, "Previous"), /* @__PURE__ */ React115.createElement(Button23, { onClick: onAddToBlock }, "Add to Block")));
|
|
10597
10626
|
};
|
|
10598
10627
|
|
|
10599
10628
|
// src/mantine/blocks/enumChecklist/EnumChecklistConfigurationStep.tsx
|
|
10600
10629
|
import React116 from "react";
|
|
10601
|
-
import { Stack as Stack87, Text as
|
|
10630
|
+
import { Stack as Stack87, Text as Text61, Button as Button24, Group as Group36, Switch as Switch5 } from "@mantine/core";
|
|
10602
10631
|
var EnumChecklistConfigurationStep = ({ enumChecklistType: listType, config, onConfigChange, onPrev, onNext, isValid }) => {
|
|
10603
10632
|
const typeConfig = ENUM_LIST_CONFIG[listType];
|
|
10604
10633
|
const configFields = getEnumListTypesConfigFields(listType);
|
|
@@ -10653,7 +10682,7 @@ var EnumChecklistConfigurationStep = ({ enumChecklistType: listType, config, onC
|
|
|
10653
10682
|
);
|
|
10654
10683
|
}
|
|
10655
10684
|
};
|
|
10656
|
-
return /* @__PURE__ */ React116.createElement(Stack87, { gap: "md" }, /* @__PURE__ */ React116.createElement("div", null, /* @__PURE__ */ React116.createElement(
|
|
10685
|
+
return /* @__PURE__ */ React116.createElement(Stack87, { gap: "md" }, /* @__PURE__ */ React116.createElement("div", null, /* @__PURE__ */ React116.createElement(Text61, { size: "lg", fw: 600, mb: "xs" }, "Configure ", typeConfig.metadata.name), /* @__PURE__ */ React116.createElement(Text61, { size: "sm", c: "dimmed" }, typeConfig.metadata.description)), /* @__PURE__ */ React116.createElement(Stack87, { gap: "sm" }, configFields.map((field) => /* @__PURE__ */ React116.createElement("div", { key: field.key }, renderListConfigField(field)))), /* @__PURE__ */ React116.createElement(Group36, { justify: "space-between", mt: "md" }, /* @__PURE__ */ React116.createElement(Button24, { variant: "subtle", onClick: onPrev }, "Previous"), /* @__PURE__ */ React116.createElement(Button24, { onClick: onNext, disabled: !isValid }, "Next")));
|
|
10657
10686
|
};
|
|
10658
10687
|
|
|
10659
10688
|
// src/mantine/blocks/enumChecklist/EnumChecklistConfigModal.tsx
|
|
@@ -10738,7 +10767,7 @@ var EnumChecklistConfigModal = ({ opened, onClose, onSave, initialConfig }) => {
|
|
|
10738
10767
|
};
|
|
10739
10768
|
|
|
10740
10769
|
// src/mantine/blocks/enumChecklist/EnumChecklistBlock.tsx
|
|
10741
|
-
var
|
|
10770
|
+
var IconSettings2 = () => /* @__PURE__ */ React118.createElement("span", null, "\u2699\uFE0F");
|
|
10742
10771
|
var EnumChecklistBlockType = "enumChecklist";
|
|
10743
10772
|
var EnumChecklistBlockContent = ({ block, editor }) => {
|
|
10744
10773
|
const [modalOpened, setModalOpened] = useState36(false);
|
|
@@ -10835,7 +10864,7 @@ var EnumChecklistBlockContent = ({ block, editor }) => {
|
|
|
10835
10864
|
return null;
|
|
10836
10865
|
}
|
|
10837
10866
|
};
|
|
10838
|
-
return /* @__PURE__ */ React118.createElement(Stack88, { w: "100%" }, listType && /* @__PURE__ */ React118.createElement(Flex23, { align: "center", justify: "space-between", gap: "xs" }, /* @__PURE__ */ React118.createElement(
|
|
10867
|
+
return /* @__PURE__ */ React118.createElement(Stack88, { w: "100%" }, listType && /* @__PURE__ */ React118.createElement(Flex23, { align: "center", justify: "space-between", gap: "xs" }, /* @__PURE__ */ React118.createElement(Text62, null, getEnumListNameByType(listType)), listConfig.listSelectionMode && /* @__PURE__ */ React118.createElement(Text62, { lh: 0.5, c: "dimmed" }, listConfig?.selection_mode === "single" ? "Single Selection" : "Multi Selection"), editable && /* @__PURE__ */ React118.createElement(Flex23, { justify: listType ? "space-between" : "flex-end" }, /* @__PURE__ */ React118.createElement(Flex23, { gap: "xs" }, /* @__PURE__ */ React118.createElement(ActionIcon14, { variant: "subtle", size: "sm", onClick: () => setModalOpened(true) }, /* @__PURE__ */ React118.createElement(IconSettings2, null))))), /* @__PURE__ */ React118.createElement(Flex23, { flex: 1 }, !listType ? /* @__PURE__ */ React118.createElement(Center4, { py: "xl" }, /* @__PURE__ */ React118.createElement(Stack88, { align: "center", gap: "sm" }, /* @__PURE__ */ React118.createElement(Text62, { size: "sm", c: "dimmed", ta: "center" }, "No list type configured"), /* @__PURE__ */ React118.createElement(Button25, { size: "sm", variant: "light", onClick: () => setModalOpened(true) }, "Configure List"))) : /* @__PURE__ */ React118.createElement(Stack88, { gap: "md", flex: 1 }, renderListComponent())), /* @__PURE__ */ React118.createElement(
|
|
10839
10868
|
EnumChecklistConfigModal,
|
|
10840
10869
|
{
|
|
10841
10870
|
opened: modalOpened,
|
|
@@ -10886,7 +10915,7 @@ import React120, { useCallback as useCallback22 } from "react";
|
|
|
10886
10915
|
|
|
10887
10916
|
// src/mantine/blocks/notify/template/GeneralTab.tsx
|
|
10888
10917
|
import React119, { useEffect as useEffect22, useState as useState37 } from "react";
|
|
10889
|
-
import { Divider as Divider9, Stack as Stack89, Text as
|
|
10918
|
+
import { Divider as Divider9, Stack as Stack89, Text as Text63, Group as Group38, ActionIcon as ActionIcon15, Paper as Paper11 } from "@mantine/core";
|
|
10890
10919
|
import { IconTrash as IconTrash4 } from "@tabler/icons-react";
|
|
10891
10920
|
var GeneralTab5 = ({
|
|
10892
10921
|
title,
|
|
@@ -11003,7 +11032,7 @@ var GeneralTab5 = ({
|
|
|
11003
11032
|
{ value: "rcs", label: "RCS (Coming Soon)", disabled: true }
|
|
11004
11033
|
]
|
|
11005
11034
|
}
|
|
11006
|
-
)), /* @__PURE__ */ React119.createElement(Divider9, { variant: "dashed" }), localChannel === "email" && /* @__PURE__ */ React119.createElement(React119.Fragment, null, /* @__PURE__ */ React119.createElement(Stack89, { gap: "xs" }, /* @__PURE__ */ React119.createElement(Group38, { justify: "space-between" }, /* @__PURE__ */ React119.createElement(
|
|
11035
|
+
)), /* @__PURE__ */ React119.createElement(Divider9, { variant: "dashed" }), localChannel === "email" && /* @__PURE__ */ React119.createElement(React119.Fragment, null, /* @__PURE__ */ React119.createElement(Stack89, { gap: "xs" }, /* @__PURE__ */ React119.createElement(Group38, { justify: "space-between" }, /* @__PURE__ */ React119.createElement(Text63, { size: "sm", fw: 600 }, "To (Recipients)"), /* @__PURE__ */ React119.createElement(BaseButton, { leftSection: getIcon("plus", "plus", "black"), onClick: () => handleAddRecipient("to") }, "Add")), localTo.length === 0 && /* @__PURE__ */ React119.createElement(Text63, { size: "xs", c: "dimmed" }, "No recipients added yet"), /* @__PURE__ */ React119.createElement(Stack89, { gap: "xs" }, localTo.map((recipient, index) => /* @__PURE__ */ React119.createElement(Paper11, { key: index, p: "xs", withBorder: true }, /* @__PURE__ */ React119.createElement(Group38, { gap: "xs", wrap: "nowrap", align: "flex-start" }, /* @__PURE__ */ React119.createElement(
|
|
11007
11036
|
DataInput,
|
|
11008
11037
|
{
|
|
11009
11038
|
placeholder: "email@example.com or reference",
|
|
@@ -11013,7 +11042,7 @@ var GeneralTab5 = ({
|
|
|
11013
11042
|
currentBlockId: blockId,
|
|
11014
11043
|
size: "sm"
|
|
11015
11044
|
}
|
|
11016
|
-
), /* @__PURE__ */ React119.createElement(
|
|
11045
|
+
), /* @__PURE__ */ React119.createElement(ActionIcon15, { color: "red", variant: "light", onClick: () => handleRemoveRecipient("to", index) }, /* @__PURE__ */ React119.createElement(IconTrash4, { size: 16 }))))))), /* @__PURE__ */ React119.createElement(Stack89, { gap: "xs" }, /* @__PURE__ */ React119.createElement(Group38, { justify: "space-between" }, /* @__PURE__ */ React119.createElement(Text63, { size: "sm", fw: 600 }, "CC (Optional)"), /* @__PURE__ */ React119.createElement(BaseButton, { leftSection: getIcon("plus", "plus", "black"), onClick: () => handleAddRecipient("cc") }, "Add")), localCc.length > 0 && /* @__PURE__ */ React119.createElement(Stack89, { gap: "xs" }, localCc.map((recipient, index) => /* @__PURE__ */ React119.createElement(Paper11, { key: index, p: "xs", withBorder: true }, /* @__PURE__ */ React119.createElement(Group38, { gap: "xs", wrap: "nowrap", align: "flex-start" }, /* @__PURE__ */ React119.createElement(
|
|
11017
11046
|
DataInput,
|
|
11018
11047
|
{
|
|
11019
11048
|
placeholder: "email@example.com or reference",
|
|
@@ -11023,7 +11052,7 @@ var GeneralTab5 = ({
|
|
|
11023
11052
|
currentBlockId: blockId,
|
|
11024
11053
|
size: "sm"
|
|
11025
11054
|
}
|
|
11026
|
-
), /* @__PURE__ */ React119.createElement(
|
|
11055
|
+
), /* @__PURE__ */ React119.createElement(ActionIcon15, { color: "red", variant: "light", onClick: () => handleRemoveRecipient("cc", index) }, /* @__PURE__ */ React119.createElement(IconTrash4, { size: 16 }))))))), /* @__PURE__ */ React119.createElement(Stack89, { gap: "xs" }, /* @__PURE__ */ React119.createElement(Group38, { justify: "space-between" }, /* @__PURE__ */ React119.createElement(Text63, { size: "sm", fw: 600 }, "BCC (Optional)"), /* @__PURE__ */ React119.createElement(BaseButton, { leftSection: getIcon("plus", "plus", "black"), onClick: () => handleAddRecipient("bcc") }, "Add")), localBcc.length > 0 && /* @__PURE__ */ React119.createElement(Stack89, { gap: "xs" }, localBcc.map((recipient, index) => /* @__PURE__ */ React119.createElement(Paper11, { key: index, p: "xs", withBorder: true }, /* @__PURE__ */ React119.createElement(Group38, { gap: "xs", wrap: "nowrap", align: "flex-start" }, /* @__PURE__ */ React119.createElement(
|
|
11027
11056
|
DataInput,
|
|
11028
11057
|
{
|
|
11029
11058
|
placeholder: "email@example.com or reference",
|
|
@@ -11033,7 +11062,7 @@ var GeneralTab5 = ({
|
|
|
11033
11062
|
currentBlockId: blockId,
|
|
11034
11063
|
size: "sm"
|
|
11035
11064
|
}
|
|
11036
|
-
), /* @__PURE__ */ React119.createElement(
|
|
11065
|
+
), /* @__PURE__ */ React119.createElement(ActionIcon15, { color: "red", variant: "light", onClick: () => handleRemoveRecipient("bcc", index) }, /* @__PURE__ */ React119.createElement(IconTrash4, { size: 16 }))))))), /* @__PURE__ */ React119.createElement(Divider9, { variant: "dashed" }), /* @__PURE__ */ React119.createElement(Stack89, { gap: "xs" }, /* @__PURE__ */ React119.createElement(
|
|
11037
11066
|
BaseTextInput,
|
|
11038
11067
|
{
|
|
11039
11068
|
label: "From (Optional)",
|
|
@@ -11045,7 +11074,7 @@ var GeneralTab5 = ({
|
|
|
11045
11074
|
onFromChange(newFrom);
|
|
11046
11075
|
}
|
|
11047
11076
|
}
|
|
11048
|
-
), /* @__PURE__ */ React119.createElement(
|
|
11077
|
+
), /* @__PURE__ */ React119.createElement(Text63, { size: "xs", c: "dimmed" }, "Custom sender email address")), /* @__PURE__ */ React119.createElement(Stack89, { gap: "xs" }, /* @__PURE__ */ React119.createElement(
|
|
11049
11078
|
BaseTextInput,
|
|
11050
11079
|
{
|
|
11051
11080
|
label: "Reply-To (Optional)",
|
|
@@ -11057,7 +11086,7 @@ var GeneralTab5 = ({
|
|
|
11057
11086
|
onReplyToChange(newReplyTo);
|
|
11058
11087
|
}
|
|
11059
11088
|
}
|
|
11060
|
-
), /* @__PURE__ */ React119.createElement(
|
|
11089
|
+
), /* @__PURE__ */ React119.createElement(Text63, { size: "xs", c: "dimmed" }, "Where replies should be sent")), /* @__PURE__ */ React119.createElement(Divider9, { variant: "dashed" }), /* @__PURE__ */ React119.createElement(
|
|
11061
11090
|
BaseTextInput,
|
|
11062
11091
|
{
|
|
11063
11092
|
label: "Subject",
|
|
@@ -11097,7 +11126,7 @@ var GeneralTab5 = ({
|
|
|
11097
11126
|
onBodyChange(newBody);
|
|
11098
11127
|
}
|
|
11099
11128
|
}
|
|
11100
|
-
), /* @__PURE__ */ React119.createElement(
|
|
11129
|
+
), /* @__PURE__ */ React119.createElement(Text63, { size: "xs", c: "dimmed" }, localBodyType === "html" ? "HTML content for the email body" : "Plain text content for the email body"))));
|
|
11101
11130
|
};
|
|
11102
11131
|
|
|
11103
11132
|
// src/mantine/blocks/notify/template/TemplateConfig.tsx
|
|
@@ -11194,7 +11223,7 @@ var TemplateConfig5 = ({ editor, block }) => {
|
|
|
11194
11223
|
};
|
|
11195
11224
|
|
|
11196
11225
|
// src/mantine/blocks/notify/template/TemplateView.tsx
|
|
11197
|
-
import { Group as Group39, Stack as Stack90, Text as
|
|
11226
|
+
import { Group as Group39, Stack as Stack90, Text as Text64, Badge as Badge16 } from "@mantine/core";
|
|
11198
11227
|
var NOTIFY_TEMPLATE_PANEL_ID = "notify-template-panel";
|
|
11199
11228
|
var NotifyTemplateView = ({ editor, block }) => {
|
|
11200
11229
|
const panelId = `${NOTIFY_TEMPLATE_PANEL_ID}-${block.id}`;
|
|
@@ -11223,12 +11252,12 @@ var NotifyTemplateView = ({ editor, block }) => {
|
|
|
11223
11252
|
return "gray";
|
|
11224
11253
|
}
|
|
11225
11254
|
};
|
|
11226
|
-
return /* @__PURE__ */ React121.createElement(BaseContainer, { onClick: open }, /* @__PURE__ */ React121.createElement(Group39, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React121.createElement(Group39, { wrap: "nowrap", align: "center" }, getIcon("bell", block.props.icon), /* @__PURE__ */ React121.createElement(Stack90, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React121.createElement(Group39, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React121.createElement(Badge16, { size: "sm", variant: "filled", color: getChannelColor(channel) }, channel.toUpperCase()), /* @__PURE__ */ React121.createElement(
|
|
11255
|
+
return /* @__PURE__ */ React121.createElement(BaseContainer, { onClick: open }, /* @__PURE__ */ React121.createElement(Group39, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React121.createElement(Group39, { wrap: "nowrap", align: "center" }, getIcon("bell", block.props.icon), /* @__PURE__ */ React121.createElement(Stack90, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React121.createElement(Group39, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React121.createElement(Badge16, { size: "sm", variant: "filled", color: getChannelColor(channel) }, channel.toUpperCase()), /* @__PURE__ */ React121.createElement(Text64, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Notification")), /* @__PURE__ */ React121.createElement(Text64, { size: "xs", c: "dimmed", contentEditable: false, lineClamp: 1 }, to.length > 0 ? `To: ${to.join(", ")}` : "Click to configure recipients"), block.props.description && /* @__PURE__ */ React121.createElement(Text64, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description)))));
|
|
11227
11256
|
};
|
|
11228
11257
|
|
|
11229
11258
|
// src/mantine/blocks/notify/flow/FlowView.tsx
|
|
11230
11259
|
import React122, { useState as useState38 } from "react";
|
|
11231
|
-
import { Group as Group40, Stack as Stack91, Text as
|
|
11260
|
+
import { Group as Group40, Stack as Stack91, Text as Text65, ActionIcon as ActionIcon16, Tooltip as Tooltip11, Button as Button26, Badge as Badge17, Collapse as Collapse7, Alert as Alert13, Loader as Loader8, Code as Code5 } from "@mantine/core";
|
|
11232
11261
|
import { IconSend as IconSend2, IconChevronDown as IconChevronDown7, IconChevronUp as IconChevronUp4, IconCheck, IconX as IconX6 } from "@tabler/icons-react";
|
|
11233
11262
|
var NotifyFlowView = ({ editor, block, isDisabled }) => {
|
|
11234
11263
|
const disabled = isDisabled?.isDisabled === "disable";
|
|
@@ -11355,7 +11384,7 @@ var NotifyFlowView = ({ editor, block, isDisabled }) => {
|
|
|
11355
11384
|
},
|
|
11356
11385
|
isLoading ? "Sending..." : status === "sent" ? "Sent" : "Send"
|
|
11357
11386
|
);
|
|
11358
|
-
return /* @__PURE__ */ React122.createElement(BaseContainer, null, /* @__PURE__ */ React122.createElement(Stack91, { gap: "md" }, /* @__PURE__ */ React122.createElement(Group40, { wrap: "nowrap", justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React122.createElement(Group40, { wrap: "nowrap", align: "flex-start", style: { flex: 1 } }, getIcon("bell", block.props.icon), /* @__PURE__ */ React122.createElement(Stack91, { gap: "xs", style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React122.createElement(Group40, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React122.createElement(Badge17, { size: "sm", variant: "filled", color: getChannelColor(channel) }, channel.toUpperCase()), /* @__PURE__ */ React122.createElement(
|
|
11387
|
+
return /* @__PURE__ */ React122.createElement(BaseContainer, null, /* @__PURE__ */ React122.createElement(Stack91, { gap: "md" }, /* @__PURE__ */ React122.createElement(Group40, { wrap: "nowrap", justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React122.createElement(Group40, { wrap: "nowrap", align: "flex-start", style: { flex: 1 } }, getIcon("bell", block.props.icon), /* @__PURE__ */ React122.createElement(Stack91, { gap: "xs", style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React122.createElement(Group40, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React122.createElement(Badge17, { size: "sm", variant: "filled", color: getChannelColor(channel) }, channel.toUpperCase()), /* @__PURE__ */ React122.createElement(Text65, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Notification"), status !== "idle" && /* @__PURE__ */ React122.createElement(Badge17, { size: "xs", variant: "dot", color: getStatusColor2(status) }, status)), /* @__PURE__ */ React122.createElement(Text65, { 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__ */ React122.createElement(Text65, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description))), /* @__PURE__ */ React122.createElement(Group40, { gap: "xs", style: { flexShrink: 0 } }, disabled && isDisabled?.message ? /* @__PURE__ */ React122.createElement(Tooltip11, { label: isDisabled.message, position: "left", withArrow: true }, sendButton) : sendButton, /* @__PURE__ */ React122.createElement(ActionIcon16, { variant: "subtle", onClick: () => setShowDetails(!showDetails) }, showDetails ? /* @__PURE__ */ React122.createElement(IconChevronUp4, { size: 16 }) : /* @__PURE__ */ React122.createElement(IconChevronDown7, { size: 16 })))), status === "failed" && block.props.errorMessage && /* @__PURE__ */ React122.createElement(Alert13, { color: "red", icon: /* @__PURE__ */ React122.createElement(IconX6, { size: 16 }), title: "Failed to send", styles: { message: { fontSize: "12px" } } }, block.props.errorMessage), status === "sent" && block.props.messageId && /* @__PURE__ */ React122.createElement(Alert13, { color: "green", icon: /* @__PURE__ */ React122.createElement(IconCheck, { size: 16 }), title: "Sent successfully", styles: { message: { fontSize: "12px" } } }, "Message ID: ", block.props.messageId, block.props.sentAt && /* @__PURE__ */ React122.createElement(React122.Fragment, null, /* @__PURE__ */ React122.createElement("br", null), "Sent at: ", new Date(block.props.sentAt).toLocaleString())), /* @__PURE__ */ React122.createElement(Collapse7, { in: showDetails }, /* @__PURE__ */ React122.createElement(Stack91, { gap: "md" }, channel === "email" && /* @__PURE__ */ React122.createElement(React122.Fragment, null, /* @__PURE__ */ React122.createElement(Stack91, { gap: "xs" }, /* @__PURE__ */ React122.createElement(Text65, { size: "xs", fw: 600, c: "dimmed" }, "Recipients:"), /* @__PURE__ */ React122.createElement(Code5, { block: true, style: { fontSize: "11px" } }, JSON.stringify(
|
|
11359
11388
|
{
|
|
11360
11389
|
to: to.filter((e) => e.trim() !== ""),
|
|
11361
11390
|
...cc.length > 0 && { cc: cc.filter((e) => e.trim() !== "") },
|
|
@@ -11363,7 +11392,7 @@ var NotifyFlowView = ({ editor, block, isDisabled }) => {
|
|
|
11363
11392
|
},
|
|
11364
11393
|
null,
|
|
11365
11394
|
2
|
|
11366
|
-
))), block.props.subject && /* @__PURE__ */ React122.createElement(Stack91, { gap: "xs" }, /* @__PURE__ */ React122.createElement(
|
|
11395
|
+
))), block.props.subject && /* @__PURE__ */ React122.createElement(Stack91, { gap: "xs" }, /* @__PURE__ */ React122.createElement(Text65, { size: "xs", fw: 600, c: "dimmed" }, "Subject:"), /* @__PURE__ */ React122.createElement(Text65, { size: "xs" }, block.props.subject)), block.props.body && /* @__PURE__ */ React122.createElement(Stack91, { gap: "xs" }, /* @__PURE__ */ React122.createElement(Text65, { size: "xs", fw: 600, c: "dimmed" }, "Body (", block.props.bodyType || "text", "):"), /* @__PURE__ */ React122.createElement(Code5, { block: true, style: { fontSize: "11px", maxHeight: "200px", overflow: "auto" } }, block.props.body)), (block.props.from || block.props.replyTo) && /* @__PURE__ */ React122.createElement(Stack91, { gap: "xs" }, /* @__PURE__ */ React122.createElement(Text65, { size: "xs", fw: 600, c: "dimmed" }, "Additional:"), /* @__PURE__ */ React122.createElement(Code5, { block: true, style: { fontSize: "11px" } }, JSON.stringify(
|
|
11367
11396
|
{
|
|
11368
11397
|
...block.props.from && { from: block.props.from },
|
|
11369
11398
|
...block.props.replyTo && { replyTo: block.props.replyTo }
|
|
@@ -11448,7 +11477,7 @@ import React132 from "react";
|
|
|
11448
11477
|
|
|
11449
11478
|
// src/mantine/blocks/claim/template/TemplateView.tsx
|
|
11450
11479
|
import React128, { useMemo as useMemo23 } from "react";
|
|
11451
|
-
import { Group as Group41, Stack as Stack93, Text as
|
|
11480
|
+
import { Group as Group41, Stack as Stack93, Text as Text67 } from "@mantine/core";
|
|
11452
11481
|
|
|
11453
11482
|
// src/mantine/blocks/claim/template/TemplateConfig.tsx
|
|
11454
11483
|
import React127, { useCallback as useCallback24 } from "react";
|
|
@@ -11458,7 +11487,7 @@ import React126, { useEffect as useEffect24, useState as useState40, useCallback
|
|
|
11458
11487
|
|
|
11459
11488
|
// src/mantine/components/CollectionSelector.tsx
|
|
11460
11489
|
import React125, { useState as useState39, useEffect as useEffect23 } from "react";
|
|
11461
|
-
import { Stack as Stack92, Text as
|
|
11490
|
+
import { Stack as Stack92, Text as Text66, Checkbox as Checkbox11, Loader as Loader9, Alert as Alert14 } from "@mantine/core";
|
|
11462
11491
|
var CollectionSelector = ({
|
|
11463
11492
|
did,
|
|
11464
11493
|
selectedCollections,
|
|
@@ -11524,18 +11553,18 @@ var CollectionSelector = ({
|
|
|
11524
11553
|
description: "The DID identifier for fetching claim collections",
|
|
11525
11554
|
style: { flex: 1 }
|
|
11526
11555
|
}
|
|
11527
|
-
), /* @__PURE__ */ React125.createElement(BaseButton, { onClick: handleGetCollections, disabled: !localDid.trim() || loading }, loading ? /* @__PURE__ */ React125.createElement(Loader9, { size: "xs", color: "white" }) : "Get Collections"), error && /* @__PURE__ */ React125.createElement(Alert14, { color: "red", title: "Error" }, error)), collections && collections.length > 0 && /* @__PURE__ */ React125.createElement(Stack92, { gap: "xs" }, /* @__PURE__ */ React125.createElement(
|
|
11556
|
+
), /* @__PURE__ */ React125.createElement(BaseButton, { onClick: handleGetCollections, disabled: !localDid.trim() || loading }, loading ? /* @__PURE__ */ React125.createElement(Loader9, { size: "xs", color: "white" }) : "Get Collections"), error && /* @__PURE__ */ React125.createElement(Alert14, { color: "red", title: "Error" }, error)), collections && collections.length > 0 && /* @__PURE__ */ React125.createElement(Stack92, { gap: "xs" }, /* @__PURE__ */ React125.createElement(Text66, { size: "sm", fw: 600 }, "Claim Collections"), /* @__PURE__ */ React125.createElement(Stack92, { gap: "sm" }, collections.map((collection) => {
|
|
11528
11557
|
if (!collection || !collection.id) return null;
|
|
11529
11558
|
return /* @__PURE__ */ React125.createElement(
|
|
11530
11559
|
Checkbox11,
|
|
11531
11560
|
{
|
|
11532
11561
|
key: collection.id,
|
|
11533
|
-
label: /* @__PURE__ */ React125.createElement(Stack92, { gap: 2 }, /* @__PURE__ */ React125.createElement(
|
|
11562
|
+
label: /* @__PURE__ */ React125.createElement(Stack92, { gap: 2 }, /* @__PURE__ */ React125.createElement(Text66, { size: "sm", fw: 500 }, getCollectionName2(collection)), /* @__PURE__ */ React125.createElement(Text66, { size: "xs", c: "dimmed", style: { fontFamily: "monospace" } }, "ID: ", collection.id), collection.description && /* @__PURE__ */ React125.createElement(Text66, { size: "xs", c: "dimmed" }, collection.description)),
|
|
11534
11563
|
checked: selectedCollections?.includes(collection.id) ?? false,
|
|
11535
11564
|
onChange: () => handleToggleCollection(collection.id)
|
|
11536
11565
|
}
|
|
11537
11566
|
);
|
|
11538
|
-
}))), selectedCollections && selectedCollections.length > 0 && /* @__PURE__ */ React125.createElement(Stack92, { gap: "xs" }, /* @__PURE__ */ React125.createElement(
|
|
11567
|
+
}))), selectedCollections && selectedCollections.length > 0 && /* @__PURE__ */ React125.createElement(Stack92, { gap: "xs" }, /* @__PURE__ */ React125.createElement(Text66, { size: "sm", c: "dimmed" }, selectedCollections.length, " collection", selectedCollections.length !== 1 ? "s" : "", " selected")));
|
|
11539
11568
|
};
|
|
11540
11569
|
|
|
11541
11570
|
// src/mantine/blocks/claim/template/GeneralTab.tsx
|
|
@@ -11678,12 +11707,12 @@ var ClaimTemplateView = ({ editor, block }) => {
|
|
|
11678
11707
|
const panelId = `${CLAIM_TEMPLATE_PANEL_ID}-${block.id}`;
|
|
11679
11708
|
const panelContent = useMemo23(() => /* @__PURE__ */ React128.createElement(TemplateConfig6, { editor, block }), [editor, block]);
|
|
11680
11709
|
const { open } = usePanel(panelId, panelContent);
|
|
11681
|
-
return /* @__PURE__ */ React128.createElement(BaseContainer, { onClick: open }, /* @__PURE__ */ React128.createElement(Group41, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React128.createElement(Group41, { wrap: "nowrap", align: "center" }, getIcon("square-check", block.props.icon), /* @__PURE__ */ React128.createElement(Stack93, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React128.createElement(
|
|
11710
|
+
return /* @__PURE__ */ React128.createElement(BaseContainer, { onClick: open }, /* @__PURE__ */ React128.createElement(Group41, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React128.createElement(Group41, { wrap: "nowrap", align: "center" }, getIcon("square-check", block.props.icon), /* @__PURE__ */ React128.createElement(Stack93, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React128.createElement(Text67, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Claim Title"), /* @__PURE__ */ React128.createElement(Text67, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description || "Claim description")))));
|
|
11682
11711
|
};
|
|
11683
11712
|
|
|
11684
11713
|
// src/mantine/blocks/claim/flow/FlowView.tsx
|
|
11685
11714
|
import React131, { useMemo as useMemo28 } from "react";
|
|
11686
|
-
import { Stack as Stack96, Text as
|
|
11715
|
+
import { Stack as Stack96, Text as Text70, Loader as Loader12, Center as Center6, Alert as Alert16, Title as Title6, Flex as Flex24, ActionIcon as ActionIcon19 } from "@mantine/core";
|
|
11687
11716
|
|
|
11688
11717
|
// src/mantine/hooks/useCurrentUser.ts
|
|
11689
11718
|
import { useState as useState41, useEffect as useEffect25, useRef as useRef4 } from "react";
|
|
@@ -11760,11 +11789,11 @@ function useCollections(did, selectedCollectionIds, block, editor) {
|
|
|
11760
11789
|
}
|
|
11761
11790
|
|
|
11762
11791
|
// src/mantine/blocks/claim/flow/FlowView.tsx
|
|
11763
|
-
import { IconSettings as
|
|
11792
|
+
import { IconSettings as IconSettings3, IconRefresh as IconRefresh3, IconAlertCircle as IconAlertCircle2 } from "@tabler/icons-react";
|
|
11764
11793
|
|
|
11765
11794
|
// src/mantine/blocks/claim/flow/ClaimCollectionsList.tsx
|
|
11766
11795
|
import React130, { useMemo as useMemo27 } from "react";
|
|
11767
|
-
import { Stack as Stack95, Text as
|
|
11796
|
+
import { Stack as Stack95, Text as Text69, ActionIcon as ActionIcon18, Tooltip as Tooltip12, Loader as Loader11, Center as Center5 } from "@mantine/core";
|
|
11768
11797
|
|
|
11769
11798
|
// src/mantine/hooks/useUserRoles.ts
|
|
11770
11799
|
import { useState as useState43, useEffect as useEffect27, useMemo as useMemo25, useRef as useRef6 } from "react";
|
|
@@ -11854,7 +11883,7 @@ function useUserRoles(collections, userAddress, adminAddress, deedId) {
|
|
|
11854
11883
|
|
|
11855
11884
|
// src/mantine/blocks/claim/flow/ClaimsListSheet.tsx
|
|
11856
11885
|
import React129, { useState as useState44, useEffect as useEffect28, useCallback as useCallback26, useMemo as useMemo26 } from "react";
|
|
11857
|
-
import { CloseButton as CloseButton5, Title as
|
|
11886
|
+
import { CloseButton as CloseButton5, Title as Title5, Loader as Loader10, Stack as Stack94, Text as Text68, Button as Button27, ActionIcon as ActionIcon17, Alert as Alert15 } from "@mantine/core";
|
|
11858
11887
|
import { IconArrowLeft as IconArrowLeft3, IconAlertCircle } from "@tabler/icons-react";
|
|
11859
11888
|
import { Survey, SurveyModel } from "@ixo/surveys";
|
|
11860
11889
|
|
|
@@ -11870,7 +11899,7 @@ var surveyTheme = {
|
|
|
11870
11899
|
"--sjs-general-backcolor": "#2a2a2a",
|
|
11871
11900
|
// this one
|
|
11872
11901
|
"--sjs-general-backcolor-dark": "#1a1a1a",
|
|
11873
|
-
"--sjs-general-backcolor-dim": "
|
|
11902
|
+
"--sjs-general-backcolor-dim": "transparent",
|
|
11874
11903
|
"--sjs-general-backcolor-dim-light": "rgba(255, 255, 255, 0.04)",
|
|
11875
11904
|
"--sjs-general-backcolor-dim-dark": "rgba(255, 255, 255, 0.04)",
|
|
11876
11905
|
// Text colors - match BaseTextInput
|
|
@@ -12193,7 +12222,7 @@ var ClaimsListSheet = ({ collectionId, collectionName, deedId, adminAddress, use
|
|
|
12193
12222
|
marginBottom: "1rem"
|
|
12194
12223
|
}
|
|
12195
12224
|
},
|
|
12196
|
-
/* @__PURE__ */ React129.createElement("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem" } }, viewMode === "survey" && /* @__PURE__ */ React129.createElement(
|
|
12225
|
+
/* @__PURE__ */ React129.createElement("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem" } }, viewMode === "survey" && /* @__PURE__ */ React129.createElement(ActionIcon17, { variant: "subtle", onClick: handleBackToList }, /* @__PURE__ */ React129.createElement(IconArrowLeft3, { size: 20 })), /* @__PURE__ */ React129.createElement(Title5, { order: 3 }, viewMode === "list" ? collectionName : "Submit New Claim")),
|
|
12197
12226
|
/* @__PURE__ */ React129.createElement(CloseButton5, { onClick: closePanel })
|
|
12198
12227
|
),
|
|
12199
12228
|
/* @__PURE__ */ React129.createElement(
|
|
@@ -12223,10 +12252,10 @@ var ClaimsListSheet = ({ collectionId, collectionName, deedId, adminAddress, use
|
|
|
12223
12252
|
pointerEvents: viewMode === "list" ? "auto" : "none"
|
|
12224
12253
|
}
|
|
12225
12254
|
},
|
|
12226
|
-
/* @__PURE__ */ React129.createElement(Stack94, { gap: "md", style: { flex: 1 } }, /* @__PURE__ */ React129.createElement(Button27, { onClick: handleNewClaim, fullWidth: true }, "New Claim"), loading ? /* @__PURE__ */ React129.createElement(Stack94, { align: "center", justify: "center", style: { flex: 1 } }, /* @__PURE__ */ React129.createElement(Loader10, { size: "lg" }), /* @__PURE__ */ React129.createElement(
|
|
12255
|
+
/* @__PURE__ */ React129.createElement(Stack94, { gap: "md", style: { flex: 1 } }, /* @__PURE__ */ React129.createElement(Button27, { onClick: handleNewClaim, fullWidth: true }, "New Claim"), loading ? /* @__PURE__ */ React129.createElement(Stack94, { align: "center", justify: "center", style: { flex: 1 } }, /* @__PURE__ */ React129.createElement(Loader10, { size: "lg" }), /* @__PURE__ */ React129.createElement(Text68, { size: "sm", c: "dimmed" }, "Loading claims...")) : error ? /* @__PURE__ */ React129.createElement(Alert15, { color: "red", title: "Failed to load claims", icon: /* @__PURE__ */ React129.createElement(IconAlertCircle, { size: 18 }) }, /* @__PURE__ */ React129.createElement(Text68, { size: "sm" }, error)) : claims.length === 0 ? /* @__PURE__ */ React129.createElement(Stack94, { align: "center", justify: "center", style: { flex: 1 } }, /* @__PURE__ */ React129.createElement(Text68, { size: "sm", c: "dimmed", ta: "center" }, 'No claims found. Click "New Claim" to submit your first claim.')) : /* @__PURE__ */ React129.createElement(Stack94, { gap: "xs" }, claims.map((claim) => {
|
|
12227
12256
|
const status = getClaimStatus(claim.paymentsStatus);
|
|
12228
12257
|
return /* @__PURE__ */ React129.createElement(ListItemContainer, { key: claim.claimId, isChecked: false, onClick: () => {
|
|
12229
|
-
} }, /* @__PURE__ */ React129.createElement(Stack94, { gap: 4, style: { flex: 1 } }, /* @__PURE__ */ React129.createElement(
|
|
12258
|
+
} }, /* @__PURE__ */ React129.createElement(Stack94, { gap: 4, style: { flex: 1 } }, /* @__PURE__ */ React129.createElement(Text68, { size: "sm", fw: 500 }, "Claim #", claim.claimId.slice(-8)), /* @__PURE__ */ React129.createElement(Text68, { size: "xs", c: "dimmed" }, "Submitted: ", formatDate2(claim.submissionDate))), /* @__PURE__ */ React129.createElement(Text68, { size: "xs", fw: 500, c: getStatusColor2(status) }, status.toUpperCase()));
|
|
12230
12259
|
})))
|
|
12231
12260
|
),
|
|
12232
12261
|
/* @__PURE__ */ React129.createElement(
|
|
@@ -12247,7 +12276,7 @@ var ClaimsListSheet = ({ collectionId, collectionName, deedId, adminAddress, use
|
|
|
12247
12276
|
pointerEvents: viewMode === "survey" ? "auto" : "none"
|
|
12248
12277
|
}
|
|
12249
12278
|
},
|
|
12250
|
-
/* @__PURE__ */ React129.createElement("div", null, surveyLoading && /* @__PURE__ */ React129.createElement(Stack94, { align: "center", justify: "center", style: { height: "100%" } }, /* @__PURE__ */ React129.createElement(Loader10, { size: "lg" }), /* @__PURE__ */ React129.createElement(
|
|
12279
|
+
/* @__PURE__ */ React129.createElement("div", null, surveyLoading && /* @__PURE__ */ React129.createElement(Stack94, { align: "center", justify: "center", style: { height: "100%" } }, /* @__PURE__ */ React129.createElement(Loader10, { size: "lg" }), /* @__PURE__ */ React129.createElement(Text68, { size: "sm", c: "dimmed" }, "Loading survey template...")), surveyError && /* @__PURE__ */ React129.createElement(Stack94, { align: "center", justify: "center", style: { height: "100%", padding: "1rem" } }, /* @__PURE__ */ React129.createElement(Text68, { size: "sm", c: "red" }, surveyError)), !surveyLoading && !surveyError && surveyModel && /* @__PURE__ */ React129.createElement(Survey, { model: surveyModel }))
|
|
12251
12280
|
)
|
|
12252
12281
|
)
|
|
12253
12282
|
);
|
|
@@ -12305,15 +12334,15 @@ var CollectionItem = ({ collection, deedId, adminAddress, userRole, onRefresh, e
|
|
|
12305
12334
|
}
|
|
12306
12335
|
};
|
|
12307
12336
|
return /* @__PURE__ */ React130.createElement("div", { style: { opacity: canAccessClaims ? 1 : 0.5 } }, /* @__PURE__ */ React130.createElement(ListItemContainer, { isChecked: false, onClick: () => {
|
|
12308
|
-
} }, /* @__PURE__ */ React130.createElement(Stack95, { gap: 4, style: { flex: 1 } }, /* @__PURE__ */ React130.createElement(
|
|
12337
|
+
} }, /* @__PURE__ */ React130.createElement(Stack95, { gap: 4, style: { flex: 1 } }, /* @__PURE__ */ React130.createElement(Text69, { size: "sm", fw: 500, c: canAccessClaims ? void 0 : "dimmed" }, collectionName), collection.description && /* @__PURE__ */ React130.createElement(Text69, { size: "xs", c: "dimmed" }, collection.description)), /* @__PURE__ */ React130.createElement(Tooltip12, { label: "You need to apply to be a service agent first", disabled: canAccessClaims, position: "left", withArrow: true }, /* @__PURE__ */ React130.createElement(ActionIcon18, { variant: "subtle", size: "lg", onClick: handleClick, disabled: !canAccessClaims, style: { cursor: canAccessClaims ? "pointer" : "not-allowed" } }, /* @__PURE__ */ React130.createElement(IconArrowRight, { size: 20 })))));
|
|
12309
12338
|
};
|
|
12310
12339
|
var ClaimCollectionsList = ({ collections, deedId, adminAddress, userAddress, onRefresh, execution }) => {
|
|
12311
12340
|
const { userRoles, loading: loadingRoles } = useUserRoles(collections, userAddress, adminAddress, deedId);
|
|
12312
12341
|
if (!collections?.length) {
|
|
12313
|
-
return /* @__PURE__ */ React130.createElement(
|
|
12342
|
+
return /* @__PURE__ */ React130.createElement(Text69, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No claim collections found");
|
|
12314
12343
|
}
|
|
12315
12344
|
if (loadingRoles) {
|
|
12316
|
-
return /* @__PURE__ */ React130.createElement(
|
|
12345
|
+
return /* @__PURE__ */ React130.createElement(Center5, { py: "md" }, /* @__PURE__ */ React130.createElement(Loader11, { size: "sm" }));
|
|
12317
12346
|
}
|
|
12318
12347
|
return /* @__PURE__ */ React130.createElement(Stack95, { gap: "md", px: 5 }, collections.map((collection) => /* @__PURE__ */ React130.createElement(
|
|
12319
12348
|
CollectionItem,
|
|
@@ -12381,12 +12410,12 @@ var ClaimFlowView = ({ editor, block }) => {
|
|
|
12381
12410
|
const adminAddress = block.props.adminAddress || "";
|
|
12382
12411
|
const { collections, loading, error, refetch } = useCollections(did, selectedCollectionIds, block, editor);
|
|
12383
12412
|
if (!did) {
|
|
12384
|
-
return /* @__PURE__ */ React131.createElement(
|
|
12413
|
+
return /* @__PURE__ */ React131.createElement(Center6, { py: "xl" }, /* @__PURE__ */ React131.createElement(Text70, { size: "sm", c: "dimmed" }, "Please configure the claim block in template mode first"));
|
|
12385
12414
|
}
|
|
12386
12415
|
if (selectedCollectionIds.length === 0) {
|
|
12387
|
-
return /* @__PURE__ */ React131.createElement(
|
|
12416
|
+
return /* @__PURE__ */ React131.createElement(Center6, { py: "xl" }, /* @__PURE__ */ React131.createElement(Text70, { size: "sm", c: "dimmed" }, "No claim collections selected"));
|
|
12388
12417
|
}
|
|
12389
|
-
return /* @__PURE__ */ React131.createElement(Stack96, { w: "100%" }, /* @__PURE__ */ React131.createElement(Flex24, { px: 5, align: "center", justify: "space-between" }, /* @__PURE__ */ React131.createElement(
|
|
12418
|
+
return /* @__PURE__ */ React131.createElement(Stack96, { w: "100%" }, /* @__PURE__ */ React131.createElement(Flex24, { px: 5, align: "center", justify: "space-between" }, /* @__PURE__ */ React131.createElement(Title6, { order: 4 }, "Submit Claims"), /* @__PURE__ */ React131.createElement(Flex24, { gap: "xs" }, /* @__PURE__ */ React131.createElement(ActionIcon19, { variant: "subtle", size: "sm", onClick: refetch, loading }, /* @__PURE__ */ React131.createElement(IconRefresh3, { size: 18 })), editable && /* @__PURE__ */ React131.createElement(ActionIcon19, { variant: "subtle", size: "sm", onClick: open }, /* @__PURE__ */ React131.createElement(IconSettings3, { size: 18 })))), loading ? /* @__PURE__ */ React131.createElement(Center6, { py: "xl" }, /* @__PURE__ */ React131.createElement(Loader12, { size: "md" })) : error ? /* @__PURE__ */ React131.createElement(Alert16, { color: "red", title: "Failed to load collections", icon: /* @__PURE__ */ React131.createElement(IconAlertCircle2, { size: 18 }) }, /* @__PURE__ */ React131.createElement(Text70, { size: "sm" }, error)) : /* @__PURE__ */ React131.createElement(
|
|
12390
12419
|
ClaimCollectionsList,
|
|
12391
12420
|
{
|
|
12392
12421
|
collections,
|
|
@@ -12450,7 +12479,7 @@ import React147 from "react";
|
|
|
12450
12479
|
|
|
12451
12480
|
// src/mantine/blocks/bid/template/TemplateView.tsx
|
|
12452
12481
|
import React137, { useMemo as useMemo30 } from "react";
|
|
12453
|
-
import { Group as Group42, Stack as Stack97, Text as
|
|
12482
|
+
import { Group as Group42, Stack as Stack97, Text as Text71 } from "@mantine/core";
|
|
12454
12483
|
|
|
12455
12484
|
// src/mantine/blocks/bid/template/TemplateConfig.tsx
|
|
12456
12485
|
import React136, { useCallback as useCallback28 } from "react";
|
|
@@ -12600,21 +12629,21 @@ var BidTemplateView = ({ editor, block }) => {
|
|
|
12600
12629
|
const panelContent = useMemo30(() => /* @__PURE__ */ React137.createElement(TemplateConfig7, { editor, block }), [editor, block]);
|
|
12601
12630
|
const { open } = usePanel(panelId, panelContent);
|
|
12602
12631
|
const didDisplay = block.props.did ? `${block.props.did.substring(0, 15)}...${block.props.did.substring(block.props.did.length - 10)}` : "No DID configured";
|
|
12603
|
-
return /* @__PURE__ */ React137.createElement(BaseContainer, { onClick: open }, /* @__PURE__ */ React137.createElement(Group42, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React137.createElement(Group42, { wrap: "nowrap", align: "center" }, getIcon("dollar-sign", "dollar-sign"), /* @__PURE__ */ React137.createElement(Stack97, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React137.createElement(
|
|
12632
|
+
return /* @__PURE__ */ React137.createElement(BaseContainer, { onClick: open }, /* @__PURE__ */ React137.createElement(Group42, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React137.createElement(Group42, { wrap: "nowrap", align: "center" }, getIcon("dollar-sign", "dollar-sign"), /* @__PURE__ */ React137.createElement(Stack97, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React137.createElement(Text71, { fw: 500, size: "sm", contentEditable: false }, "Bid Block"), /* @__PURE__ */ React137.createElement(Text71, { size: "xs", c: "dimmed", contentEditable: false }, block.props.did ? didDisplay : "Configure bid settings")))));
|
|
12604
12633
|
};
|
|
12605
12634
|
|
|
12606
12635
|
// src/mantine/blocks/bid/flow/components/FlowView.tsx
|
|
12607
12636
|
import React146, { useMemo as useMemo38 } from "react";
|
|
12608
|
-
import { Stack as Stack104, Text as
|
|
12609
|
-
import { IconSettings as
|
|
12637
|
+
import { Stack as Stack104, Text as Text78, Loader as Loader18, Center as Center9, Alert as Alert19, Title as Title7, Flex as Flex25, ActionIcon as ActionIcon22 } from "@mantine/core";
|
|
12638
|
+
import { IconSettings as IconSettings4, IconRefresh as IconRefresh4, IconAlertCircle as IconAlertCircle5 } from "@tabler/icons-react";
|
|
12610
12639
|
|
|
12611
12640
|
// src/mantine/blocks/bid/flow/components/ClaimCollectionsList.tsx
|
|
12612
12641
|
import React145 from "react";
|
|
12613
|
-
import { Stack as Stack103, Text as
|
|
12642
|
+
import { Stack as Stack103, Text as Text77, Loader as Loader17, Center as Center8 } from "@mantine/core";
|
|
12614
12643
|
|
|
12615
12644
|
// src/mantine/blocks/bid/flow/components/CollectionItem.tsx
|
|
12616
12645
|
import React144, { useMemo as useMemo37 } from "react";
|
|
12617
|
-
import { Stack as Stack102, Text as
|
|
12646
|
+
import { Stack as Stack102, Text as Text76, Button as Button29, Menu as Menu3, Badge as Badge20, ActionIcon as ActionIcon21, Box as Box29, Tooltip as Tooltip13, Loader as Loader16 } from "@mantine/core";
|
|
12618
12647
|
import { IconChevronDown as IconChevronDown8, IconArrowRight as IconArrowRight3, IconLock } from "@tabler/icons-react";
|
|
12619
12648
|
|
|
12620
12649
|
// src/mantine/hooks/useBlockAuthorization.ts
|
|
@@ -12694,7 +12723,7 @@ function useBlockAuthorization({
|
|
|
12694
12723
|
|
|
12695
12724
|
// src/mantine/blocks/bid/flow/components/BidSurveyPanel.tsx
|
|
12696
12725
|
import React138, { useMemo as useMemo33, useEffect as useEffect32 } from "react";
|
|
12697
|
-
import { Loader as Loader13, Stack as Stack98, Text as
|
|
12726
|
+
import { Loader as Loader13, Stack as Stack98, Text as Text72 } from "@mantine/core";
|
|
12698
12727
|
import { Survey as Survey2 } from "@ixo/surveys";
|
|
12699
12728
|
|
|
12700
12729
|
// src/mantine/blocks/bid/flow/hooks/useBidSurvey.ts
|
|
@@ -12826,22 +12855,22 @@ var BidSurveyPanel = ({ deedId, collectionId, role, onSubmitComplete, execution
|
|
|
12826
12855
|
}
|
|
12827
12856
|
return void 0;
|
|
12828
12857
|
}, [surveyModel, handleSurveyComplete]);
|
|
12829
|
-
return /* @__PURE__ */ React138.createElement(BaseRightPanelLayout, { isTemplate: false, onClose: closePanel, title: `${roleLabel} Application` }, /* @__PURE__ */ React138.createElement("div", { style: surveyContainerStyle }, loading && /* @__PURE__ */ React138.createElement(Stack98, { align: "center", justify: "center", style: { height: "100%" } }, /* @__PURE__ */ React138.createElement(Loader13, { size: "lg" }), /* @__PURE__ */ React138.createElement(
|
|
12858
|
+
return /* @__PURE__ */ React138.createElement(BaseRightPanelLayout, { isTemplate: false, onClose: closePanel, title: `${roleLabel} Application` }, /* @__PURE__ */ React138.createElement("div", { style: surveyContainerStyle }, loading && /* @__PURE__ */ React138.createElement(Stack98, { align: "center", justify: "center", style: { height: "100%" } }, /* @__PURE__ */ React138.createElement(Loader13, { size: "lg" }), /* @__PURE__ */ React138.createElement(Text72, { size: "sm", c: "dimmed" }, "Loading survey template...")), error && /* @__PURE__ */ React138.createElement(Stack98, { align: "center", justify: "center", style: { height: "100%", padding: "1rem" } }, /* @__PURE__ */ React138.createElement(Text72, { size: "sm", c: "red" }, error)), !loading && !error && surveyModel && /* @__PURE__ */ React138.createElement(Survey2, { model: surveyModel })));
|
|
12830
12859
|
};
|
|
12831
12860
|
|
|
12832
12861
|
// src/mantine/blocks/bid/flow/components/BidsList.tsx
|
|
12833
12862
|
import React141, { useCallback as useCallback32 } from "react";
|
|
12834
|
-
import { Stack as Stack101, Text as
|
|
12863
|
+
import { Stack as Stack101, Text as Text75, Loader as Loader15, Center as Center7, Alert as Alert18 } from "@mantine/core";
|
|
12835
12864
|
import { IconAlertCircle as IconAlertCircle4 } from "@tabler/icons-react";
|
|
12836
12865
|
|
|
12837
12866
|
// src/mantine/blocks/bid/flow/components/BidItem.tsx
|
|
12838
12867
|
import React140, { useMemo as useMemo36 } from "react";
|
|
12839
|
-
import { Stack as Stack100, Text as
|
|
12868
|
+
import { Stack as Stack100, Text as Text74, Badge as Badge19, Group as Group44, ActionIcon as ActionIcon20 } from "@mantine/core";
|
|
12840
12869
|
import { IconArrowRight as IconArrowRight2 } from "@tabler/icons-react";
|
|
12841
12870
|
|
|
12842
12871
|
// src/mantine/blocks/bid/flow/components/BidViewPanel.tsx
|
|
12843
12872
|
import React139, { useMemo as useMemo35, useState as useState50 } from "react";
|
|
12844
|
-
import { Loader as Loader14, Stack as Stack99, Text as
|
|
12873
|
+
import { Loader as Loader14, Stack as Stack99, Text as Text73, Badge as Badge18, Button as Button28, Group as Group43, Modal as Modal2, Alert as Alert17 } from "@mantine/core";
|
|
12845
12874
|
import { Survey as Survey3 } from "@ixo/surveys";
|
|
12846
12875
|
import { IconCheck as IconCheck2, IconX as IconX7, IconAlertCircle as IconAlertCircle3 } from "@tabler/icons-react";
|
|
12847
12876
|
|
|
@@ -13075,7 +13104,7 @@ var BidViewPanel = ({ bid, deedId, adminAddress, onRefresh, execution }) => {
|
|
|
13075
13104
|
setRejectModalOpen(false);
|
|
13076
13105
|
}
|
|
13077
13106
|
};
|
|
13078
|
-
return /* @__PURE__ */ React139.createElement(BaseRightPanelLayout, { onClose: closePanel, title: `${getRoleLabel(bid.role)} Bid`, isTemplate: false, captionContent: /* @__PURE__ */ React139.createElement(Badge18, { size: "sm", color: getRoleColor(bid.role) }) }, !loading && !error && /* @__PURE__ */ React139.createElement(Stack99, { gap: "md", mb: "md" }, actionError && /* @__PURE__ */ React139.createElement(Alert17, { color: "red", icon: /* @__PURE__ */ React139.createElement(IconAlertCircle3, { size: 16 }), onClose: () => setActionError(null), withCloseButton: true }, actionError), /* @__PURE__ */ React139.createElement(Group43, { justify: "flex-end" }, /* @__PURE__ */ React139.createElement(Button28, { variant: "outline", color: "red", leftSection: /* @__PURE__ */ React139.createElement(IconX7, { size: 16 }), onClick: handleRejectClick, loading: actionLoading, disabled: actionLoading }, "Reject"), /* @__PURE__ */ React139.createElement(Button28, { variant: "filled", color: "green", leftSection: /* @__PURE__ */ React139.createElement(IconCheck2, { size: 16 }), onClick: approveBid, loading: actionLoading, disabled: actionLoading }, "Approve"))), /* @__PURE__ */ React139.createElement("div", { style: surveyContainerStyle }, loading && /* @__PURE__ */ React139.createElement(Stack99, { align: "center", justify: "center", style: { height: "100%" } }, /* @__PURE__ */ React139.createElement(Loader14, { size: "lg" }), /* @__PURE__ */ React139.createElement(
|
|
13107
|
+
return /* @__PURE__ */ React139.createElement(BaseRightPanelLayout, { onClose: closePanel, title: `${getRoleLabel(bid.role)} Bid`, isTemplate: false, captionContent: /* @__PURE__ */ React139.createElement(Badge18, { size: "sm", color: getRoleColor(bid.role) }) }, !loading && !error && /* @__PURE__ */ React139.createElement(Stack99, { gap: "md", mb: "md" }, actionError && /* @__PURE__ */ React139.createElement(Alert17, { color: "red", icon: /* @__PURE__ */ React139.createElement(IconAlertCircle3, { size: 16 }), onClose: () => setActionError(null), withCloseButton: true }, actionError), /* @__PURE__ */ React139.createElement(Group43, { justify: "flex-end" }, /* @__PURE__ */ React139.createElement(Button28, { variant: "outline", color: "red", leftSection: /* @__PURE__ */ React139.createElement(IconX7, { size: 16 }), onClick: handleRejectClick, loading: actionLoading, disabled: actionLoading }, "Reject"), /* @__PURE__ */ React139.createElement(Button28, { variant: "filled", color: "green", leftSection: /* @__PURE__ */ React139.createElement(IconCheck2, { size: 16 }), onClick: approveBid, loading: actionLoading, disabled: actionLoading }, "Approve"))), /* @__PURE__ */ React139.createElement("div", { style: surveyContainerStyle }, loading && /* @__PURE__ */ React139.createElement(Stack99, { align: "center", justify: "center", style: { height: "100%" } }, /* @__PURE__ */ React139.createElement(Loader14, { size: "lg" }), /* @__PURE__ */ React139.createElement(Text73, { size: "sm", c: "dimmed" }, "Loading bid details...")), error && /* @__PURE__ */ React139.createElement(Stack99, { align: "center", justify: "center", style: { height: "100%", padding: "1rem" } }, /* @__PURE__ */ React139.createElement(Text73, { size: "sm", c: "red" }, error)), !loading && !error && surveyModel && /* @__PURE__ */ React139.createElement(Survey3, { model: surveyModel })), /* @__PURE__ */ React139.createElement(Modal2, { opened: rejectModalOpen, onClose: () => setRejectModalOpen(false), title: "Reject Bid", centered: true }, /* @__PURE__ */ React139.createElement(Stack99, { gap: "md" }, /* @__PURE__ */ React139.createElement(Text73, { size: "sm" }, "Please provide a reason for rejecting this bid:"), /* @__PURE__ */ React139.createElement(BaseTextArea, { placeholder: "Enter rejection reason...", value: rejectReason, onChange: (e) => setRejectReason(e.currentTarget.value), minRows: 3 }), /* @__PURE__ */ React139.createElement(Group43, { justify: "flex-end" }, /* @__PURE__ */ React139.createElement(Button28, { variant: "outline", onClick: () => setRejectModalOpen(false), disabled: actionLoading }, "Cancel"), /* @__PURE__ */ React139.createElement(Button28, { color: "red", onClick: handleRejectConfirm, loading: actionLoading, disabled: !rejectReason.trim() }, "Reject Bid")))));
|
|
13079
13108
|
};
|
|
13080
13109
|
|
|
13081
13110
|
// src/mantine/hooks/useUserProfile.ts
|
|
@@ -13116,7 +13145,7 @@ var BidItem = ({ bid, deedId, adminAddress, onRefresh, execution }) => {
|
|
|
13116
13145
|
const displayStatus = bid.status;
|
|
13117
13146
|
const displayReason = bid.reason;
|
|
13118
13147
|
return /* @__PURE__ */ React140.createElement(ListItemContainer, { isChecked: false, onClick: () => {
|
|
13119
|
-
} }, /* @__PURE__ */ React140.createElement(Stack100, { gap: 4, style: { flex: 1 } }, /* @__PURE__ */ React140.createElement(Group44, { gap: "xs" }, /* @__PURE__ */ React140.createElement(
|
|
13148
|
+
} }, /* @__PURE__ */ React140.createElement(Stack100, { gap: 4, style: { flex: 1 } }, /* @__PURE__ */ React140.createElement(Group44, { gap: "xs" }, /* @__PURE__ */ React140.createElement(Text74, { size: "xs", fw: 500 }, loadingProfile ? "Loading..." : displayName), userProfile?.verified && /* @__PURE__ */ React140.createElement(Text74, { size: "xs", c: "blue", fw: 600, title: "Verified user" }, "\u2713"), /* @__PURE__ */ React140.createElement(Badge19, { size: "xs", variant: "light", color: getRoleColor(bid.role) }, getRoleLabel(bid.role))), /* @__PURE__ */ React140.createElement(Text74, { size: "xs", c: "dimmed" }, "Submitted: ", formatDate(displayDate)), displayStatus === "rejected" && displayReason && /* @__PURE__ */ React140.createElement(Text74, { size: "xs", c: "red" }, "Reason: ", displayReason)), /* @__PURE__ */ React140.createElement(Group44, { gap: "xs" }, displayStatus && /* @__PURE__ */ React140.createElement(Badge19, { size: "sm", color: getStatusColor(displayStatus) }, getStatusLabel(displayStatus)), /* @__PURE__ */ React140.createElement(ActionIcon20, { variant: "subtle", size: "lg", onClick: openBidPanel }, /* @__PURE__ */ React140.createElement(IconArrowRight2, { size: 20 }))));
|
|
13120
13149
|
};
|
|
13121
13150
|
|
|
13122
13151
|
// src/mantine/blocks/bid/flow/hooks/useBids.ts
|
|
@@ -13159,13 +13188,13 @@ var BidsList = ({ collectionId, deedId, adminAddress, onRefresh, execution }) =>
|
|
|
13159
13188
|
}, [refetch, onRefresh]);
|
|
13160
13189
|
const renderContent = () => {
|
|
13161
13190
|
if (loading) {
|
|
13162
|
-
return /* @__PURE__ */ React141.createElement(
|
|
13191
|
+
return /* @__PURE__ */ React141.createElement(Center7, { py: "md" }, /* @__PURE__ */ React141.createElement(Loader15, { size: "sm" }));
|
|
13163
13192
|
}
|
|
13164
13193
|
if (error) {
|
|
13165
|
-
return /* @__PURE__ */ React141.createElement(Alert18, { color: "red", icon: /* @__PURE__ */ React141.createElement(IconAlertCircle4, { size: 16 }), py: "xs" }, /* @__PURE__ */ React141.createElement(
|
|
13194
|
+
return /* @__PURE__ */ React141.createElement(Alert18, { color: "red", icon: /* @__PURE__ */ React141.createElement(IconAlertCircle4, { size: 16 }), py: "xs" }, /* @__PURE__ */ React141.createElement(Text75, { size: "xs" }, error));
|
|
13166
13195
|
}
|
|
13167
13196
|
if (!bids || bids.length === 0) {
|
|
13168
|
-
return /* @__PURE__ */ React141.createElement(
|
|
13197
|
+
return /* @__PURE__ */ React141.createElement(Text75, { size: "xs", c: "dimmed", ta: "center", py: "sm" }, "No bids submitted yet");
|
|
13169
13198
|
}
|
|
13170
13199
|
return /* @__PURE__ */ React141.createElement(Stack101, { gap: "xs", pl: "md" }, bids.map((bid) => /* @__PURE__ */ React141.createElement(BidItem, { key: bid.id, bid, deedId, adminAddress, onRefresh: handleRefresh, execution })));
|
|
13171
13200
|
};
|
|
@@ -13272,7 +13301,7 @@ var CollectionItem2 = ({ collection, deedId, adminAddress, userRole, onRefresh,
|
|
|
13272
13301
|
return /* @__PURE__ */ React144.createElement(Loader16, { size: "xs" });
|
|
13273
13302
|
}
|
|
13274
13303
|
if (userRole === "PO" /* Owner */) {
|
|
13275
|
-
return /* @__PURE__ */ React144.createElement(
|
|
13304
|
+
return /* @__PURE__ */ React144.createElement(ActionIcon21, { variant: "subtle", size: "lg", onClick: openBidsList }, /* @__PURE__ */ React144.createElement(IconArrowRight3, { size: 20 }));
|
|
13276
13305
|
} else if (userRole === "SA" /* ServiceProvider */ || userRole === "EA" /* Evaluator */) {
|
|
13277
13306
|
return /* @__PURE__ */ React144.createElement(Badge20, { size: "sm", color: getRoleColor(userRole) }, getRoleLabel(userRole));
|
|
13278
13307
|
} else {
|
|
@@ -13289,17 +13318,17 @@ var CollectionItem2 = ({ collection, deedId, adminAddress, userRole, onRefresh,
|
|
|
13289
13318
|
return /* @__PURE__ */ React144.createElement(UserPlus_default, null);
|
|
13290
13319
|
};
|
|
13291
13320
|
return /* @__PURE__ */ React144.createElement(ListItemContainer, { isChecked: false, onClick: () => {
|
|
13292
|
-
} }, /* @__PURE__ */ React144.createElement(Box29, { mr: "md", style: { display: "flex", alignItems: "center" } }, getCollectionIcon()), /* @__PURE__ */ React144.createElement(Stack102, { gap: 4, style: { flex: 1 } }, /* @__PURE__ */ React144.createElement(
|
|
13321
|
+
} }, /* @__PURE__ */ React144.createElement(Box29, { mr: "md", style: { display: "flex", alignItems: "center" } }, getCollectionIcon()), /* @__PURE__ */ React144.createElement(Stack102, { gap: 4, style: { flex: 1 } }, /* @__PURE__ */ React144.createElement(Text76, { size: "sm", fw: 500 }, getCollectionName(collection)), collection.description && /* @__PURE__ */ React144.createElement(Text76, { size: "xs", c: "dimmed" }, collection.description)), renderActionButton());
|
|
13293
13322
|
};
|
|
13294
13323
|
|
|
13295
13324
|
// src/mantine/blocks/bid/flow/components/ClaimCollectionsList.tsx
|
|
13296
13325
|
var ClaimCollectionsList2 = ({ collections, deedId, adminAddress, userAddress, onRefresh, execution }) => {
|
|
13297
13326
|
const { userRoles, loading } = useUserRoles(collections, userAddress, adminAddress, deedId);
|
|
13298
13327
|
if (!collections || collections.length === 0) {
|
|
13299
|
-
return /* @__PURE__ */ React145.createElement(
|
|
13328
|
+
return /* @__PURE__ */ React145.createElement(Text77, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No claim collections found");
|
|
13300
13329
|
}
|
|
13301
13330
|
if (loading) {
|
|
13302
|
-
return /* @__PURE__ */ React145.createElement(
|
|
13331
|
+
return /* @__PURE__ */ React145.createElement(Center8, { py: "md" }, /* @__PURE__ */ React145.createElement(Loader17, { size: "sm" }));
|
|
13303
13332
|
}
|
|
13304
13333
|
return /* @__PURE__ */ React145.createElement(Stack103, { gap: "md", px: 5 }, collections.map((collection) => /* @__PURE__ */ React145.createElement(
|
|
13305
13334
|
CollectionItem2,
|
|
@@ -13369,12 +13398,12 @@ var BidFlowView = ({ editor, block }) => {
|
|
|
13369
13398
|
const adminAddress = block.props.adminAddress || "";
|
|
13370
13399
|
const { collections, loading, error, refetch } = useCollections(did, selectedCollectionIds, block, editor);
|
|
13371
13400
|
if (!did) {
|
|
13372
|
-
return /* @__PURE__ */ React146.createElement(
|
|
13401
|
+
return /* @__PURE__ */ React146.createElement(Center9, { py: "xl" }, /* @__PURE__ */ React146.createElement(Text78, { size: "sm", c: "dimmed" }, "Please configure the bid block in template mode first"));
|
|
13373
13402
|
}
|
|
13374
13403
|
if (selectedCollectionIds.length === 0) {
|
|
13375
|
-
return /* @__PURE__ */ React146.createElement(
|
|
13404
|
+
return /* @__PURE__ */ React146.createElement(Center9, { py: "xl" }, /* @__PURE__ */ React146.createElement(Text78, { size: "sm", c: "dimmed" }, "No claim collections selected"));
|
|
13376
13405
|
}
|
|
13377
|
-
return /* @__PURE__ */ React146.createElement(Stack104, { w: "100%" }, /* @__PURE__ */ React146.createElement(Flex25, { px: 5, align: "center", justify: "space-between" }, /* @__PURE__ */ React146.createElement(
|
|
13406
|
+
return /* @__PURE__ */ React146.createElement(Stack104, { w: "100%" }, /* @__PURE__ */ React146.createElement(Flex25, { px: 5, align: "center", justify: "space-between" }, /* @__PURE__ */ React146.createElement(Title7, { order: 4 }, "Bid Application"), /* @__PURE__ */ React146.createElement(Flex25, { gap: "xs" }, /* @__PURE__ */ React146.createElement(ActionIcon22, { variant: "subtle", size: "sm", onClick: refetch, loading }, /* @__PURE__ */ React146.createElement(IconRefresh4, { size: 18 })), editable && /* @__PURE__ */ React146.createElement(ActionIcon22, { variant: "subtle", size: "sm", onClick: open }, /* @__PURE__ */ React146.createElement(IconSettings4, { size: 18 })))), loading ? /* @__PURE__ */ React146.createElement(Center9, { py: "xl" }, /* @__PURE__ */ React146.createElement(Loader18, { size: "md" })) : error ? /* @__PURE__ */ React146.createElement(Alert19, { color: "red", title: "Failed to load collections", icon: /* @__PURE__ */ React146.createElement(IconAlertCircle5, { size: 18 }) }, /* @__PURE__ */ React146.createElement(Text78, { size: "sm" }, error)) : /* @__PURE__ */ React146.createElement(
|
|
13378
13407
|
ClaimCollectionsList2,
|
|
13379
13408
|
{
|
|
13380
13409
|
collections,
|
|
@@ -13428,7 +13457,7 @@ import React155 from "react";
|
|
|
13428
13457
|
|
|
13429
13458
|
// src/mantine/blocks/evaluator/template/TemplateView.tsx
|
|
13430
13459
|
import React151, { useMemo as useMemo40 } from "react";
|
|
13431
|
-
import { Group as Group45, Stack as Stack105, Text as
|
|
13460
|
+
import { Group as Group45, Stack as Stack105, Text as Text79 } from "@mantine/core";
|
|
13432
13461
|
|
|
13433
13462
|
// src/mantine/blocks/evaluator/template/TemplateConfig.tsx
|
|
13434
13463
|
import React150, { useCallback as useCallback34 } from "react";
|
|
@@ -13564,21 +13593,21 @@ var EvaluatorTemplateView = ({ editor, block }) => {
|
|
|
13564
13593
|
const panelId = `${EVALUATOR_TEMPLATE_PANEL_ID}-${block.id}`;
|
|
13565
13594
|
const panelContent = useMemo40(() => /* @__PURE__ */ React151.createElement(TemplateConfig8, { editor, block }), [editor, block]);
|
|
13566
13595
|
const { open } = usePanel(panelId, panelContent);
|
|
13567
|
-
return /* @__PURE__ */ React151.createElement(BaseContainer, { onClick: open }, /* @__PURE__ */ React151.createElement(Group45, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React151.createElement(Group45, { wrap: "nowrap", align: "center" }, getIcon("checklist", block.props.icon), /* @__PURE__ */ React151.createElement(Stack105, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React151.createElement(
|
|
13596
|
+
return /* @__PURE__ */ React151.createElement(BaseContainer, { onClick: open }, /* @__PURE__ */ React151.createElement(Group45, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React151.createElement(Group45, { wrap: "nowrap", align: "center" }, getIcon("checklist", block.props.icon), /* @__PURE__ */ React151.createElement(Stack105, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React151.createElement(Text79, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Evaluator Title"), /* @__PURE__ */ React151.createElement(Text79, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description || "Evaluator description")))));
|
|
13568
13597
|
};
|
|
13569
13598
|
|
|
13570
13599
|
// src/mantine/blocks/evaluator/flow/FlowView.tsx
|
|
13571
13600
|
import React154, { useMemo as useMemo43 } from "react";
|
|
13572
|
-
import { Stack as Stack108, Text as
|
|
13573
|
-
import { IconSettings as
|
|
13601
|
+
import { Stack as Stack108, Text as Text82, Loader as Loader21, Center as Center11, Alert as Alert21, Title as Title9, Flex as Flex26, ActionIcon as ActionIcon25 } from "@mantine/core";
|
|
13602
|
+
import { IconSettings as IconSettings5, IconRefresh as IconRefresh6, IconAlertCircle as IconAlertCircle7 } from "@tabler/icons-react";
|
|
13574
13603
|
|
|
13575
13604
|
// src/mantine/blocks/evaluator/flow/ClaimCollectionsList.tsx
|
|
13576
13605
|
import React153, { useMemo as useMemo42, useEffect as useEffect38, useRef as useRef7 } from "react";
|
|
13577
|
-
import { Stack as Stack107, Text as
|
|
13606
|
+
import { Stack as Stack107, Text as Text81, ActionIcon as ActionIcon24, Tooltip as Tooltip14, Loader as Loader20, Center as Center10 } from "@mantine/core";
|
|
13578
13607
|
|
|
13579
13608
|
// src/mantine/blocks/evaluator/flow/ClaimsList.tsx
|
|
13580
13609
|
import React152, { useState as useState54, useEffect as useEffect37, useCallback as useCallback35, useMemo as useMemo41 } from "react";
|
|
13581
|
-
import { Paper as
|
|
13610
|
+
import { Paper as Paper12, CloseButton as CloseButton6, Title as Title8, Loader as Loader19, Stack as Stack106, Text as Text80, ActionIcon as ActionIcon23, Alert as Alert20, Badge as Badge21, Group as Group46, Button as Button30, Divider as Divider10 } from "@mantine/core";
|
|
13582
13611
|
import { IconAlertCircle as IconAlertCircle6, IconArrowRight as IconArrowRight4, IconRefresh as IconRefresh5, IconArrowLeft as IconArrowLeft4 } from "@tabler/icons-react";
|
|
13583
13612
|
import { Survey as Survey4, SurveyModel as SurveyModel4 } from "@ixo/surveys";
|
|
13584
13613
|
|
|
@@ -13886,7 +13915,7 @@ var ClaimsList = ({ collectionId, collectionName, deedId, adminAddress, onEvalua
|
|
|
13886
13915
|
}
|
|
13887
13916
|
}, [selectedClaim, handleBackToList, onEvaluationComplete]);
|
|
13888
13917
|
return /* @__PURE__ */ React152.createElement(
|
|
13889
|
-
|
|
13918
|
+
Paper12,
|
|
13890
13919
|
{
|
|
13891
13920
|
p: "md",
|
|
13892
13921
|
shadow: "sm",
|
|
@@ -13907,8 +13936,8 @@ var ClaimsList = ({ collectionId, collectionName, deedId, adminAddress, onEvalua
|
|
|
13907
13936
|
marginBottom: "1rem"
|
|
13908
13937
|
}
|
|
13909
13938
|
},
|
|
13910
|
-
/* @__PURE__ */ React152.createElement("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem" } }, viewMode === "survey" && /* @__PURE__ */ React152.createElement(
|
|
13911
|
-
/* @__PURE__ */ React152.createElement(Group46, { gap: "xs" }, viewMode === "list" && /* @__PURE__ */ React152.createElement(
|
|
13939
|
+
/* @__PURE__ */ React152.createElement("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem" } }, viewMode === "survey" && /* @__PURE__ */ React152.createElement(ActionIcon23, { variant: "subtle", onClick: handleBackToList }, /* @__PURE__ */ React152.createElement(IconArrowLeft4, { size: 20 })), /* @__PURE__ */ React152.createElement(Title8, { order: 3 }, viewMode === "list" ? `${collectionName} - Claims` : `Evaluate Claim #${selectedClaim?.claimId.slice(-8)}`), viewMode === "list" && !loading && claims.length > 0 && /* @__PURE__ */ React152.createElement(Badge21, { size: "lg", variant: "light" }, claims.length)),
|
|
13940
|
+
/* @__PURE__ */ React152.createElement(Group46, { gap: "xs" }, viewMode === "list" && /* @__PURE__ */ React152.createElement(ActionIcon23, { variant: "subtle", onClick: fetchClaims, loading, title: "Refresh claims" }, /* @__PURE__ */ React152.createElement(IconRefresh5, { size: 18 })), /* @__PURE__ */ React152.createElement(CloseButton6, { onClick: closePanel }))
|
|
13912
13941
|
),
|
|
13913
13942
|
/* @__PURE__ */ React152.createElement(
|
|
13914
13943
|
"div",
|
|
@@ -13937,7 +13966,7 @@ var ClaimsList = ({ collectionId, collectionName, deedId, adminAddress, onEvalua
|
|
|
13937
13966
|
pointerEvents: viewMode === "list" ? "auto" : "none"
|
|
13938
13967
|
}
|
|
13939
13968
|
},
|
|
13940
|
-
/* @__PURE__ */ React152.createElement(Stack106, { gap: "md", style: { flex: 1 } }, loading ? /* @__PURE__ */ React152.createElement(Stack106, { align: "center", justify: "center", style: { flex: 1 } }, /* @__PURE__ */ React152.createElement(Loader19, { size: "lg" }), /* @__PURE__ */ React152.createElement(
|
|
13969
|
+
/* @__PURE__ */ React152.createElement(Stack106, { gap: "md", style: { flex: 1 } }, loading ? /* @__PURE__ */ React152.createElement(Stack106, { align: "center", justify: "center", style: { flex: 1 } }, /* @__PURE__ */ React152.createElement(Loader19, { size: "lg" }), /* @__PURE__ */ React152.createElement(Text80, { size: "sm", c: "dimmed" }, "Loading claims...")) : error ? /* @__PURE__ */ React152.createElement(Alert20, { color: "red", title: "Failed to load claims", icon: /* @__PURE__ */ React152.createElement(IconAlertCircle6, { size: 18 }) }, /* @__PURE__ */ React152.createElement(Text80, { size: "sm" }, error)) : claims.length === 0 ? /* @__PURE__ */ React152.createElement(Stack106, { align: "center", justify: "center", style: { flex: 1 } }, /* @__PURE__ */ React152.createElement(Text80, { size: "sm", c: "dimmed", ta: "center" }, "No claims found for this collection.")) : /* @__PURE__ */ React152.createElement(Stack106, { gap: "xs" }, claims.map((claim) => /* @__PURE__ */ React152.createElement(ClaimListItem, { key: claim.claimId, claim, onViewClaim: () => handleViewClaim(claim) }))))
|
|
13941
13970
|
),
|
|
13942
13971
|
/* @__PURE__ */ React152.createElement(
|
|
13943
13972
|
"div",
|
|
@@ -13957,7 +13986,7 @@ var ClaimsList = ({ collectionId, collectionName, deedId, adminAddress, onEvalua
|
|
|
13957
13986
|
pointerEvents: viewMode === "survey" ? "auto" : "none"
|
|
13958
13987
|
}
|
|
13959
13988
|
},
|
|
13960
|
-
surveyLoading ? /* @__PURE__ */ React152.createElement(Stack106, { align: "center", justify: "center", style: { flex: 1 } }, /* @__PURE__ */ React152.createElement(Loader19, { size: "lg" }), /* @__PURE__ */ React152.createElement(
|
|
13989
|
+
surveyLoading ? /* @__PURE__ */ React152.createElement(Stack106, { align: "center", justify: "center", style: { flex: 1 } }, /* @__PURE__ */ React152.createElement(Loader19, { size: "lg" }), /* @__PURE__ */ React152.createElement(Text80, { size: "sm", c: "dimmed" }, "Loading claim data...")) : surveyError ? /* @__PURE__ */ React152.createElement(Stack106, { style: { flex: 1 } }, /* @__PURE__ */ React152.createElement(Alert20, { color: "red", title: "Failed to load claim data", icon: /* @__PURE__ */ React152.createElement(IconAlertCircle6, { size: 18 }) }, /* @__PURE__ */ React152.createElement(Text80, { size: "sm" }, surveyError))) : /* @__PURE__ */ React152.createElement(React152.Fragment, null, /* @__PURE__ */ React152.createElement("div", { style: surveyContainerStyle }, surveyModel && /* @__PURE__ */ React152.createElement(Survey4, { model: surveyModel })), /* @__PURE__ */ React152.createElement(Divider10, { my: "md" }), /* @__PURE__ */ React152.createElement(Stack106, { gap: "sm" }, /* @__PURE__ */ React152.createElement(Button30, { color: "green", onClick: handleApprove, loading: evaluating, disabled: evaluating }, "Approve Claim"), /* @__PURE__ */ React152.createElement(Button30, { color: "red", variant: "outline", onClick: handleReject, loading: evaluating, disabled: evaluating }, "Reject Claim")))
|
|
13961
13990
|
)
|
|
13962
13991
|
)
|
|
13963
13992
|
);
|
|
@@ -14034,7 +14063,7 @@ var ClaimListItem = ({ claim, onViewClaim }) => {
|
|
|
14034
14063
|
style: { cursor: "pointer" }
|
|
14035
14064
|
},
|
|
14036
14065
|
/* @__PURE__ */ React152.createElement(ListItemContainer, { isChecked: false, onClick: () => {
|
|
14037
|
-
} }, /* @__PURE__ */ React152.createElement(Stack106, { gap: 4, style: { flex: 1 } }, /* @__PURE__ */ React152.createElement(
|
|
14066
|
+
} }, /* @__PURE__ */ React152.createElement(Stack106, { gap: 4, style: { flex: 1 } }, /* @__PURE__ */ React152.createElement(Text80, { size: "sm", fw: 500 }, "Claim #", claim.claimId.slice(-8)), /* @__PURE__ */ React152.createElement(Text80, { size: "xs", c: "dimmed" }, "Submitted: ", formatDate2(claim.submissionDate || claim.submittedAt)), claim.agentDid && /* @__PURE__ */ React152.createElement(Group46, { gap: 4 }, /* @__PURE__ */ React152.createElement(Text80, { size: "xs", c: "dimmed" }, "Agent: ", loadingProfile ? "Loading..." : displayName), userProfile?.verified && /* @__PURE__ */ React152.createElement(Text80, { size: "xs", c: "blue", fw: 600, title: "Verified user" }, "\u2713"))), /* @__PURE__ */ React152.createElement(Stack106, { gap: 4, align: "flex-end" }, /* @__PURE__ */ React152.createElement(Badge21, { color: claimStatus.color, size: "sm" }, claimStatus.status), /* @__PURE__ */ React152.createElement(ActionIcon23, { variant: "subtle", size: "sm" }, /* @__PURE__ */ React152.createElement(IconArrowRight4, { size: 16 }))))
|
|
14038
14067
|
);
|
|
14039
14068
|
};
|
|
14040
14069
|
|
|
@@ -14074,15 +14103,15 @@ var CollectionItem3 = ({ collection, deedId, adminAddress, userRole, onRefresh }
|
|
|
14074
14103
|
openClaimsPanel();
|
|
14075
14104
|
}
|
|
14076
14105
|
};
|
|
14077
|
-
return /* @__PURE__ */ React153.createElement("div", { style: { opacity: canEvaluateClaims ? 1 : 0.5 } }, /* @__PURE__ */ React153.createElement(ListItemContainer, { tooltip: "You need to be an evaluator agent to review claims", onClick: handleClick, disabled: !canEvaluateClaims, isChecked: opened }, /* @__PURE__ */ React153.createElement(Stack107, { gap: 4, style: { flex: 1 } }, /* @__PURE__ */ React153.createElement(
|
|
14106
|
+
return /* @__PURE__ */ React153.createElement("div", { style: { opacity: canEvaluateClaims ? 1 : 0.5 } }, /* @__PURE__ */ React153.createElement(ListItemContainer, { tooltip: "You need to be an evaluator agent to review claims", onClick: handleClick, disabled: !canEvaluateClaims, isChecked: opened }, /* @__PURE__ */ React153.createElement(Stack107, { gap: 4, style: { flex: 1 } }, /* @__PURE__ */ React153.createElement(Text81, { size: "sm", fw: 500, c: canEvaluateClaims ? void 0 : "dimmed" }, getCollectionName2(collection)), collection.description && /* @__PURE__ */ React153.createElement(Text81, { size: "xs", c: "dimmed" }, collection.description)), /* @__PURE__ */ React153.createElement(Tooltip14, { label: "You need to be an evaluator agent to review claims", disabled: canEvaluateClaims, position: "left", withArrow: true }, /* @__PURE__ */ React153.createElement(ActionIcon24, { variant: "subtle", size: "lg", onClick: handleClick, disabled: !canEvaluateClaims, style: { cursor: canEvaluateClaims ? "pointer" : "not-allowed" } }, /* @__PURE__ */ React153.createElement(IconArrowRight5, { size: 20 })))));
|
|
14078
14107
|
};
|
|
14079
14108
|
var ClaimCollectionsList3 = ({ collections, deedId, adminAddress, userAddress, onRefresh }) => {
|
|
14080
14109
|
const { userRoles, loading: loadingRoles } = useUserRoles(collections, userAddress, adminAddress, deedId);
|
|
14081
14110
|
if (!collections || collections.length === 0) {
|
|
14082
|
-
return /* @__PURE__ */ React153.createElement(
|
|
14111
|
+
return /* @__PURE__ */ React153.createElement(Text81, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No claim collections found");
|
|
14083
14112
|
}
|
|
14084
14113
|
if (loadingRoles) {
|
|
14085
|
-
return /* @__PURE__ */ React153.createElement(
|
|
14114
|
+
return /* @__PURE__ */ React153.createElement(Center10, { py: "md" }, /* @__PURE__ */ React153.createElement(Loader20, { size: "sm" }));
|
|
14086
14115
|
}
|
|
14087
14116
|
return /* @__PURE__ */ React153.createElement(Stack107, { gap: "md", px: 5 }, collections.map((collection) => /* @__PURE__ */ React153.createElement(CollectionItem3, { key: collection.id, collection, deedId, adminAddress, userRole: userRoles[collection.id] || null, onRefresh })));
|
|
14088
14117
|
};
|
|
@@ -14103,12 +14132,12 @@ var EvaluatorFlowView = ({ editor, block }) => {
|
|
|
14103
14132
|
const adminAddress = block.props.adminAddress || "";
|
|
14104
14133
|
const { collections, loading, error, refetch } = useCollections(did, selectedCollectionIds, block, editor);
|
|
14105
14134
|
if (!did) {
|
|
14106
|
-
return /* @__PURE__ */ React154.createElement(
|
|
14135
|
+
return /* @__PURE__ */ React154.createElement(Center11, { py: "xl" }, /* @__PURE__ */ React154.createElement(Text82, { size: "sm", c: "dimmed" }, "Please configure the evaluator block in template mode first"));
|
|
14107
14136
|
}
|
|
14108
14137
|
if (selectedCollectionIds.length === 0) {
|
|
14109
|
-
return /* @__PURE__ */ React154.createElement(
|
|
14138
|
+
return /* @__PURE__ */ React154.createElement(Center11, { py: "xl" }, /* @__PURE__ */ React154.createElement(Text82, { size: "sm", c: "dimmed" }, "No claim collections selected"));
|
|
14110
14139
|
}
|
|
14111
|
-
return /* @__PURE__ */ React154.createElement(Stack108, { w: "100%" }, /* @__PURE__ */ React154.createElement(Flex26, { px: 5, align: "center", justify: "space-between" }, /* @__PURE__ */ React154.createElement(
|
|
14140
|
+
return /* @__PURE__ */ React154.createElement(Stack108, { w: "100%" }, /* @__PURE__ */ React154.createElement(Flex26, { px: 5, align: "center", justify: "space-between" }, /* @__PURE__ */ React154.createElement(Title9, { order: 4 }, "Evaluate Claims"), /* @__PURE__ */ React154.createElement(Flex26, { gap: "xs" }, /* @__PURE__ */ React154.createElement(ActionIcon25, { variant: "subtle", size: "sm", onClick: refetch, loading }, /* @__PURE__ */ React154.createElement(IconRefresh6, { size: 18 })), editable && /* @__PURE__ */ React154.createElement(ActionIcon25, { variant: "subtle", size: "sm" }, /* @__PURE__ */ React154.createElement(IconSettings5, { size: 18 })))), loading ? /* @__PURE__ */ React154.createElement(Center11, { py: "xl" }, /* @__PURE__ */ React154.createElement(Loader21, { size: "md" })) : error ? /* @__PURE__ */ React154.createElement(Alert21, { color: "red", title: "Failed to load collections", icon: /* @__PURE__ */ React154.createElement(IconAlertCircle7, { size: 18 }) }, /* @__PURE__ */ React154.createElement(Text82, { size: "sm" }, error)) : /* @__PURE__ */ React154.createElement(ClaimCollectionsList3, { collections, deedId: did, adminAddress, userAddress, onRefresh: refetch }));
|
|
14112
14141
|
};
|
|
14113
14142
|
|
|
14114
14143
|
// src/mantine/blocks/evaluator/EvaluatorBlock.tsx
|
|
@@ -14150,7 +14179,7 @@ import { createReactBlockSpec as createReactBlockSpec12 } from "@blocknote/react
|
|
|
14150
14179
|
|
|
14151
14180
|
// src/mantine/blocks/visualization/VisualizationBlock.tsx
|
|
14152
14181
|
import React157, { useMemo as useMemo44, useCallback as useCallback36, useRef as useRef8, useState as useState55, useEffect as useEffect39 } from "react";
|
|
14153
|
-
import { Box as Box30, Stack as Stack109, Text as
|
|
14182
|
+
import { Box as Box30, Stack as Stack109, Text as Text83, Paper as Paper13, Group as Group47 } from "@mantine/core";
|
|
14154
14183
|
function VisualizationBlock({ block, editor }) {
|
|
14155
14184
|
const { visualizationRenderer } = useBlocknoteContext();
|
|
14156
14185
|
const { vizType, config, title, preferences } = block.props;
|
|
@@ -14200,7 +14229,7 @@ function VisualizationBlock({ block, editor }) {
|
|
|
14200
14229
|
[editor, block]
|
|
14201
14230
|
);
|
|
14202
14231
|
if (!vizType || !parsedConfig) {
|
|
14203
|
-
return /* @__PURE__ */ React157.createElement(
|
|
14232
|
+
return /* @__PURE__ */ React157.createElement(Paper13, { p: "xl", withBorder: true, w: "100%", radius: "lg" }, /* @__PURE__ */ React157.createElement(Stack109, { align: "center", gap: "sm" }, /* @__PURE__ */ React157.createElement(Text83, { fz: "18", ta: "center" }, "Visualization Block"), !vizType && /* @__PURE__ */ React157.createElement(Text83, { fz: "sm", c: "dimmed" }, "No visualization type set"), !parsedConfig && /* @__PURE__ */ React157.createElement(Text83, { fz: "sm", c: "red.5" }, "Failed to parse visualization configuration.")));
|
|
14204
14233
|
}
|
|
14205
14234
|
if (visualizationRenderer) {
|
|
14206
14235
|
const renderedContent = visualizationRenderer(vizType, parsedConfig, parsedPreferences, handlePreferencesChange);
|
|
@@ -14208,7 +14237,7 @@ function VisualizationBlock({ block, editor }) {
|
|
|
14208
14237
|
return /* @__PURE__ */ React157.createElement(Box30, { ref: containerRef, w: "100%", miw: 200, mih: 200 }, hasValidDimensions ? renderedContent : null);
|
|
14209
14238
|
}
|
|
14210
14239
|
}
|
|
14211
|
-
return /* @__PURE__ */ React157.createElement(
|
|
14240
|
+
return /* @__PURE__ */ React157.createElement(Paper13, { p: "lg", withBorder: true, radius: "lg", w: "100%" }, /* @__PURE__ */ React157.createElement(Stack109, { gap: "sm" }, /* @__PURE__ */ React157.createElement(Text83, { fz: "18", ta: "center" }, "Visualization Block"), /* @__PURE__ */ React157.createElement(Paper13, { p: "sm", bg: "var(--mantine-color-dark-6)", radius: "sm" }, /* @__PURE__ */ React157.createElement(Stack109, { gap: "xs" }, !title && /* @__PURE__ */ React157.createElement(Group47, { gap: "xs" }, /* @__PURE__ */ React157.createElement(Text83, { size: "xs", c: "dimmed", fw: 500 }, "Title:"), /* @__PURE__ */ React157.createElement(Text83, { size: "xs", c: "white" }, title || "No title")), /* @__PURE__ */ React157.createElement(Group47, { gap: "xs" }, /* @__PURE__ */ React157.createElement(Text83, { size: "xs", c: "dimmed", fw: 500 }, "Type:"), /* @__PURE__ */ React157.createElement(Text83, { size: "xs", c: "white" }, vizType)))), /* @__PURE__ */ React157.createElement(Text83, { c: "dimmed", fz: "sm", fs: "italic", ta: "center" }, "View in a compatible client to see the full visualization.")));
|
|
14212
14241
|
}
|
|
14213
14242
|
|
|
14214
14243
|
// src/mantine/blocks/visualization/VisualizationBlockSpec.tsx
|
|
@@ -14249,11 +14278,10 @@ import React164 from "react";
|
|
|
14249
14278
|
|
|
14250
14279
|
// src/mantine/blocks/domainCreator/template/TemplateView.tsx
|
|
14251
14280
|
import React161, { useMemo as useMemo45 } from "react";
|
|
14252
|
-
import { Badge as Badge22, Group as Group48, Stack as Stack110, Text as
|
|
14281
|
+
import { Badge as Badge22, Group as Group48, Stack as Stack110, Text as Text84 } from "@mantine/core";
|
|
14253
14282
|
|
|
14254
14283
|
// src/mantine/blocks/domainCreator/template/TemplateConfig.tsx
|
|
14255
14284
|
import React160, { useCallback as useCallback37 } from "react";
|
|
14256
|
-
import { Paper as Paper15, CloseButton as CloseButton7, Title as Title11 } from "@mantine/core";
|
|
14257
14285
|
|
|
14258
14286
|
// src/mantine/blocks/domainCreator/template/GeneralTab.tsx
|
|
14259
14287
|
import React159, { useEffect as useEffect40, useState as useState56 } from "react";
|
|
@@ -14319,54 +14347,29 @@ var TemplateConfig9 = ({ editor, block }) => {
|
|
|
14319
14347
|
},
|
|
14320
14348
|
[editor, block]
|
|
14321
14349
|
);
|
|
14322
|
-
return /* @__PURE__ */ React160.createElement(
|
|
14323
|
-
|
|
14350
|
+
return /* @__PURE__ */ React160.createElement(BaseRightPanelLayout, { title: "Domain Creator Settings", onClose: closePanel }, /* @__PURE__ */ React160.createElement(
|
|
14351
|
+
ReusablePanel,
|
|
14324
14352
|
{
|
|
14325
|
-
|
|
14326
|
-
|
|
14327
|
-
|
|
14328
|
-
|
|
14329
|
-
|
|
14330
|
-
|
|
14331
|
-
|
|
14332
|
-
|
|
14333
|
-
|
|
14334
|
-
|
|
14335
|
-
|
|
14336
|
-
|
|
14337
|
-
|
|
14338
|
-
|
|
14339
|
-
|
|
14340
|
-
marginBottom: "1rem"
|
|
14353
|
+
extraTabs: [
|
|
14354
|
+
{
|
|
14355
|
+
label: "General",
|
|
14356
|
+
value: "general",
|
|
14357
|
+
content: /* @__PURE__ */ React160.createElement(
|
|
14358
|
+
GeneralTab9,
|
|
14359
|
+
{
|
|
14360
|
+
title: block.props.title || "",
|
|
14361
|
+
description: block.props.description || "",
|
|
14362
|
+
icon: block.props.icon || "file-text",
|
|
14363
|
+
onTitleChange: (value) => updateProp("title", value),
|
|
14364
|
+
onDescriptionChange: (value) => updateProp("description", value),
|
|
14365
|
+
onIconChange: (value) => updateProp("icon", value)
|
|
14366
|
+
}
|
|
14367
|
+
)
|
|
14341
14368
|
}
|
|
14342
|
-
|
|
14343
|
-
|
|
14344
|
-
|
|
14345
|
-
|
|
14346
|
-
/* @__PURE__ */ React160.createElement(
|
|
14347
|
-
ReusablePanel,
|
|
14348
|
-
{
|
|
14349
|
-
extraTabs: [
|
|
14350
|
-
{
|
|
14351
|
-
label: "General",
|
|
14352
|
-
value: "general",
|
|
14353
|
-
content: /* @__PURE__ */ React160.createElement(
|
|
14354
|
-
GeneralTab9,
|
|
14355
|
-
{
|
|
14356
|
-
title: block.props.title || "",
|
|
14357
|
-
description: block.props.description || "",
|
|
14358
|
-
icon: block.props.icon || "file-text",
|
|
14359
|
-
onTitleChange: (value) => updateProp("title", value),
|
|
14360
|
-
onDescriptionChange: (value) => updateProp("description", value),
|
|
14361
|
-
onIconChange: (value) => updateProp("icon", value)
|
|
14362
|
-
}
|
|
14363
|
-
)
|
|
14364
|
-
}
|
|
14365
|
-
],
|
|
14366
|
-
context: { editor, block }
|
|
14367
|
-
}
|
|
14368
|
-
)
|
|
14369
|
-
);
|
|
14369
|
+
],
|
|
14370
|
+
context: { editor, block }
|
|
14371
|
+
}
|
|
14372
|
+
));
|
|
14370
14373
|
};
|
|
14371
14374
|
|
|
14372
14375
|
// src/mantine/blocks/domainCreator/template/TemplateView.tsx
|
|
@@ -14375,17 +14378,17 @@ var DomainCreatorTemplateView = ({ editor, block }) => {
|
|
|
14375
14378
|
const panelId = `${DOMAIN_CREATOR_TEMPLATE_PANEL_ID}-${block.id}`;
|
|
14376
14379
|
const panelContent = useMemo45(() => /* @__PURE__ */ React161.createElement(TemplateConfig9, { editor, block }), [editor, block]);
|
|
14377
14380
|
const { open } = usePanel(panelId, panelContent);
|
|
14378
|
-
return /* @__PURE__ */ React161.createElement(BaseContainer, { onClick: open }, /* @__PURE__ */ React161.createElement(Badge22, { size: "xs", variant: "light", color: "gray", style: { position: "absolute", top: 8, right: 8 } }, "Template"), /* @__PURE__ */ React161.createElement(Group48, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React161.createElement(Group48, { wrap: "nowrap", align: "center" }, getIcon("file-text", block.props.icon), /* @__PURE__ */ React161.createElement(Stack110, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React161.createElement(
|
|
14381
|
+
return /* @__PURE__ */ React161.createElement(BaseContainer, { onClick: open }, /* @__PURE__ */ React161.createElement(Badge22, { size: "xs", variant: "light", color: "gray", style: { position: "absolute", top: 8, right: 8 } }, "Template"), /* @__PURE__ */ React161.createElement(Group48, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React161.createElement(Group48, { wrap: "nowrap", align: "center" }, getIcon("file-text", block.props.icon), /* @__PURE__ */ React161.createElement(Stack110, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React161.createElement(Text84, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Domain Creator"), /* @__PURE__ */ React161.createElement(Text84, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description || "Configure the domain creation flow")))));
|
|
14379
14382
|
};
|
|
14380
14383
|
|
|
14381
14384
|
// src/mantine/blocks/domainCreator/flow/FlowView.tsx
|
|
14382
14385
|
import React163, { useCallback as useCallback39, useMemo as useMemo47, useState as useState58 } from "react";
|
|
14383
|
-
import { ActionIcon as
|
|
14386
|
+
import { ActionIcon as ActionIcon26, Badge as Badge23, Group as Group50, Stack as Stack112, Text as Text86, Tooltip as Tooltip15 } from "@mantine/core";
|
|
14384
14387
|
import { IconChevronRight as IconChevronRight6, IconCheck as IconCheck4, IconAlertCircle as IconAlertCircle9 } from "@tabler/icons-react";
|
|
14385
14388
|
|
|
14386
14389
|
// src/mantine/blocks/domainCreator/flow/DomainCreatorSurveyPanel.tsx
|
|
14387
14390
|
import React162, { useCallback as useCallback38, useEffect as useEffect41, useMemo as useMemo46, useRef as useRef9, useState as useState57 } from "react";
|
|
14388
|
-
import { Alert as Alert22, Button as Button31,
|
|
14391
|
+
import { Alert as Alert22, Button as Button31, Group as Group49, Loader as Loader22, Stack as Stack111, Text as Text85 } from "@mantine/core";
|
|
14389
14392
|
import { useDebouncedCallback } from "@mantine/hooks";
|
|
14390
14393
|
import { IconAlertCircle as IconAlertCircle8, IconCheck as IconCheck3 } from "@tabler/icons-react";
|
|
14391
14394
|
import { Survey as Survey5, SurveyModel as SurveyModel5 } from "@ixo/surveys";
|
|
@@ -15659,15 +15662,23 @@ var DomainCreatorSurveyPanel = ({ editor, block, onComplete, entityDid: existing
|
|
|
15659
15662
|
uploading: "Uploading credential to storage...",
|
|
15660
15663
|
creating: "Creating domain entity..."
|
|
15661
15664
|
};
|
|
15662
|
-
return /* @__PURE__ */ React162.createElement(Stack111, { gap: "md", p: "md", align: "center", justify: "center", style: { minHeight: 300 } }, /* @__PURE__ */ React162.createElement(Loader22, { size: "lg" }), /* @__PURE__ */ React162.createElement(
|
|
15665
|
+
return /* @__PURE__ */ React162.createElement(Stack111, { gap: "md", p: "md", align: "center", justify: "center", style: { minHeight: 300 } }, /* @__PURE__ */ React162.createElement(Loader22, { size: "lg" }), /* @__PURE__ */ React162.createElement(Text85, { size: "sm", c: "dimmed" }, stepMessages[flowStep]));
|
|
15663
15666
|
}
|
|
15664
15667
|
if (flowStep === "success") {
|
|
15665
|
-
return /* @__PURE__ */ React162.createElement(Stack111, { gap: "md", p: "md" }, /* @__PURE__ */ React162.createElement(Alert22, { icon: /* @__PURE__ */ React162.createElement(IconCheck3, { size: 16 }), title: "Domain Created Successfully", color: "green" }, /* @__PURE__ */ React162.createElement(Stack111, { gap: "xs" }, /* @__PURE__ */ React162.createElement(
|
|
15668
|
+
return /* @__PURE__ */ React162.createElement(Stack111, { gap: "md", p: "md" }, /* @__PURE__ */ React162.createElement(Alert22, { icon: /* @__PURE__ */ React162.createElement(IconCheck3, { size: 16 }), title: "Domain Created Successfully", color: "green" }, /* @__PURE__ */ React162.createElement(Stack111, { gap: "xs" }, /* @__PURE__ */ React162.createElement(Text85, { size: "sm" }, "Your domain has been created and the Domain Card credential has been signed and stored."), createdEntityDid && /* @__PURE__ */ React162.createElement(Text85, { size: "xs", c: "dimmed" }, "Entity DID: ", createdEntityDid))), /* @__PURE__ */ React162.createElement(Button31, { onClick: handleVisitEntity }, "Visit Entity"));
|
|
15666
15669
|
}
|
|
15667
15670
|
if (flowStep === "error") {
|
|
15668
|
-
return /* @__PURE__ */ React162.createElement(Stack111, { gap: "md", p: "md" }, /* @__PURE__ */ React162.createElement(Alert22, { icon: /* @__PURE__ */ React162.createElement(IconAlertCircle8, { size: 16 }), title: "Domain Creation Failed", color: "red" }, /* @__PURE__ */ React162.createElement(
|
|
15671
|
+
return /* @__PURE__ */ React162.createElement(Stack111, { gap: "md", p: "md" }, /* @__PURE__ */ React162.createElement(Alert22, { icon: /* @__PURE__ */ React162.createElement(IconAlertCircle8, { size: 16 }), title: "Domain Creation Failed", color: "red" }, /* @__PURE__ */ React162.createElement(Text85, { size: "sm" }, error || "An unexpected error occurred")), /* @__PURE__ */ React162.createElement(Group49, null, /* @__PURE__ */ React162.createElement(Button31, { variant: "outline", onClick: handleRetry }, "Try Again"), /* @__PURE__ */ React162.createElement(Button31, { variant: "subtle", onClick: handleClose }, "Close")));
|
|
15669
15672
|
}
|
|
15670
|
-
return /* @__PURE__ */ React162.createElement(
|
|
15673
|
+
return /* @__PURE__ */ React162.createElement(
|
|
15674
|
+
BaseRightPanelLayout,
|
|
15675
|
+
{
|
|
15676
|
+
title: "Domain Creator",
|
|
15677
|
+
onClose: handleClose,
|
|
15678
|
+
captionContent: /* @__PURE__ */ React162.createElement(Text85, { size: "sm", mb: "md", px: "xl", c: "dimmed" }, "Complete the survey to create a new domain with a signed Domain Card credential.")
|
|
15679
|
+
},
|
|
15680
|
+
/* @__PURE__ */ React162.createElement(Survey5, { model: surveyModel })
|
|
15681
|
+
);
|
|
15671
15682
|
};
|
|
15672
15683
|
|
|
15673
15684
|
// src/mantine/blocks/domainCreator/flow/FlowView.tsx
|
|
@@ -15714,7 +15725,7 @@ var DomainCreatorFlowView = ({ editor, block }) => {
|
|
|
15714
15725
|
return { variant: "light", color: "gray", text: "Click to start", icon: null };
|
|
15715
15726
|
};
|
|
15716
15727
|
const badgeProps = getBadgeProps();
|
|
15717
|
-
return /* @__PURE__ */ React163.createElement(BaseContainer, { onClick: handleOpen }, /* @__PURE__ */ React163.createElement(Group50, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React163.createElement(Group50, { wrap: "nowrap", align: "center", style: { flex: 1 } }, getIcon("file-text", block.props.icon), /* @__PURE__ */ React163.createElement(Stack112, { gap: 4, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React163.createElement(Group50, { gap: "xs", align: "center" }, /* @__PURE__ */ React163.createElement(
|
|
15728
|
+
return /* @__PURE__ */ React163.createElement(BaseContainer, { onClick: handleOpen }, /* @__PURE__ */ React163.createElement(Group50, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React163.createElement(Group50, { wrap: "nowrap", align: "center", style: { flex: 1 } }, getIcon("file-text", block.props.icon), /* @__PURE__ */ React163.createElement(Stack112, { gap: 4, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React163.createElement(Group50, { gap: "xs", align: "center" }, /* @__PURE__ */ React163.createElement(Text86, { fw: 600, size: "sm", contentEditable: false }, block.props.title || "Domain Creator"), /* @__PURE__ */ React163.createElement(Badge23, { size: "xs", variant: badgeProps.variant, color: badgeProps.color, leftSection: badgeProps.icon }, badgeProps.text)), /* @__PURE__ */ React163.createElement(Text86, { size: "xs", c: "dimmed", contentEditable: false, lineClamp: 2 }, hasExistingSubmission ? `Domain created: ${lastSubmission.entityDid}` : block.props.description || "Open the survey panel to create a new domain."))), /* @__PURE__ */ React163.createElement(Tooltip15, { label: hasExistingSubmission ? "View/Edit domain" : "Create domain", withArrow: true }, /* @__PURE__ */ React163.createElement(ActionIcon26, { variant: "subtle", color: "blue" }, /* @__PURE__ */ React163.createElement(IconChevronRight6, { size: 18 })))));
|
|
15718
15729
|
};
|
|
15719
15730
|
|
|
15720
15731
|
// src/mantine/blocks/domainCreator/DomainCreatorBlock.tsx
|
|
@@ -15765,7 +15776,7 @@ import React167, { useCallback as useCallback40 } from "react";
|
|
|
15765
15776
|
|
|
15766
15777
|
// src/mantine/blocks/protocolSelector/template/GeneralTab.tsx
|
|
15767
15778
|
import React166, { useEffect as useEffect42, useMemo as useMemo48, useState as useState59 } from "react";
|
|
15768
|
-
import { Divider as Divider11, Stack as Stack113, Text as
|
|
15779
|
+
import { Divider as Divider11, Stack as Stack113, Text as Text87, PillsInput as PillsInput2, Pill as Pill2, Box as Box31 } from "@mantine/core";
|
|
15769
15780
|
var GeneralTab10 = ({ title, description, protocolDids, onTitleChange, onDescriptionChange, onProtocolDidsChange }) => {
|
|
15770
15781
|
const [localTitle, setLocalTitle] = useState59(title || "");
|
|
15771
15782
|
const [localDescription, setLocalDescription] = useState59(description || "");
|
|
@@ -15796,7 +15807,7 @@ var GeneralTab10 = ({ title, description, protocolDids, onTitleChange, onDescrip
|
|
|
15796
15807
|
const newDids = localDids.filter((did) => did !== didToRemove);
|
|
15797
15808
|
onProtocolDidsChange(JSON.stringify(newDids));
|
|
15798
15809
|
};
|
|
15799
|
-
return /* @__PURE__ */ React166.createElement(Stack113, { gap: "lg" }, /* @__PURE__ */ React166.createElement(Stack113, { gap: "xs" }, /* @__PURE__ */ React166.createElement(
|
|
15810
|
+
return /* @__PURE__ */ React166.createElement(Stack113, { gap: "lg" }, /* @__PURE__ */ React166.createElement(Stack113, { gap: "xs" }, /* @__PURE__ */ React166.createElement(Text87, { size: "sm", fw: 600 }, "Title"), /* @__PURE__ */ React166.createElement(
|
|
15800
15811
|
BaseTextInput,
|
|
15801
15812
|
{
|
|
15802
15813
|
placeholder: "e.g. Select type of the domain",
|
|
@@ -15820,7 +15831,7 @@ var GeneralTab10 = ({ title, description, protocolDids, onTitleChange, onDescrip
|
|
|
15820
15831
|
onDescriptionChange(newDescription);
|
|
15821
15832
|
}
|
|
15822
15833
|
}
|
|
15823
|
-
)), /* @__PURE__ */ React166.createElement(Divider11, { variant: "dashed" }), /* @__PURE__ */ React166.createElement(Stack113, { gap: "xs" }, /* @__PURE__ */ React166.createElement(
|
|
15834
|
+
)), /* @__PURE__ */ React166.createElement(Divider11, { variant: "dashed" }), /* @__PURE__ */ React166.createElement(Stack113, { gap: "xs" }, /* @__PURE__ */ React166.createElement(Text87, { size: "sm", fw: 600 }, "Protocol DIDs"), /* @__PURE__ */ React166.createElement(Text87, { size: "xs", c: "dimmed" }, "Add the protocol DIDs that users can select from. Enter a DID and press Enter to add it."), /* @__PURE__ */ React166.createElement(PillsInput2, null, /* @__PURE__ */ React166.createElement(Pill2.Group, null, localDids.map((did) => /* @__PURE__ */ React166.createElement(Pill2, { key: did, withRemoveButton: true, onRemove: () => handleRemoveDid(did) }, did.length > 30 ? `${did.slice(0, 15)}...${did.slice(-12)}` : did)), /* @__PURE__ */ React166.createElement(
|
|
15824
15835
|
PillsInput2.Field,
|
|
15825
15836
|
{
|
|
15826
15837
|
placeholder: localDids.length === 0 ? "Enter protocol DID and press Enter" : "",
|
|
@@ -15833,7 +15844,7 @@ var GeneralTab10 = ({ title, description, protocolDids, onTitleChange, onDescrip
|
|
|
15833
15844
|
}
|
|
15834
15845
|
}
|
|
15835
15846
|
}
|
|
15836
|
-
))), localDids.length > 0 && /* @__PURE__ */ React166.createElement(Box31, { mt: "xs" }, /* @__PURE__ */ React166.createElement(
|
|
15847
|
+
))), localDids.length > 0 && /* @__PURE__ */ React166.createElement(Box31, { mt: "xs" }, /* @__PURE__ */ React166.createElement(Text87, { size: "xs", c: "dimmed" }, localDids.length, " protocol", localDids.length !== 1 ? "s" : "", " configured"))));
|
|
15837
15848
|
};
|
|
15838
15849
|
|
|
15839
15850
|
// src/mantine/blocks/protocolSelector/template/TemplateConfig.tsx
|
|
@@ -15876,7 +15887,7 @@ var TemplateConfig10 = ({ editor, block }) => {
|
|
|
15876
15887
|
};
|
|
15877
15888
|
|
|
15878
15889
|
// src/mantine/blocks/protocolSelector/template/TemplateView.tsx
|
|
15879
|
-
import { Box as Box32, Group as Group51, Stack as Stack114, Text as
|
|
15890
|
+
import { Box as Box32, Group as Group51, Stack as Stack114, Text as Text88 } from "@mantine/core";
|
|
15880
15891
|
import { IconCircleDashed as IconCircleDashed2 } from "@tabler/icons-react";
|
|
15881
15892
|
var PROTOCOL_SELECTOR_TEMPLATE_PANEL_ID = "protocol-selector-template-panel";
|
|
15882
15893
|
var ProtocolSelectorTemplateView = ({ editor, block }) => {
|
|
@@ -15905,17 +15916,17 @@ var ProtocolSelectorTemplateView = ({ editor, block }) => {
|
|
|
15905
15916
|
}
|
|
15906
15917
|
},
|
|
15907
15918
|
/* @__PURE__ */ React168.createElement(IconCircleDashed2, { size: 20, color: "var(--mantine-color-dark-3)" })
|
|
15908
|
-
), /* @__PURE__ */ React168.createElement(Stack114, { gap: 2, style: { flex: 1 } }, /* @__PURE__ */ React168.createElement(
|
|
15919
|
+
), /* @__PURE__ */ React168.createElement(Stack114, { gap: 2, style: { flex: 1 } }, /* @__PURE__ */ React168.createElement(Text88, { fw: 500, size: "sm", contentEditable: false, lineClamp: 1 }, block.props.title || "Select type of the do..."), /* @__PURE__ */ React168.createElement(Text88, { size: "xs", c: "dimmed", contentEditable: false }, "Selection"))), /* @__PURE__ */ React168.createElement(Stack114, { gap: 2, align: "flex-end" }, /* @__PURE__ */ React168.createElement(Text88, { size: "sm", c: "dimmed", contentEditable: false }, "Pending"), /* @__PURE__ */ React168.createElement(Text88, { size: "xs", c: "dimmed", contentEditable: false }, protocolDids.length, " protocol", protocolDids.length !== 1 ? "s" : "", " configured"))));
|
|
15909
15920
|
};
|
|
15910
15921
|
|
|
15911
15922
|
// src/mantine/blocks/protocolSelector/flow/FlowView.tsx
|
|
15912
15923
|
import React171, { useMemo as useMemo51 } from "react";
|
|
15913
|
-
import { Badge as Badge24, Box as Box34, Group as Group53, Stack as Stack116, Text as
|
|
15924
|
+
import { Badge as Badge24, Box as Box34, Group as Group53, Stack as Stack116, Text as Text90, Tooltip as Tooltip16 } from "@mantine/core";
|
|
15914
15925
|
import { IconCircleDashed as IconCircleDashed3, IconChecks } from "@tabler/icons-react";
|
|
15915
15926
|
|
|
15916
15927
|
// src/mantine/blocks/protocolSelector/flow/ProtocolSelectionPanel.tsx
|
|
15917
15928
|
import React170, { useState as useState60, useEffect as useEffect43, useMemo as useMemo50, useCallback as useCallback41 } from "react";
|
|
15918
|
-
import {
|
|
15929
|
+
import { Stack as Stack115, Text as Text89, Box as Box33, Group as Group52, Loader as Loader23 } from "@mantine/core";
|
|
15919
15930
|
|
|
15920
15931
|
// src/icons/EntityAvatar.tsx
|
|
15921
15932
|
import React169 from "react";
|
|
@@ -16037,42 +16048,28 @@ var ProtocolSelectionPanel = ({ editor, block }) => {
|
|
|
16037
16048
|
[editor, block, closePanel]
|
|
16038
16049
|
);
|
|
16039
16050
|
const selectedDid = block.props.selectedProtocolDid;
|
|
16040
|
-
return /* @__PURE__ */ React170.createElement(
|
|
16041
|
-
|
|
16042
|
-
|
|
16043
|
-
|
|
16044
|
-
|
|
16045
|
-
|
|
16046
|
-
|
|
16047
|
-
|
|
16048
|
-
|
|
16049
|
-
|
|
16050
|
-
|
|
16051
|
-
|
|
16052
|
-
|
|
16053
|
-
|
|
16054
|
-
|
|
16055
|
-
|
|
16056
|
-
Box33,
|
|
16057
|
-
{
|
|
16058
|
-
key: protocol.did,
|
|
16059
|
-
onClick: () => !protocol.loading && handleSelectProtocol(protocol),
|
|
16060
|
-
style: {
|
|
16061
|
-
padding: "12px 16px",
|
|
16062
|
-
borderRadius: 12,
|
|
16063
|
-
border: isSelected ? "2px solid var(--mantine-primary-color-filled)" : "1px solid var(--mantine-color-dark-4)",
|
|
16064
|
-
backgroundColor: isSelected ? "var(--mantine-color-dark-6)" : "var(--mantine-color-dark-7)",
|
|
16065
|
-
cursor: protocol.loading ? "wait" : "pointer",
|
|
16066
|
-
transition: "all 0.15s ease",
|
|
16067
|
-
"&:hover": {
|
|
16068
|
-
backgroundColor: "var(--mantine-color-dark-6)"
|
|
16069
|
-
}
|
|
16051
|
+
return /* @__PURE__ */ React170.createElement(BaseRightPanelLayout, { title: block.props.title || "Select Protocol", onClose: closePanel }, /* @__PURE__ */ React170.createElement(Stack115, { gap: "sm", style: { flex: 1, overflow: "auto" } }, protocols.length === 0 ? /* @__PURE__ */ React170.createElement(Box33, { py: "md" }, /* @__PURE__ */ React170.createElement(Text89, { c: "dimmed", ta: "center" }, "No protocols configured.", /* @__PURE__ */ React170.createElement("br", null), "Add protocol DIDs in template mode.")) : protocols.map((protocol) => {
|
|
16052
|
+
const isSelected = protocol.did === selectedDid;
|
|
16053
|
+
return /* @__PURE__ */ React170.createElement(
|
|
16054
|
+
Box33,
|
|
16055
|
+
{
|
|
16056
|
+
key: protocol.did,
|
|
16057
|
+
onClick: () => !protocol.loading && handleSelectProtocol(protocol),
|
|
16058
|
+
style: {
|
|
16059
|
+
padding: "12px 16px",
|
|
16060
|
+
borderRadius: 12,
|
|
16061
|
+
border: isSelected ? "2px solid var(--mantine-primary-color-filled)" : "1px solid var(--mantine-color-dark-4)",
|
|
16062
|
+
backgroundColor: isSelected ? "var(--mantine-color-dark-6)" : "var(--mantine-color-dark-7)",
|
|
16063
|
+
cursor: protocol.loading ? "wait" : "pointer",
|
|
16064
|
+
transition: "all 0.15s ease",
|
|
16065
|
+
"&:hover": {
|
|
16066
|
+
backgroundColor: "var(--mantine-color-dark-6)"
|
|
16070
16067
|
}
|
|
16071
|
-
}
|
|
16072
|
-
|
|
16073
|
-
)
|
|
16074
|
-
|
|
16075
|
-
);
|
|
16068
|
+
}
|
|
16069
|
+
},
|
|
16070
|
+
/* @__PURE__ */ React170.createElement(Group52, { wrap: "nowrap", justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React170.createElement(Group52, { wrap: "nowrap", align: "center", gap: "md", style: { flex: 1 } }, protocol.loading ? /* @__PURE__ */ React170.createElement(Loader23, { size: "xs", color: "white" }) : /* @__PURE__ */ React170.createElement(EntityAvatar_default, { size: 24 }), /* @__PURE__ */ React170.createElement(Stack115, { gap: 2, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React170.createElement(Text89, { fw: 500, size: "sm", lineClamp: 1 }, protocol.loading ? "Loading..." : protocol.type), /* @__PURE__ */ React170.createElement(Text89, { size: "xs", c: "dimmed", lineClamp: 2 }, protocol.loading ? "Fetching protocol info..." : protocol.description || protocol.did))))
|
|
16071
|
+
);
|
|
16072
|
+
})));
|
|
16076
16073
|
};
|
|
16077
16074
|
|
|
16078
16075
|
// src/mantine/blocks/protocolSelector/flow/FlowView.tsx
|
|
@@ -16098,7 +16095,7 @@ var ProtocolSelectorFlowView = ({ editor, block, isDisabled }) => {
|
|
|
16098
16095
|
}
|
|
16099
16096
|
},
|
|
16100
16097
|
/* @__PURE__ */ React171.createElement(IconCircleDashed3, { size: 26, color: "white" })
|
|
16101
|
-
), /* @__PURE__ */ React171.createElement(Stack116, { gap: 2, style: { flex: 1 } }, /* @__PURE__ */ React171.createElement(
|
|
16098
|
+
), /* @__PURE__ */ React171.createElement(Stack116, { gap: 2, style: { flex: 1 } }, /* @__PURE__ */ React171.createElement(Text90, { fw: 500, size: "sm", lineClamp: 1, style: { opacity: disabled ? 0.5 : 1 } }, block.props.title || "Select Protocol"), isCompleted && block.props.selectedProtocolType ? /* @__PURE__ */ React171.createElement(Badge24, { size: "sm", styles: { root: { backgroundColor: "var(--mantine-primary-color-light)", color: "var(--mantine-primary-color-filled)" } } }, block.props.selectedProtocolType) : /* @__PURE__ */ React171.createElement(Text90, { size: "xs", c: "dimmed", style: { opacity: disabled ? 0.5 : 1 } }, "Selection"))), /* @__PURE__ */ React171.createElement(Stack116, { gap: 2, align: "flex-end" }, isCompleted ? /* @__PURE__ */ React171.createElement(React171.Fragment, null, /* @__PURE__ */ React171.createElement(Group53, { gap: 4 }, /* @__PURE__ */ React171.createElement(IconChecks, { size: 16, color: "var(--mantine-color-green-4)" }), /* @__PURE__ */ React171.createElement(Text90, { size: "sm", c: "green.4", fw: 500 }, "Completed")), /* @__PURE__ */ React171.createElement(Text90, { size: "xs", c: "dimmed", lineClamp: 1 }, block.props.selectedProtocolName || block.props.selectedProtocolDid)) : /* @__PURE__ */ React171.createElement(React171.Fragment, null, /* @__PURE__ */ React171.createElement(Text90, { size: "sm" }, "Pending"), /* @__PURE__ */ React171.createElement(Text90, { size: "xs", c: "dimmed" }, "Complete now")))));
|
|
16102
16099
|
if (disabled && isDisabled?.message) {
|
|
16103
16100
|
return /* @__PURE__ */ React171.createElement(Tooltip16, { label: isDisabled.message, position: "top", withArrow: true }, /* @__PURE__ */ React171.createElement(Box34, { style: { cursor: "not-allowed" } }, containerContent));
|
|
16104
16101
|
}
|
|
@@ -16187,15 +16184,15 @@ import React179 from "react";
|
|
|
16187
16184
|
|
|
16188
16185
|
// src/mantine/blocks/form/template/TemplateView.tsx
|
|
16189
16186
|
import React176, { useMemo as useMemo52 } from "react";
|
|
16190
|
-
import { Badge as Badge25, Group as Group54, Stack as Stack117, Text as
|
|
16187
|
+
import { Badge as Badge25, Group as Group54, Stack as Stack117, Text as Text92 } from "@mantine/core";
|
|
16191
16188
|
|
|
16192
16189
|
// src/mantine/blocks/form/template/TemplateConfig.tsx
|
|
16193
16190
|
import React175, { useCallback as useCallback42 } from "react";
|
|
16194
|
-
import { Paper as
|
|
16191
|
+
import { Paper as Paper14, CloseButton as CloseButton7, Title as Title10 } from "@mantine/core";
|
|
16195
16192
|
|
|
16196
16193
|
// src/mantine/blocks/form/template/GeneralTab.tsx
|
|
16197
16194
|
import React174, { useEffect as useEffect44, useState as useState61 } from "react";
|
|
16198
|
-
import { Text as
|
|
16195
|
+
import { Text as Text91 } from "@mantine/core";
|
|
16199
16196
|
var GeneralTab11 = ({ title, description, icon, surveySchema, onTitleChange, onDescriptionChange, onIconChange, onSurveySchemaChange }) => {
|
|
16200
16197
|
const [localTitle, setLocalTitle] = useState61(title || "");
|
|
16201
16198
|
const [localDescription, setLocalDescription] = useState61(description || "");
|
|
@@ -16269,7 +16266,7 @@ var GeneralTab11 = ({ title, description, icon, surveySchema, onTitleChange, onD
|
|
|
16269
16266
|
onChange: (event) => handleSchemaChange(event.currentTarget.value),
|
|
16270
16267
|
error: schemaError
|
|
16271
16268
|
}
|
|
16272
|
-
), localSchema && !schemaError && /* @__PURE__ */ React174.createElement(
|
|
16269
|
+
), localSchema && !schemaError && /* @__PURE__ */ React174.createElement(Text91, { size: "xs", c: "green" }, "\u2713 Valid JSON schema"));
|
|
16273
16270
|
};
|
|
16274
16271
|
|
|
16275
16272
|
// src/mantine/blocks/form/template/TemplateConfig.tsx
|
|
@@ -16287,7 +16284,7 @@ var TemplateConfig11 = ({ editor, block }) => {
|
|
|
16287
16284
|
[editor, block]
|
|
16288
16285
|
);
|
|
16289
16286
|
return /* @__PURE__ */ React175.createElement(
|
|
16290
|
-
|
|
16287
|
+
Paper14,
|
|
16291
16288
|
{
|
|
16292
16289
|
p: "md",
|
|
16293
16290
|
shadow: "sm",
|
|
@@ -16307,8 +16304,8 @@ var TemplateConfig11 = ({ editor, block }) => {
|
|
|
16307
16304
|
marginBottom: "1rem"
|
|
16308
16305
|
}
|
|
16309
16306
|
},
|
|
16310
|
-
/* @__PURE__ */ React175.createElement(
|
|
16311
|
-
/* @__PURE__ */ React175.createElement(
|
|
16307
|
+
/* @__PURE__ */ React175.createElement(Title10, { order: 3 }, "Form Settings"),
|
|
16308
|
+
/* @__PURE__ */ React175.createElement(CloseButton7, { onClick: closePanel })
|
|
16312
16309
|
),
|
|
16313
16310
|
/* @__PURE__ */ React175.createElement(
|
|
16314
16311
|
ReusablePanel,
|
|
@@ -16345,17 +16342,17 @@ var FormTemplateView = ({ editor, block }) => {
|
|
|
16345
16342
|
const panelContent = useMemo52(() => /* @__PURE__ */ React176.createElement(TemplateConfig11, { editor, block }), [editor, block]);
|
|
16346
16343
|
const { open } = usePanel(panelId, panelContent);
|
|
16347
16344
|
const hasSchema = Boolean(block.props.surveySchema);
|
|
16348
|
-
return /* @__PURE__ */ React176.createElement(BaseContainer, { onClick: open }, /* @__PURE__ */ React176.createElement(Badge25, { size: "xs", variant: "light", color: "gray", style: { position: "absolute", top: 8, right: 8 } }, "Template"), /* @__PURE__ */ React176.createElement(Group54, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React176.createElement(Group54, { wrap: "nowrap", align: "center" }, getIcon("checklist", block.props.icon), /* @__PURE__ */ React176.createElement(Stack117, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React176.createElement(
|
|
16345
|
+
return /* @__PURE__ */ React176.createElement(BaseContainer, { onClick: open }, /* @__PURE__ */ React176.createElement(Badge25, { size: "xs", variant: "light", color: "gray", style: { position: "absolute", top: 8, right: 8 } }, "Template"), /* @__PURE__ */ React176.createElement(Group54, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React176.createElement(Group54, { wrap: "nowrap", align: "center" }, getIcon("checklist", block.props.icon), /* @__PURE__ */ React176.createElement(Stack117, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React176.createElement(Text92, { fw: 500, size: "sm" }, block.props.title || "Form"), /* @__PURE__ */ React176.createElement(Text92, { size: "xs", c: "dimmed" }, hasSchema ? "Form configured" : "Click to configure form schema")))));
|
|
16349
16346
|
};
|
|
16350
16347
|
|
|
16351
16348
|
// src/mantine/blocks/form/flow/FlowView.tsx
|
|
16352
16349
|
import React178, { useMemo as useMemo54, useState as useState62, useCallback as useCallback44 } from "react";
|
|
16353
|
-
import { ActionIcon as
|
|
16350
|
+
import { ActionIcon as ActionIcon27, Badge as Badge26, Group as Group55, Stack as Stack118, Text as Text94, Tooltip as Tooltip17 } from "@mantine/core";
|
|
16354
16351
|
import { IconChevronRight as IconChevronRight7 } from "@tabler/icons-react";
|
|
16355
16352
|
|
|
16356
16353
|
// src/mantine/blocks/form/flow/FormPanel.tsx
|
|
16357
16354
|
import React177, { useCallback as useCallback43, useEffect as useEffect45, useMemo as useMemo53, useRef as useRef10 } from "react";
|
|
16358
|
-
import { Alert as Alert23,
|
|
16355
|
+
import { Alert as Alert23, Text as Text93 } from "@mantine/core";
|
|
16359
16356
|
import { useDebouncedCallback as useDebouncedCallback2 } from "@mantine/hooks";
|
|
16360
16357
|
import { IconAlertCircle as IconAlertCircle10 } from "@tabler/icons-react";
|
|
16361
16358
|
import { Survey as Survey6, SurveyModel as SurveyModel6 } from "@ixo/surveys";
|
|
@@ -16475,9 +16472,17 @@ var FormPanel = ({ editor, block, onComplete }) => {
|
|
|
16475
16472
|
closePanel();
|
|
16476
16473
|
}, [closePanel]);
|
|
16477
16474
|
if (!surveySchema) {
|
|
16478
|
-
return /* @__PURE__ */ React177.createElement(
|
|
16475
|
+
return /* @__PURE__ */ React177.createElement(BaseRightPanelLayout, { title: block.props.title || "Form", onClose: handleClose }, /* @__PURE__ */ React177.createElement(Alert23, { icon: /* @__PURE__ */ React177.createElement(IconAlertCircle10, { size: 16 }), title: "Form Not Configured", color: "yellow" }, /* @__PURE__ */ React177.createElement(Text93, { size: "sm" }, "No survey schema has been configured for this form. Please configure it in template mode.")));
|
|
16479
16476
|
}
|
|
16480
|
-
return /* @__PURE__ */ React177.createElement(
|
|
16477
|
+
return /* @__PURE__ */ React177.createElement(
|
|
16478
|
+
BaseRightPanelLayout,
|
|
16479
|
+
{
|
|
16480
|
+
title: block.props.title || "Form",
|
|
16481
|
+
captionContent: block.props.description && /* @__PURE__ */ React177.createElement(Text93, { size: "sm", px: "xl", mb: "md", c: "dimmed" }, block.props.description),
|
|
16482
|
+
onClose: handleClose
|
|
16483
|
+
},
|
|
16484
|
+
surveyModel && /* @__PURE__ */ React177.createElement(Survey6, { model: surveyModel })
|
|
16485
|
+
);
|
|
16481
16486
|
};
|
|
16482
16487
|
|
|
16483
16488
|
// src/mantine/blocks/form/flow/FlowView.tsx
|
|
@@ -16521,7 +16526,7 @@ var FormFlowView = ({ editor, block }) => {
|
|
|
16521
16526
|
};
|
|
16522
16527
|
const badgeProps = getBadgeProps();
|
|
16523
16528
|
const hasSchema = Boolean(block.props.surveySchema);
|
|
16524
|
-
return /* @__PURE__ */ React178.createElement(BaseContainer, { onClick: handleOpen }, /* @__PURE__ */ React178.createElement(
|
|
16529
|
+
return /* @__PURE__ */ React178.createElement(BaseContainer, { onClick: handleOpen }, /* @__PURE__ */ React178.createElement(Group55, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React178.createElement(Group55, { wrap: "nowrap", align: "center", style: { flex: 1 } }, getIcon("checklist", block.props.icon), /* @__PURE__ */ React178.createElement(Stack118, { gap: 4, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React178.createElement(Group55, { gap: "xs", align: "center" }, /* @__PURE__ */ React178.createElement(Text94, { fw: 600, size: "sm" }, block.props.title || "Form"), /* @__PURE__ */ React178.createElement(
|
|
16525
16530
|
Badge26,
|
|
16526
16531
|
{
|
|
16527
16532
|
size: "xs",
|
|
@@ -16530,10 +16535,10 @@ var FormFlowView = ({ editor, block }) => {
|
|
|
16530
16535
|
styles: { root: { backgroundColor: `var(--mantine-color-${badgeProps.color}-6)`, color: "white" } }
|
|
16531
16536
|
},
|
|
16532
16537
|
badgeProps.text
|
|
16533
|
-
)), /* @__PURE__ */ React178.createElement(
|
|
16538
|
+
)), /* @__PURE__ */ React178.createElement(Text94, { size: "xs", c: "dimmed", lineClamp: 2 }, isCompleted ? `Completed on ${new Date(block.props.completedAt).toLocaleDateString()}` : (
|
|
16534
16539
|
// : block.props.description || (hasSchema ? 'Click to fill out the form' : 'Form not configured')}
|
|
16535
16540
|
hasSchema ? "Click to fill out the form" : "Form not configured"
|
|
16536
|
-
)))), /* @__PURE__ */ React178.createElement(Tooltip17, { label: isCompleted ? "View form" : "Fill form", withArrow: true }, /* @__PURE__ */ React178.createElement(
|
|
16541
|
+
)))), /* @__PURE__ */ React178.createElement(Tooltip17, { label: isCompleted ? "View form" : "Fill form", withArrow: true }, /* @__PURE__ */ React178.createElement(ActionIcon27, { variant: "subtle", color: "blue" }, /* @__PURE__ */ React178.createElement(IconChevronRight7, { size: 18 })))));
|
|
16537
16542
|
};
|
|
16538
16543
|
|
|
16539
16544
|
// src/mantine/blocks/form/FormBlock.tsx
|
|
@@ -16577,11 +16582,10 @@ import React186 from "react";
|
|
|
16577
16582
|
|
|
16578
16583
|
// src/mantine/blocks/domainCreatorSign/template/TemplateView.tsx
|
|
16579
16584
|
import React183, { useMemo as useMemo55 } from "react";
|
|
16580
|
-
import { Badge as Badge27, Group as
|
|
16585
|
+
import { Badge as Badge27, Group as Group56, Stack as Stack119, Text as Text95 } from "@mantine/core";
|
|
16581
16586
|
|
|
16582
16587
|
// src/mantine/blocks/domainCreatorSign/template/TemplateConfig.tsx
|
|
16583
16588
|
import React182, { useCallback as useCallback45 } from "react";
|
|
16584
|
-
import { Paper as Paper18, CloseButton as CloseButton12, Title as Title15 } from "@mantine/core";
|
|
16585
16589
|
|
|
16586
16590
|
// src/mantine/blocks/domainCreatorSign/template/GeneralTab.tsx
|
|
16587
16591
|
import React181, { useEffect as useEffect46, useState as useState63 } from "react";
|
|
@@ -16647,54 +16651,29 @@ var TemplateConfig12 = ({ editor, block }) => {
|
|
|
16647
16651
|
},
|
|
16648
16652
|
[editor, block]
|
|
16649
16653
|
);
|
|
16650
|
-
return /* @__PURE__ */ React182.createElement(
|
|
16651
|
-
|
|
16654
|
+
return /* @__PURE__ */ React182.createElement(BaseRightPanelLayout, { title: "Sign to Create Settings", onClose: closePanel }, /* @__PURE__ */ React182.createElement(
|
|
16655
|
+
ReusablePanel,
|
|
16652
16656
|
{
|
|
16653
|
-
|
|
16654
|
-
|
|
16655
|
-
|
|
16656
|
-
|
|
16657
|
-
|
|
16658
|
-
|
|
16659
|
-
|
|
16660
|
-
|
|
16661
|
-
|
|
16662
|
-
|
|
16663
|
-
|
|
16664
|
-
|
|
16665
|
-
|
|
16666
|
-
|
|
16667
|
-
|
|
16668
|
-
marginBottom: "1rem"
|
|
16657
|
+
extraTabs: [
|
|
16658
|
+
{
|
|
16659
|
+
label: "General",
|
|
16660
|
+
value: "general",
|
|
16661
|
+
content: /* @__PURE__ */ React182.createElement(
|
|
16662
|
+
GeneralTab12,
|
|
16663
|
+
{
|
|
16664
|
+
title: block.props.title || "",
|
|
16665
|
+
description: block.props.description || "",
|
|
16666
|
+
icon: block.props.icon || "file-text",
|
|
16667
|
+
onTitleChange: (value) => updateProp("title", value),
|
|
16668
|
+
onDescriptionChange: (value) => updateProp("description", value),
|
|
16669
|
+
onIconChange: (value) => updateProp("icon", value)
|
|
16670
|
+
}
|
|
16671
|
+
)
|
|
16669
16672
|
}
|
|
16670
|
-
|
|
16671
|
-
|
|
16672
|
-
|
|
16673
|
-
|
|
16674
|
-
/* @__PURE__ */ React182.createElement(
|
|
16675
|
-
ReusablePanel,
|
|
16676
|
-
{
|
|
16677
|
-
extraTabs: [
|
|
16678
|
-
{
|
|
16679
|
-
label: "General",
|
|
16680
|
-
value: "general",
|
|
16681
|
-
content: /* @__PURE__ */ React182.createElement(
|
|
16682
|
-
GeneralTab12,
|
|
16683
|
-
{
|
|
16684
|
-
title: block.props.title || "",
|
|
16685
|
-
description: block.props.description || "",
|
|
16686
|
-
icon: block.props.icon || "file-text",
|
|
16687
|
-
onTitleChange: (value) => updateProp("title", value),
|
|
16688
|
-
onDescriptionChange: (value) => updateProp("description", value),
|
|
16689
|
-
onIconChange: (value) => updateProp("icon", value)
|
|
16690
|
-
}
|
|
16691
|
-
)
|
|
16692
|
-
}
|
|
16693
|
-
],
|
|
16694
|
-
context: { editor, block }
|
|
16695
|
-
}
|
|
16696
|
-
)
|
|
16697
|
-
);
|
|
16673
|
+
],
|
|
16674
|
+
context: { editor, block }
|
|
16675
|
+
}
|
|
16676
|
+
));
|
|
16698
16677
|
};
|
|
16699
16678
|
|
|
16700
16679
|
// src/mantine/blocks/domainCreatorSign/template/TemplateView.tsx
|
|
@@ -16703,16 +16682,16 @@ var DomainCreatorSignTemplateView = ({ editor, block }) => {
|
|
|
16703
16682
|
const panelId = `${DOMAIN_CREATOR_SIGN_TEMPLATE_PANEL_ID}-${block.id}`;
|
|
16704
16683
|
const panelContent = useMemo55(() => /* @__PURE__ */ React183.createElement(TemplateConfig12, { editor, block }), [editor, block]);
|
|
16705
16684
|
const { open } = usePanel(panelId, panelContent);
|
|
16706
|
-
return /* @__PURE__ */ React183.createElement(BaseContainer, { onClick: open }, /* @__PURE__ */ React183.createElement(Badge27, { size: "xs", variant: "light", color: "gray", style: { position: "absolute", top: 8, right: 8 } }, "Template"), /* @__PURE__ */ React183.createElement(
|
|
16685
|
+
return /* @__PURE__ */ React183.createElement(BaseContainer, { onClick: open }, /* @__PURE__ */ React183.createElement(Badge27, { size: "xs", variant: "light", color: "gray", style: { position: "absolute", top: 8, right: 8 } }, "Template"), /* @__PURE__ */ React183.createElement(Group56, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React183.createElement(Group56, { wrap: "nowrap", align: "center" }, getIcon("feather", block.props.icon), /* @__PURE__ */ React183.createElement(Stack119, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React183.createElement(Text95, { fw: 500, size: "sm" }, block.props.title || "Sign to Create"), /* @__PURE__ */ React183.createElement(Text95, { size: "xs", c: "dimmed" }, "Sign")))));
|
|
16707
16686
|
};
|
|
16708
16687
|
|
|
16709
16688
|
// src/mantine/blocks/domainCreatorSign/flow/FlowView.tsx
|
|
16710
16689
|
import React185, { useCallback as useCallback47, useMemo as useMemo56, useEffect as useEffect47 } from "react";
|
|
16711
|
-
import { ActionIcon as
|
|
16690
|
+
import { ActionIcon as ActionIcon28, Badge as Badge28, Group as Group58, Stack as Stack121, Text as Text97, Tooltip as Tooltip18 } from "@mantine/core";
|
|
16712
16691
|
import { IconChevronRight as IconChevronRight8 } from "@tabler/icons-react";
|
|
16713
16692
|
|
|
16714
16693
|
// src/mantine/blocks/domainCreatorSign/flow/SignPanel.tsx
|
|
16715
|
-
import { Alert as Alert24, Button as Button32, CloseButton as
|
|
16694
|
+
import { Alert as Alert24, Button as Button32, CloseButton as CloseButton8, Group as Group57, Loader as Loader24, Stack as Stack120, Text as Text96, Title as Title11 } from "@mantine/core";
|
|
16716
16695
|
import { IconAlertCircle as IconAlertCircle11, IconCheck as IconCheck5, IconSignature } from "@tabler/icons-react";
|
|
16717
16696
|
import React184, { useCallback as useCallback46, useState as useState64 } from "react";
|
|
16718
16697
|
var SignPanel = ({ editor, block, onComplete, onError }) => {
|
|
@@ -16858,16 +16837,16 @@ var SignPanel = ({ editor, block, onComplete, onError }) => {
|
|
|
16858
16837
|
uploading: "Uploading credential to storage...",
|
|
16859
16838
|
creating: "Creating domain entity..."
|
|
16860
16839
|
};
|
|
16861
|
-
return /* @__PURE__ */ React184.createElement(
|
|
16840
|
+
return /* @__PURE__ */ React184.createElement(Stack120, { gap: "md", p: "md", align: "center", justify: "center", style: { minHeight: 300 } }, /* @__PURE__ */ React184.createElement(Loader24, { size: "lg" }), /* @__PURE__ */ React184.createElement(Text96, { size: "sm", c: "dimmed" }, stepMessages[flowStep]));
|
|
16862
16841
|
}
|
|
16863
16842
|
if (flowStep === "success") {
|
|
16864
|
-
return /* @__PURE__ */ React184.createElement(
|
|
16843
|
+
return /* @__PURE__ */ React184.createElement(Stack120, { gap: "md", p: "md" }, /* @__PURE__ */ React184.createElement(Group57, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React184.createElement(Title11, { order: 5 }, block.props.title || "Sign to Create"), /* @__PURE__ */ React184.createElement(CloseButton8, { onClick: handleClose, title: "Close panel" })), /* @__PURE__ */ React184.createElement(Alert24, { icon: /* @__PURE__ */ React184.createElement(IconCheck5, { size: 16 }), title: "Domain Created Successfully", color: "green" }, /* @__PURE__ */ React184.createElement(Stack120, { gap: "xs" }, /* @__PURE__ */ React184.createElement(Text96, { size: "sm" }, "Your domain has been created and the Domain Card credential has been signed and stored."), createdEntityDid && /* @__PURE__ */ React184.createElement(Text96, { size: "xs", c: "dimmed" }, "Entity DID: ", createdEntityDid))), /* @__PURE__ */ React184.createElement(Button32, { onClick: handleVisitEntity }, "Visit Entity"));
|
|
16865
16844
|
}
|
|
16866
16845
|
if (flowStep === "error") {
|
|
16867
|
-
return /* @__PURE__ */ React184.createElement(
|
|
16846
|
+
return /* @__PURE__ */ React184.createElement(Stack120, { gap: "md", p: "md" }, /* @__PURE__ */ React184.createElement(Group57, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React184.createElement(Title11, { order: 5 }, block.props.title || "Sign to Create"), /* @__PURE__ */ React184.createElement(CloseButton8, { onClick: handleClose, title: "Close panel" })), /* @__PURE__ */ React184.createElement(Alert24, { icon: /* @__PURE__ */ React184.createElement(IconAlertCircle11, { size: 16 }), title: "Domain Creation Failed", color: "red" }, /* @__PURE__ */ React184.createElement(Text96, { size: "sm" }, error || "An unexpected error occurred")), /* @__PURE__ */ React184.createElement(Group57, null, /* @__PURE__ */ React184.createElement(Button32, { variant: "outline", onClick: handleRetry }, "Try Again"), /* @__PURE__ */ React184.createElement(Button32, { variant: "subtle", onClick: handleClose }, "Close")));
|
|
16868
16847
|
}
|
|
16869
16848
|
const domainCardData = getDomainCardData();
|
|
16870
|
-
return /* @__PURE__ */ React184.createElement(
|
|
16849
|
+
return /* @__PURE__ */ React184.createElement(Stack120, { gap: "md", p: "md" }, /* @__PURE__ */ React184.createElement(Group57, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React184.createElement(Stack120, { gap: 4 }, /* @__PURE__ */ React184.createElement(Title11, { order: 5 }, block.props.title || "Sign to Create"), /* @__PURE__ */ React184.createElement(Text96, { size: "sm", c: "dimmed" }, "Review and sign to create your domain.")), /* @__PURE__ */ React184.createElement(CloseButton8, { onClick: handleClose, title: "Close panel" })), /* @__PURE__ */ React184.createElement(Stack120, { gap: "xs", p: "md", style: { backgroundColor: "var(--mantine-color-dark-6)", borderRadius: 8 } }, /* @__PURE__ */ React184.createElement(Text96, { fw: 600, size: "sm" }, "Domain Card Summary"), /* @__PURE__ */ React184.createElement(Group57, { gap: "xs" }, /* @__PURE__ */ React184.createElement(Text96, { size: "xs", c: "dimmed", style: { width: 80 } }, "Name:"), /* @__PURE__ */ React184.createElement(Text96, { size: "xs" }, domainCardData?.credentialSubject?.name || "Not set")), /* @__PURE__ */ React184.createElement(Group57, { gap: "xs" }, /* @__PURE__ */ React184.createElement(Text96, { size: "xs", c: "dimmed", style: { width: 80 } }, "Type:"), /* @__PURE__ */ React184.createElement(Text96, { size: "xs" }, block.props.entityType || (domainCardData?.credentialSubject?.type?.[0]?.replace(/^schema:/i, "").toLowerCase() ?? "dao"))), domainCardData?.credentialSubject?.description && /* @__PURE__ */ React184.createElement(Group57, { gap: "xs", align: "flex-start" }, /* @__PURE__ */ React184.createElement(Text96, { size: "xs", c: "dimmed", style: { width: 80 } }, "Description:"), /* @__PURE__ */ React184.createElement(Text96, { size: "xs", lineClamp: 2, style: { flex: 1 } }, domainCardData.credentialSubject.description))), /* @__PURE__ */ React184.createElement(Button32, { leftSection: /* @__PURE__ */ React184.createElement(IconSignature, { size: 18 }), onClick: handleSign, fullWidth: true }, "Sign & Create Domain"));
|
|
16871
16850
|
};
|
|
16872
16851
|
|
|
16873
16852
|
// src/mantine/blocks/domainCreatorSign/flow/FlowView.tsx
|
|
@@ -16958,7 +16937,7 @@ var DomainCreatorSignFlowView = ({ editor, block }) => {
|
|
|
16958
16937
|
return "Waiting for domain card data";
|
|
16959
16938
|
}
|
|
16960
16939
|
};
|
|
16961
|
-
return /* @__PURE__ */ React185.createElement(BaseContainer, { onClick: isClickable ? handleOpen : void 0, style: { opacity: isClickable ? 1 : 0.7, cursor: isClickable ? "pointer" : "not-allowed" } }, /* @__PURE__ */ React185.createElement(
|
|
16940
|
+
return /* @__PURE__ */ React185.createElement(BaseContainer, { onClick: isClickable ? handleOpen : void 0, style: { opacity: isClickable ? 1 : 0.7, cursor: isClickable ? "pointer" : "not-allowed" } }, /* @__PURE__ */ React185.createElement(Group58, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React185.createElement(Group58, { wrap: "nowrap", align: "center", style: { flex: 1 } }, getIcon("feather", block.props.icon), /* @__PURE__ */ React185.createElement(Stack121, { gap: 4, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React185.createElement(Group58, { gap: "xs", align: "center" }, /* @__PURE__ */ React185.createElement(Text97, { fw: 600, size: "sm" }, block.props.title || "Sign to Create"), /* @__PURE__ */ React185.createElement(Badge28, { size: "xs", variant: "filled", color: badgeProps.color, styles: { root: { backgroundColor: `var(--mantine-color-${badgeProps.color}-6)`, color: "white" } } }, badgeProps.text)), /* @__PURE__ */ React185.createElement(Text97, { size: "xs", c: "dimmed", lineClamp: 2 }, getDescriptionText()))), isClickable && /* @__PURE__ */ React185.createElement(Tooltip18, { label: status === "completed" ? "View details" : "Sign & Create", withArrow: true }, /* @__PURE__ */ React185.createElement(ActionIcon28, { variant: "subtle", color: "blue" }, /* @__PURE__ */ React185.createElement(IconChevronRight8, { size: 18 })))));
|
|
16962
16941
|
};
|
|
16963
16942
|
|
|
16964
16943
|
// src/mantine/blocks/domainCreatorSign/DomainCreatorSignBlock.tsx
|
|
@@ -17010,11 +16989,11 @@ import React193 from "react";
|
|
|
17010
16989
|
|
|
17011
16990
|
// src/mantine/blocks/domainCardViewer/template/TemplateView.tsx
|
|
17012
16991
|
import React190, { useMemo as useMemo57 } from "react";
|
|
17013
|
-
import { Badge as Badge29, Group as
|
|
16992
|
+
import { Badge as Badge29, Group as Group59, Stack as Stack122, Text as Text98 } from "@mantine/core";
|
|
17014
16993
|
|
|
17015
16994
|
// src/mantine/blocks/domainCardViewer/template/TemplateConfig.tsx
|
|
17016
16995
|
import React189, { useCallback as useCallback48 } from "react";
|
|
17017
|
-
import { Paper as
|
|
16996
|
+
import { Paper as Paper15, CloseButton as CloseButton9, Title as Title12 } from "@mantine/core";
|
|
17018
16997
|
|
|
17019
16998
|
// src/mantine/blocks/domainCardViewer/template/GeneralTab.tsx
|
|
17020
16999
|
import React188, { useEffect as useEffect48, useState as useState65 } from "react";
|
|
@@ -17081,7 +17060,7 @@ var TemplateConfig13 = ({ editor, block }) => {
|
|
|
17081
17060
|
[editor, block]
|
|
17082
17061
|
);
|
|
17083
17062
|
return /* @__PURE__ */ React189.createElement(
|
|
17084
|
-
|
|
17063
|
+
Paper15,
|
|
17085
17064
|
{
|
|
17086
17065
|
p: "md",
|
|
17087
17066
|
shadow: "sm",
|
|
@@ -17101,8 +17080,8 @@ var TemplateConfig13 = ({ editor, block }) => {
|
|
|
17101
17080
|
marginBottom: "1rem"
|
|
17102
17081
|
}
|
|
17103
17082
|
},
|
|
17104
|
-
/* @__PURE__ */ React189.createElement(
|
|
17105
|
-
/* @__PURE__ */ React189.createElement(
|
|
17083
|
+
/* @__PURE__ */ React189.createElement(Title12, { order: 5 }, "Domain Card Settings"),
|
|
17084
|
+
/* @__PURE__ */ React189.createElement(CloseButton9, { onClick: closePanel })
|
|
17106
17085
|
),
|
|
17107
17086
|
/* @__PURE__ */ React189.createElement(
|
|
17108
17087
|
ReusablePanel,
|
|
@@ -17136,17 +17115,17 @@ var DomainCardViewerTemplateView = ({ editor, block }) => {
|
|
|
17136
17115
|
const panelId = `${DOMAIN_CARD_VIEWER_TEMPLATE_PANEL_ID}-${block.id}`;
|
|
17137
17116
|
const panelContent = useMemo57(() => /* @__PURE__ */ React190.createElement(TemplateConfig13, { editor, block }), [editor, block]);
|
|
17138
17117
|
const { open } = usePanel(panelId, panelContent);
|
|
17139
|
-
return /* @__PURE__ */ React190.createElement(BaseContainer, { onClick: open }, /* @__PURE__ */ React190.createElement(Badge29, { size: "xs", variant: "light", color: "gray", style: { position: "absolute", top: 8, right: 8 } }, "Template"), /* @__PURE__ */ React190.createElement(
|
|
17118
|
+
return /* @__PURE__ */ React190.createElement(BaseContainer, { onClick: open }, /* @__PURE__ */ React190.createElement(Badge29, { size: "xs", variant: "light", color: "gray", style: { position: "absolute", top: 8, right: 8 } }, "Template"), /* @__PURE__ */ React190.createElement(Group59, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React190.createElement(Group59, { wrap: "nowrap", align: "center" }, getIcon("dots-circle", block.props.icon), /* @__PURE__ */ React190.createElement(Stack122, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React190.createElement(Text98, { fw: 500, size: "sm" }, block.props.title || "Domain Card"), /* @__PURE__ */ React190.createElement(Text98, { size: "xs", c: "dimmed" }, block.props.description || "Preview domain card generated by AI")))));
|
|
17140
17119
|
};
|
|
17141
17120
|
|
|
17142
17121
|
// src/mantine/blocks/domainCardViewer/flow/FlowView.tsx
|
|
17143
17122
|
import React192, { useMemo as useMemo59, useCallback as useCallback49, useEffect as useEffect49 } from "react";
|
|
17144
|
-
import { ActionIcon as
|
|
17123
|
+
import { ActionIcon as ActionIcon29, Badge as Badge30, Button as Button34, Group as Group60, Stack as Stack124, Text as Text100, Tooltip as Tooltip19 } from "@mantine/core";
|
|
17145
17124
|
import { IconChevronRight as IconChevronRight9, IconLoader, IconTestPipe, IconTrash as IconTrash5 } from "@tabler/icons-react";
|
|
17146
17125
|
|
|
17147
17126
|
// src/mantine/blocks/domainCardViewer/flow/ViewerPanel.tsx
|
|
17148
17127
|
import React191, { useMemo as useMemo58 } from "react";
|
|
17149
|
-
import { Paper as
|
|
17128
|
+
import { Paper as Paper16, CloseButton as CloseButton10, Title as Title13, Stack as Stack123, Text as Text99, Loader as Loader25, Alert as Alert25, Button as Button33, Box as Box35, ScrollArea as ScrollArea6, Code as Code6 } from "@mantine/core";
|
|
17150
17129
|
import { IconAlertCircle as IconAlertCircle12, IconCheck as IconCheck6, IconSparkles as IconSparkles3 } from "@tabler/icons-react";
|
|
17151
17130
|
function parsePreviewData(jsonString) {
|
|
17152
17131
|
if (!jsonString || jsonString === "{}") return null;
|
|
@@ -17157,7 +17136,7 @@ function parsePreviewData(jsonString) {
|
|
|
17157
17136
|
}
|
|
17158
17137
|
}
|
|
17159
17138
|
var JsonViewer = ({ data }) => {
|
|
17160
|
-
return /* @__PURE__ */ React191.createElement(ScrollArea6, { h: "100%", offsetScrollbars: true }, /* @__PURE__ */ React191.createElement(
|
|
17139
|
+
return /* @__PURE__ */ React191.createElement(ScrollArea6, { h: "100%", offsetScrollbars: true }, /* @__PURE__ */ React191.createElement(Stack123, { gap: "md" }, data.name && /* @__PURE__ */ React191.createElement(Box35, null, /* @__PURE__ */ React191.createElement(Text99, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Name"), /* @__PURE__ */ React191.createElement(Text99, { size: "lg", fw: 600 }, data.name)), data.summary && /* @__PURE__ */ React191.createElement(Box35, null, /* @__PURE__ */ React191.createElement(Text99, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Summary"), /* @__PURE__ */ React191.createElement(Text99, { size: "sm" }, data.summary)), data.description && /* @__PURE__ */ React191.createElement(Box35, null, /* @__PURE__ */ React191.createElement(Text99, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Description"), /* @__PURE__ */ React191.createElement(Text99, { size: "sm" }, data.description)), data.entity_type && data.entity_type.length > 0 && /* @__PURE__ */ React191.createElement(Box35, null, /* @__PURE__ */ React191.createElement(Text99, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Type"), /* @__PURE__ */ React191.createElement(Text99, { size: "sm" }, data.entity_type.join(", "))), data.keywords && data.keywords.length > 0 && /* @__PURE__ */ React191.createElement(Box35, null, /* @__PURE__ */ React191.createElement(Text99, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Keywords"), /* @__PURE__ */ React191.createElement(Text99, { size: "sm" }, data.keywords.join(", "))), data.faq && data.faq.length > 0 && /* @__PURE__ */ React191.createElement(Box35, null, /* @__PURE__ */ React191.createElement(Text99, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600, mb: "xs" }, "FAQ"), /* @__PURE__ */ React191.createElement(Stack123, { gap: "sm" }, data.faq.map((item, index) => /* @__PURE__ */ React191.createElement(Box35, { key: index, p: "sm", style: { borderRadius: 8, backgroundColor: "var(--mantine-color-dark-6)" } }, /* @__PURE__ */ React191.createElement(Text99, { size: "sm", fw: 500, mb: 4 }, item.question), /* @__PURE__ */ React191.createElement(Text99, { size: "xs", c: "dimmed" }, item.answer))))), /* @__PURE__ */ React191.createElement(Box35, null, /* @__PURE__ */ React191.createElement(Text99, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600, mb: "xs" }, "Raw Data"), /* @__PURE__ */ React191.createElement(Code6, { block: true, style: { fontSize: 11, maxHeight: 200, overflow: "auto" } }, JSON.stringify(data, null, 2)))));
|
|
17161
17140
|
};
|
|
17162
17141
|
var ViewerPanel = ({ block, onApprove }) => {
|
|
17163
17142
|
const { closePanel } = usePanelStore();
|
|
@@ -17172,7 +17151,7 @@ var ViewerPanel = ({ block, onApprove }) => {
|
|
|
17172
17151
|
const isApproved = status === "approved";
|
|
17173
17152
|
const hasData = domainPreviewData !== null;
|
|
17174
17153
|
return /* @__PURE__ */ React191.createElement(
|
|
17175
|
-
|
|
17154
|
+
Paper16,
|
|
17176
17155
|
{
|
|
17177
17156
|
p: "md",
|
|
17178
17157
|
shadow: "sm",
|
|
@@ -17193,16 +17172,16 @@ var ViewerPanel = ({ block, onApprove }) => {
|
|
|
17193
17172
|
flexShrink: 0
|
|
17194
17173
|
}
|
|
17195
17174
|
},
|
|
17196
|
-
/* @__PURE__ */ React191.createElement(
|
|
17197
|
-
/* @__PURE__ */ React191.createElement(
|
|
17175
|
+
/* @__PURE__ */ React191.createElement(Title13, { order: 5 }, block.props.title || "Domain Card"),
|
|
17176
|
+
/* @__PURE__ */ React191.createElement(CloseButton10, { onClick: closePanel })
|
|
17198
17177
|
),
|
|
17199
|
-
/* @__PURE__ */ React191.createElement(Box35, { style: { flex: 1, overflow: "hidden", display: "flex", flexDirection: "column" } }, isLoading && /* @__PURE__ */ React191.createElement(
|
|
17178
|
+
/* @__PURE__ */ React191.createElement(Box35, { style: { flex: 1, overflow: "hidden", display: "flex", flexDirection: "column" } }, isLoading && /* @__PURE__ */ React191.createElement(Stack123, { align: "center", justify: "center", style: { flex: 1 }, gap: "md" }, /* @__PURE__ */ React191.createElement(Loader25, { size: "lg", color: "blue" }), /* @__PURE__ */ React191.createElement(Stack123, { align: "center", gap: "xs" }, /* @__PURE__ */ React191.createElement(IconSparkles3, { size: 24, color: "var(--mantine-color-blue-5)" }), /* @__PURE__ */ React191.createElement(Text99, { size: "sm", c: "dimmed", ta: "center" }, loadingMessage))), isError && /* @__PURE__ */ React191.createElement(Stack123, { style: { flex: 1 }, gap: "md" }, /* @__PURE__ */ React191.createElement(Alert25, { icon: /* @__PURE__ */ React191.createElement(IconAlertCircle12, { size: 16 }), title: "Error", color: "red", variant: "light" }, errorMessage), /* @__PURE__ */ React191.createElement(Text99, { size: "sm", c: "dimmed", ta: "center" }, "Please ask the oracle to try again.")), (isReady || isApproved) && hasData && /* @__PURE__ */ React191.createElement(Box35, { style: { flex: 1, overflow: "hidden" } }, domainCardRenderer ? (
|
|
17200
17179
|
// Use custom renderer from web app
|
|
17201
17180
|
/* @__PURE__ */ React191.createElement(ScrollArea6, { h: "100%", offsetScrollbars: true }, domainCardRenderer(domainPreviewData))
|
|
17202
17181
|
) : (
|
|
17203
17182
|
// Fallback to JSON viewer
|
|
17204
17183
|
/* @__PURE__ */ React191.createElement(JsonViewer, { data: domainPreviewData })
|
|
17205
|
-
)), !isLoading && !isError && !hasData && /* @__PURE__ */ React191.createElement(
|
|
17184
|
+
)), !isLoading && !isError && !hasData && /* @__PURE__ */ React191.createElement(Stack123, { align: "center", justify: "center", style: { flex: 1 }, gap: "md" }, /* @__PURE__ */ React191.createElement(Text99, { size: "sm", c: "dimmed", ta: "center" }, "No domain data available yet."))),
|
|
17206
17185
|
isReady && hasData && /* @__PURE__ */ React191.createElement(
|
|
17207
17186
|
Box35,
|
|
17208
17187
|
{
|
|
@@ -17213,8 +17192,8 @@ var ViewerPanel = ({ block, onApprove }) => {
|
|
|
17213
17192
|
flexShrink: 0
|
|
17214
17193
|
}
|
|
17215
17194
|
},
|
|
17216
|
-
/* @__PURE__ */ React191.createElement(
|
|
17217
|
-
/* @__PURE__ */ React191.createElement(
|
|
17195
|
+
/* @__PURE__ */ React191.createElement(Text99, { size: "xs", c: "dimmed", ta: "center", mb: "0" }, "This shows the domain details to see if the narrative aligns with what the domain is about."),
|
|
17196
|
+
/* @__PURE__ */ React191.createElement(Text99, { size: "xs", c: "dimmed", ta: "center", mb: "md" }, "If you'd like changes, ask the oracle to make changes for you."),
|
|
17218
17197
|
/* @__PURE__ */ React191.createElement(Button33, { fullWidth: true, color: "teal", leftSection: /* @__PURE__ */ React191.createElement(IconCheck6, { size: 16 }), onClick: onApprove }, "Approve")
|
|
17219
17198
|
),
|
|
17220
17199
|
isApproved && /* @__PURE__ */ React191.createElement(
|
|
@@ -17551,7 +17530,7 @@ var DomainCardViewerFlowView = ({ editor, block }) => {
|
|
|
17551
17530
|
}
|
|
17552
17531
|
};
|
|
17553
17532
|
const canOpenPanel = status !== "pending";
|
|
17554
|
-
return /* @__PURE__ */ React192.createElement(BaseContainer, { onClick: canOpenPanel ? open : void 0, style: { opacity: canOpenPanel ? 1 : 0.7, cursor: canOpenPanel ? "pointer" : "not-allowed" } }, /* @__PURE__ */ React192.createElement(
|
|
17533
|
+
return /* @__PURE__ */ React192.createElement(BaseContainer, { onClick: canOpenPanel ? open : void 0, style: { opacity: canOpenPanel ? 1 : 0.7, cursor: canOpenPanel ? "pointer" : "not-allowed" } }, /* @__PURE__ */ React192.createElement(Group60, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React192.createElement(Group60, { wrap: "nowrap", align: "center", style: { flex: 1 } }, getIcon("dots-circle", block.props.icon), /* @__PURE__ */ React192.createElement(Stack124, { gap: 4, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React192.createElement(Group60, { gap: "xs", align: "center" }, /* @__PURE__ */ React192.createElement(Text100, { fw: 600, size: "sm" }, block.props.title || "Domain Card"), /* @__PURE__ */ React192.createElement(Badge30, { size: "xs", variant: "filled", color: badgeProps.color, styles: { root: { backgroundColor: `var(--mantine-color-${badgeProps.color}-6)`, color: "white" } } }, badgeProps.text)), /* @__PURE__ */ React192.createElement(Text100, { size: "xs", c: "dimmed", lineClamp: 2 }, getDescriptionText()))), IS_DEV && status === "pending" && /* @__PURE__ */ React192.createElement(React192.Fragment, null, /* @__PURE__ */ React192.createElement(Button34, { size: "compact-xs", variant: "light", color: "orange", leftSection: /* @__PURE__ */ React192.createElement(IconTestPipe, { size: 14 }), onClick: handleInjectDummyData }, "Test Data"), /* @__PURE__ */ React192.createElement(Button34, { size: "compact-xs", variant: "light", color: "blue", leftSection: /* @__PURE__ */ React192.createElement(IconLoader, { size: 14 }), onClick: handleSetLoading }, "Loading")), IS_DEV && (status === "ready" || status === "approved" || status === "loading") && /* @__PURE__ */ React192.createElement(Button34, { size: "compact-xs", variant: "light", color: "orange", leftSection: /* @__PURE__ */ React192.createElement(IconTrash5, { size: 14 }), onClick: handleClearData }, "Clear"), canOpenPanel && /* @__PURE__ */ React192.createElement(Tooltip19, { label: status === "approved" ? "View domain data" : "Review domain data", withArrow: true }, /* @__PURE__ */ React192.createElement(ActionIcon29, { variant: "subtle", color: "blue" }, /* @__PURE__ */ React192.createElement(IconChevronRight9, { size: 18 })))));
|
|
17555
17534
|
};
|
|
17556
17535
|
|
|
17557
17536
|
// src/mantine/blocks/domainCardViewer/DomainCardViewerBlock.tsx
|
|
@@ -18795,7 +18774,7 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
18795
18774
|
|
|
18796
18775
|
// src/mantine/components/Base/BaseIconPicker.tsx
|
|
18797
18776
|
import React196, { useState as useState68, useMemo as useMemo65, useEffect as useEffect53 } from "react";
|
|
18798
|
-
import { TextInput as TextInput6, Tabs as Tabs3, Box as Box36, Stack as
|
|
18777
|
+
import { TextInput as TextInput6, Tabs as Tabs3, Box as Box36, Stack as Stack125, UnstyledButton as UnstyledButton2, Text as Text101, Center as Center12, ScrollArea as ScrollArea7, Group as Group61, Popover as Popover2 } from "@mantine/core";
|
|
18799
18778
|
import * as TablerIcons from "@tabler/icons-react";
|
|
18800
18779
|
import { IconSearch as IconSearch5, IconX as IconX8, IconChevronLeft, IconChevronRight as IconChevronRight10 } from "@tabler/icons-react";
|
|
18801
18780
|
|
|
@@ -18888,7 +18867,7 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, children
|
|
|
18888
18867
|
};
|
|
18889
18868
|
const renderIconGrid = (icons) => {
|
|
18890
18869
|
if (icons.length === 0) {
|
|
18891
|
-
return /* @__PURE__ */ React196.createElement(
|
|
18870
|
+
return /* @__PURE__ */ React196.createElement(Center12, { py: "xl" }, /* @__PURE__ */ React196.createElement(Text101, { c: "dimmed", size: "sm" }, "No icons found"));
|
|
18892
18871
|
}
|
|
18893
18872
|
return /* @__PURE__ */ React196.createElement(
|
|
18894
18873
|
Box36,
|
|
@@ -18943,7 +18922,7 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, children
|
|
|
18943
18922
|
},
|
|
18944
18923
|
p: 0
|
|
18945
18924
|
},
|
|
18946
|
-
/* @__PURE__ */ React196.createElement(
|
|
18925
|
+
/* @__PURE__ */ React196.createElement(Stack125, { gap: "md", p: "md" }, /* @__PURE__ */ React196.createElement(Tabs3, { value: activeTab, onChange: setActiveTab, variant: "pills" }, /* @__PURE__ */ React196.createElement(Tabs3.List, null, /* @__PURE__ */ React196.createElement(Tabs3.Tab, { value: "icons" }, "Icons"), /* @__PURE__ */ React196.createElement(Tabs3.Tab, { value: "upload" }, "Upload")), /* @__PURE__ */ React196.createElement(Tabs3.Panel, { value: "icons", pt: "md" }, /* @__PURE__ */ React196.createElement(
|
|
18947
18926
|
TextInput6,
|
|
18948
18927
|
{
|
|
18949
18928
|
mb: "md",
|
|
@@ -18961,7 +18940,7 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, children
|
|
|
18961
18940
|
}
|
|
18962
18941
|
}
|
|
18963
18942
|
}
|
|
18964
|
-
), !searchQuery && /* @__PURE__ */ React196.createElement(Box36, { mb: "md" }, /* @__PURE__ */ React196.createElement(
|
|
18943
|
+
), !searchQuery && /* @__PURE__ */ React196.createElement(Box36, { mb: "md" }, /* @__PURE__ */ React196.createElement(Text101, { size: "sm", fw: 500, mb: "xs", px: "xs" }, "Recent"), /* @__PURE__ */ React196.createElement(ScrollArea7.Autosize, { scrollbarSize: 0, mah: 60 }, renderIconGrid(recentIcons))), /* @__PURE__ */ React196.createElement(Box36, null, /* @__PURE__ */ React196.createElement(Group61, { justify: "space-between", mb: "xs", px: "xs" }, /* @__PURE__ */ React196.createElement(Text101, { size: "sm", fw: 500 }, searchQuery ? "Results" : "Icons"), totalPages > 1 && /* @__PURE__ */ React196.createElement(Group61, { gap: "xs" }, /* @__PURE__ */ React196.createElement(Text101, { size: "xs", c: "dimmed" }, "Page ", currentPage, " of ", totalPages, " (", filteredIcons.length, " total)"), /* @__PURE__ */ React196.createElement(BaseButton, { size: "xs", onClick: () => setCurrentPage((p) => Math.max(1, p - 1)), disabled: currentPage === 1, leftSection: /* @__PURE__ */ React196.createElement(IconChevronLeft, { size: 14 }) }, "Prev"), /* @__PURE__ */ React196.createElement(
|
|
18965
18944
|
BaseButton,
|
|
18966
18945
|
{
|
|
18967
18946
|
size: "xs",
|
|
@@ -18970,13 +18949,13 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, children
|
|
|
18970
18949
|
leftSection: /* @__PURE__ */ React196.createElement(IconChevronRight10, { size: 14 })
|
|
18971
18950
|
},
|
|
18972
18951
|
"Next"
|
|
18973
|
-
))), /* @__PURE__ */ React196.createElement(ScrollArea7.Autosize, { scrollbarSize: 0, mah: 200 }, renderIconGrid(paginatedIcons)))), /* @__PURE__ */ React196.createElement(Tabs3.Panel, { value: "upload", pt: "md" }, /* @__PURE__ */ React196.createElement(
|
|
18952
|
+
))), /* @__PURE__ */ React196.createElement(ScrollArea7.Autosize, { scrollbarSize: 0, mah: 200 }, renderIconGrid(paginatedIcons)))), /* @__PURE__ */ React196.createElement(Tabs3.Panel, { value: "upload", pt: "md" }, /* @__PURE__ */ React196.createElement(Center12, { py: "xl" }, /* @__PURE__ */ React196.createElement(Stack125, { align: "center", gap: "md" }, /* @__PURE__ */ React196.createElement(Text101, { size: "sm", c: "dimmed", ta: "center" }, "Upload a custom icon image", /* @__PURE__ */ React196.createElement("br", null), "(PNG, JPG, SVG)"), /* @__PURE__ */ React196.createElement(CoverImageButton, { onClick: onUploadClick }, "Choose File"))))))
|
|
18974
18953
|
));
|
|
18975
18954
|
}
|
|
18976
18955
|
|
|
18977
18956
|
// src/mantine/components/CoverImage.tsx
|
|
18978
18957
|
import React198, { useState as useState69, useRef as useRef12, useEffect as useEffect54 } from "react";
|
|
18979
|
-
import { Box as Box38, Group as
|
|
18958
|
+
import { Box as Box38, Group as Group62 } from "@mantine/core";
|
|
18980
18959
|
|
|
18981
18960
|
// src/core/lib/imageTransform.ts
|
|
18982
18961
|
var CLOUDFLARE_CDN_BASE = "https://www.ixo.earth/cdn-cgi/image";
|
|
@@ -19110,7 +19089,7 @@ function transformIconImage(sourceUrl, size = "default", customOptions) {
|
|
|
19110
19089
|
|
|
19111
19090
|
// src/mantine/components/Base/PageIcon.tsx
|
|
19112
19091
|
import React197, { useMemo as useMemo66 } from "react";
|
|
19113
|
-
import { Center as
|
|
19092
|
+
import { Center as Center13, Box as Box37 } from "@mantine/core";
|
|
19114
19093
|
import * as TablerIcons2 from "@tabler/icons-react";
|
|
19115
19094
|
function PageIcon({ src, iconSize = 64, useCenter = false, style }) {
|
|
19116
19095
|
const isIconName = src && !src.startsWith("http");
|
|
@@ -19122,7 +19101,7 @@ function PageIcon({ src, iconSize = 64, useCenter = false, style }) {
|
|
|
19122
19101
|
}
|
|
19123
19102
|
return null;
|
|
19124
19103
|
}, [isIconName, src]);
|
|
19125
|
-
const Container = useCenter ?
|
|
19104
|
+
const Container = useCenter ? Center13 : Box37;
|
|
19126
19105
|
if (!src) return null;
|
|
19127
19106
|
if (IconComponent) {
|
|
19128
19107
|
return /* @__PURE__ */ React197.createElement(
|
|
@@ -19264,7 +19243,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
19264
19243
|
onMouseLeave: () => editable && setIsHovering(false)
|
|
19265
19244
|
},
|
|
19266
19245
|
/* @__PURE__ */ React198.createElement("div", { style: { maxWidth: "900px", margin: "0 auto", position: "relative", height: "100%" } }, /* @__PURE__ */ React198.createElement("input", { ref: coverFileInputRef, type: "file", accept: "image/*", style: { display: "none" }, onChange: (e) => handleFileSelect(e, "cover") }), /* @__PURE__ */ React198.createElement("input", { ref: logoFileInputRef, type: "file", accept: "image/*", style: { display: "none" }, onChange: (e) => handleFileSelect(e, "logo") }), editable && isHovering && !logoSrc && /* @__PURE__ */ React198.createElement(
|
|
19267
|
-
|
|
19246
|
+
Group62,
|
|
19268
19247
|
{
|
|
19269
19248
|
gap: "xs",
|
|
19270
19249
|
style: {
|
|
@@ -19372,7 +19351,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
19372
19351
|
}
|
|
19373
19352
|
),
|
|
19374
19353
|
editable && isHovering && /* @__PURE__ */ React198.createElement(
|
|
19375
|
-
|
|
19354
|
+
Group62,
|
|
19376
19355
|
{
|
|
19377
19356
|
gap: "xs",
|
|
19378
19357
|
style: {
|
|
@@ -19400,7 +19379,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
19400
19379
|
},
|
|
19401
19380
|
logoSrc && /* @__PURE__ */ React198.createElement(PageIcon, { src: logoSrc, iconSize: 64 }),
|
|
19402
19381
|
editable && isHovering && /* @__PURE__ */ React198.createElement(React198.Fragment, null, logoSrc ? /* @__PURE__ */ React198.createElement(
|
|
19403
|
-
|
|
19382
|
+
Group62,
|
|
19404
19383
|
{
|
|
19405
19384
|
gap: "xs",
|
|
19406
19385
|
style: {
|
|
@@ -20175,7 +20154,7 @@ function IxoEditor({
|
|
|
20175
20154
|
|
|
20176
20155
|
// src/mantine/components/EntitySigningSetup.tsx
|
|
20177
20156
|
import React203, { useState as useState72 } from "react";
|
|
20178
|
-
import { Modal as Modal3, Stack as
|
|
20157
|
+
import { Modal as Modal3, Stack as Stack126, Text as Text102, TextInput as TextInput7, Button as Button36, Alert as Alert26, Group as Group63 } from "@mantine/core";
|
|
20179
20158
|
import { IconAlertCircle as IconAlertCircle13, IconCheck as IconCheck7, IconKey as IconKey2 } from "@tabler/icons-react";
|
|
20180
20159
|
var EntitySigningSetup = ({
|
|
20181
20160
|
opened,
|
|
@@ -20233,10 +20212,10 @@ var EntitySigningSetup = ({
|
|
|
20233
20212
|
{
|
|
20234
20213
|
opened,
|
|
20235
20214
|
onClose: handleClose,
|
|
20236
|
-
title: /* @__PURE__ */ React203.createElement(
|
|
20215
|
+
title: /* @__PURE__ */ React203.createElement(Group63, { gap: "xs" }, /* @__PURE__ */ React203.createElement(IconKey2, { size: 20 }), /* @__PURE__ */ React203.createElement(Text102, { fw: 600 }, "Entity Signing Setup")),
|
|
20237
20216
|
size: "md"
|
|
20238
20217
|
},
|
|
20239
|
-
/* @__PURE__ */ React203.createElement(
|
|
20218
|
+
/* @__PURE__ */ React203.createElement(Stack126, { gap: "md" }, success ? /* @__PURE__ */ React203.createElement(Alert26, { color: "green", icon: /* @__PURE__ */ React203.createElement(IconCheck7, { size: 16 }) }, "Entity signing key set up successfully!") : /* @__PURE__ */ React203.createElement(React203.Fragment, null, /* @__PURE__ */ React203.createElement(Text102, { size: "sm", c: "dimmed" }, "Flow authorization requires a signing key for", " ", /* @__PURE__ */ React203.createElement(Text102, { span: true, fw: 500 }, entityName || entityDid), "."), /* @__PURE__ */ React203.createElement(Alert26, { color: "blue", variant: "light" }, /* @__PURE__ */ React203.createElement(Text102, { size: "sm" }, "This is a ", /* @__PURE__ */ React203.createElement("strong", null, "one-time setup"), " that allows flows to grant permissions without requiring wallet signatures for each delegation.")), /* @__PURE__ */ React203.createElement(Stack126, { gap: "xs" }, /* @__PURE__ */ React203.createElement(Text102, { size: "sm", fw: 500 }, "What happens:"), /* @__PURE__ */ React203.createElement(Text102, { size: "sm", c: "dimmed" }, "1. A new signing key is generated"), /* @__PURE__ */ React203.createElement(Text102, { size: "sm", c: "dimmed" }, "2. Key is registered on the entity's DID document (requires wallet)"), /* @__PURE__ */ React203.createElement(Text102, { size: "sm", c: "dimmed" }, "3. Key is stored encrypted in the entity's Matrix room")), /* @__PURE__ */ React203.createElement(
|
|
20240
20219
|
TextInput7,
|
|
20241
20220
|
{
|
|
20242
20221
|
label: "Enter PIN to encrypt signing key",
|
|
@@ -20257,7 +20236,7 @@ var EntitySigningSetup = ({
|
|
|
20257
20236
|
onChange: (e) => setConfirmPin(e.currentTarget.value),
|
|
20258
20237
|
disabled: loading
|
|
20259
20238
|
}
|
|
20260
|
-
), error && /* @__PURE__ */ React203.createElement(Alert26, { color: "red", icon: /* @__PURE__ */ React203.createElement(IconAlertCircle13, { size: 16 }) }, error), /* @__PURE__ */ React203.createElement(
|
|
20239
|
+
), error && /* @__PURE__ */ React203.createElement(Alert26, { color: "red", icon: /* @__PURE__ */ React203.createElement(IconAlertCircle13, { size: 16 }) }, error), /* @__PURE__ */ React203.createElement(Group63, { justify: "flex-end", mt: "md" }, /* @__PURE__ */ React203.createElement(Button36, { variant: "subtle", onClick: handleClose, disabled: loading }, "Cancel"), /* @__PURE__ */ React203.createElement(
|
|
20261
20240
|
Button36,
|
|
20262
20241
|
{
|
|
20263
20242
|
onClick: handleSetup,
|
|
@@ -20271,7 +20250,7 @@ var EntitySigningSetup = ({
|
|
|
20271
20250
|
|
|
20272
20251
|
// src/mantine/components/FlowPermissionsPanel.tsx
|
|
20273
20252
|
import React204, { useState as useState73, useEffect as useEffect57, useMemo as useMemo67 } from "react";
|
|
20274
|
-
import { Stack as
|
|
20253
|
+
import { Stack as Stack127, Text as Text103, Paper as Paper17, Group as Group64, Badge as Badge31, Button as Button37, ActionIcon as ActionIcon30, Loader as Loader26, Alert as Alert27, Divider as Divider12 } from "@mantine/core";
|
|
20275
20254
|
import { IconPlus as IconPlus5, IconTrash as IconTrash6, IconShieldCheck as IconShieldCheck2, IconUser as IconUser4, IconRobot as IconRobot3, IconBuilding } from "@tabler/icons-react";
|
|
20276
20255
|
var FlowPermissionsPanel = ({
|
|
20277
20256
|
editor,
|
|
@@ -20347,8 +20326,8 @@ var FlowPermissionsPanel = ({
|
|
|
20347
20326
|
if (date < /* @__PURE__ */ new Date()) return "Expired";
|
|
20348
20327
|
return date.toLocaleDateString();
|
|
20349
20328
|
};
|
|
20350
|
-
return /* @__PURE__ */ React204.createElement(
|
|
20351
|
-
|
|
20329
|
+
return /* @__PURE__ */ React204.createElement(Stack127, { gap: "md" }, /* @__PURE__ */ React204.createElement(Stack127, { gap: "xs" }, /* @__PURE__ */ React204.createElement(Text103, { fw: 600, size: "sm" }, "Root Authority"), /* @__PURE__ */ React204.createElement(Paper17, { p: "sm", withBorder: true }, /* @__PURE__ */ React204.createElement(Group64, { gap: "xs" }, /* @__PURE__ */ React204.createElement(IconShieldCheck2, { size: 20, color: "var(--mantine-color-green-6)" }), /* @__PURE__ */ React204.createElement(Stack127, { gap: 2, style: { flex: 1 } }, /* @__PURE__ */ React204.createElement(Text103, { size: "sm", fw: 500 }, entityName || entityDid), /* @__PURE__ */ React204.createElement(Text103, { size: "xs", c: "dimmed" }, rootCapability ? `Granted: ${new Date(rootCapability.issuedAt).toLocaleDateString()}` : "Root capability not set up")), /* @__PURE__ */ React204.createElement(Badge31, { color: "green", variant: "light" }, "Entity")))), /* @__PURE__ */ React204.createElement(Divider12, { label: "Delegated Permissions", labelPosition: "center" }), loading ? /* @__PURE__ */ React204.createElement(Group64, { justify: "center", py: "xl" }, /* @__PURE__ */ React204.createElement(Loader26, { size: "sm" })) : delegations.length === 0 ? /* @__PURE__ */ React204.createElement(Alert27, { color: "gray", variant: "light" }, /* @__PURE__ */ React204.createElement(Text103, { size: "sm" }, "No permissions have been granted yet.")) : /* @__PURE__ */ React204.createElement(Stack127, { gap: "xs" }, delegations.map(({ capability, displayName, type }) => /* @__PURE__ */ React204.createElement(Paper17, { key: capability.id, p: "sm", withBorder: true }, /* @__PURE__ */ React204.createElement(Group64, { justify: "space-between" }, /* @__PURE__ */ React204.createElement(Group64, { gap: "xs" }, getIcon2(type), /* @__PURE__ */ React204.createElement(Stack127, { gap: 2 }, /* @__PURE__ */ React204.createElement(Text103, { size: "sm", fw: 500 }, displayName), /* @__PURE__ */ React204.createElement(Text103, { size: "xs", c: "dimmed" }, formatCapabilities(capability.capabilities)), /* @__PURE__ */ React204.createElement(Group64, { gap: "xs" }, /* @__PURE__ */ React204.createElement(Text103, { size: "xs", c: "dimmed" }, "Expires: ", formatExpiration(capability.expiration)), /* @__PURE__ */ React204.createElement(Text103, { size: "xs", c: "dimmed" }, "\u2022"), /* @__PURE__ */ React204.createElement(Text103, { size: "xs", c: "dimmed" }, "Granted by: ", capability.issuer === entityDid ? "Entity" : capability.issuer.slice(-8))))), /* @__PURE__ */ React204.createElement(
|
|
20330
|
+
ActionIcon30,
|
|
20352
20331
|
{
|
|
20353
20332
|
color: "red",
|
|
20354
20333
|
variant: "subtle",
|
|
@@ -20372,18 +20351,18 @@ var FlowPermissionsPanel = ({
|
|
|
20372
20351
|
import React205, { useState as useState74, useCallback as useCallback53 } from "react";
|
|
20373
20352
|
import {
|
|
20374
20353
|
Modal as Modal4,
|
|
20375
|
-
Stack as
|
|
20376
|
-
Text as
|
|
20354
|
+
Stack as Stack128,
|
|
20355
|
+
Text as Text104,
|
|
20377
20356
|
TextInput as TextInput8,
|
|
20378
20357
|
Button as Button38,
|
|
20379
|
-
Group as
|
|
20358
|
+
Group as Group65,
|
|
20380
20359
|
Radio as Radio6,
|
|
20381
20360
|
Checkbox as Checkbox12,
|
|
20382
20361
|
Alert as Alert28,
|
|
20383
|
-
Paper as
|
|
20362
|
+
Paper as Paper18,
|
|
20384
20363
|
Loader as Loader27,
|
|
20385
20364
|
Badge as Badge32,
|
|
20386
|
-
ActionIcon as
|
|
20365
|
+
ActionIcon as ActionIcon31,
|
|
20387
20366
|
Divider as Divider13,
|
|
20388
20367
|
NumberInput as NumberInput3
|
|
20389
20368
|
} from "@mantine/core";
|
|
@@ -20507,14 +20486,14 @@ var GrantPermissionModal = ({
|
|
|
20507
20486
|
{
|
|
20508
20487
|
opened,
|
|
20509
20488
|
onClose: handleClose,
|
|
20510
|
-
title: /* @__PURE__ */ React205.createElement(
|
|
20489
|
+
title: /* @__PURE__ */ React205.createElement(Group65, { gap: "xs" }, /* @__PURE__ */ React205.createElement(IconShieldPlus3, { size: 20 }), /* @__PURE__ */ React205.createElement(Text104, { fw: 600 }, "Grant Permission")),
|
|
20511
20490
|
size: "lg"
|
|
20512
20491
|
},
|
|
20513
|
-
/* @__PURE__ */ React205.createElement(
|
|
20492
|
+
/* @__PURE__ */ React205.createElement(Stack128, { gap: "md" }, /* @__PURE__ */ React205.createElement(Stack128, { gap: "xs" }, /* @__PURE__ */ React205.createElement(Text104, { size: "sm", fw: 500 }, "Recipient Type"), /* @__PURE__ */ React205.createElement(Radio6.Group, { value: recipientType, onChange: (v) => {
|
|
20514
20493
|
setRecipientType(v);
|
|
20515
20494
|
setSelectedRecipient(null);
|
|
20516
20495
|
setSearchResults([]);
|
|
20517
|
-
} }, /* @__PURE__ */ React205.createElement(
|
|
20496
|
+
} }, /* @__PURE__ */ React205.createElement(Group65, null, /* @__PURE__ */ React205.createElement(Radio6, { value: "user", label: "User" }), /* @__PURE__ */ React205.createElement(Radio6, { value: "oracle", label: "Oracle" }), /* @__PURE__ */ React205.createElement(Radio6, { value: "manual", label: "Enter DID" })))), recipientType !== "manual" ? /* @__PURE__ */ React205.createElement(Stack128, { gap: "xs" }, /* @__PURE__ */ React205.createElement(
|
|
20518
20497
|
TextInput8,
|
|
20519
20498
|
{
|
|
20520
20499
|
placeholder: recipientType === "oracle" ? "Search oracles..." : "Search users...",
|
|
@@ -20524,7 +20503,7 @@ var GrantPermissionModal = ({
|
|
|
20524
20503
|
onChange: (e) => setSearchQuery(e.currentTarget.value),
|
|
20525
20504
|
onKeyDown: (e) => e.key === "Enter" && handleSearch()
|
|
20526
20505
|
}
|
|
20527
|
-
), selectedRecipient ? /* @__PURE__ */ React205.createElement(
|
|
20506
|
+
), selectedRecipient ? /* @__PURE__ */ React205.createElement(Paper18, { p: "sm", withBorder: true }, /* @__PURE__ */ React205.createElement(Group65, { justify: "space-between" }, /* @__PURE__ */ React205.createElement(Group65, { gap: "xs" }, recipientType === "oracle" ? /* @__PURE__ */ React205.createElement(IconRobot4, { size: 16 }) : /* @__PURE__ */ React205.createElement(IconUser5, { size: 16 }), /* @__PURE__ */ React205.createElement(Text104, { size: "sm" }, selectedRecipient.displayName), /* @__PURE__ */ React205.createElement(Badge32, { size: "xs", variant: "light" }, selectedRecipient.did.slice(-12))), /* @__PURE__ */ React205.createElement(ActionIcon31, { size: "sm", variant: "subtle", onClick: () => setSelectedRecipient(null) }, /* @__PURE__ */ React205.createElement(IconX9, { size: 14 })))) : searchResults.length > 0 ? /* @__PURE__ */ React205.createElement(Paper18, { p: "xs", withBorder: true, style: { maxHeight: 150, overflow: "auto" } }, /* @__PURE__ */ React205.createElement(Stack128, { gap: 4 }, searchResults.map((result) => /* @__PURE__ */ React205.createElement(
|
|
20528
20507
|
Button38,
|
|
20529
20508
|
{
|
|
20530
20509
|
key: result.did,
|
|
@@ -20542,12 +20521,12 @@ var GrantPermissionModal = ({
|
|
|
20542
20521
|
value: manualDid,
|
|
20543
20522
|
onChange: (e) => setManualDid(e.currentTarget.value)
|
|
20544
20523
|
}
|
|
20545
|
-
), /* @__PURE__ */ React205.createElement(Divider13, null), /* @__PURE__ */ React205.createElement(
|
|
20524
|
+
), /* @__PURE__ */ React205.createElement(Divider13, null), /* @__PURE__ */ React205.createElement(Stack128, { gap: "xs" }, /* @__PURE__ */ React205.createElement(Text104, { size: "sm", fw: 500 }, "Permission Scope"), singleBlockMode && fixedBlock ? (
|
|
20546
20525
|
// Single block mode: show fixed block info
|
|
20547
|
-
/* @__PURE__ */ React205.createElement(
|
|
20526
|
+
/* @__PURE__ */ React205.createElement(Paper18, { p: "sm", withBorder: true }, /* @__PURE__ */ React205.createElement(Group65, { gap: "xs" }, /* @__PURE__ */ React205.createElement(Badge32, { variant: "light", color: "blue" }, fixedBlock.type), /* @__PURE__ */ React205.createElement(Text104, { size: "sm" }, fixedBlock.name || `Block ${fixedBlock.id.slice(-8)}`)), /* @__PURE__ */ React205.createElement(Text104, { size: "xs", c: "dimmed", mt: "xs" }, "Permission will be granted to execute this specific block."))
|
|
20548
20527
|
) : (
|
|
20549
20528
|
// Multi-block mode: show scope selection
|
|
20550
|
-
/* @__PURE__ */ React205.createElement(React205.Fragment, null, /* @__PURE__ */ React205.createElement(Radio6.Group, { value: scopeType, onChange: (v) => setScopeType(v) }, /* @__PURE__ */ React205.createElement(
|
|
20529
|
+
/* @__PURE__ */ React205.createElement(React205.Fragment, null, /* @__PURE__ */ React205.createElement(Radio6.Group, { value: scopeType, onChange: (v) => setScopeType(v) }, /* @__PURE__ */ React205.createElement(Stack128, { gap: "xs" }, /* @__PURE__ */ React205.createElement(Radio6, { value: "full", label: "Full flow access (can execute any block)" }), /* @__PURE__ */ React205.createElement(Radio6, { value: "blocks", label: "Specific blocks only" }))), scopeType === "blocks" && /* @__PURE__ */ React205.createElement(Paper18, { p: "sm", withBorder: true, style: { maxHeight: 150, overflow: "auto" } }, /* @__PURE__ */ React205.createElement(Stack128, { gap: "xs" }, blocks.map((block) => /* @__PURE__ */ React205.createElement(
|
|
20551
20530
|
Checkbox12,
|
|
20552
20531
|
{
|
|
20553
20532
|
key: block.id,
|
|
@@ -20562,7 +20541,7 @@ var GrantPermissionModal = ({
|
|
|
20562
20541
|
}
|
|
20563
20542
|
}
|
|
20564
20543
|
)))))
|
|
20565
|
-
)), /* @__PURE__ */ React205.createElement(Divider13, null), /* @__PURE__ */ React205.createElement(
|
|
20544
|
+
)), /* @__PURE__ */ React205.createElement(Divider13, null), /* @__PURE__ */ React205.createElement(Stack128, { gap: "xs" }, /* @__PURE__ */ React205.createElement(
|
|
20566
20545
|
Checkbox12,
|
|
20567
20546
|
{
|
|
20568
20547
|
label: "Set expiration",
|
|
@@ -20596,7 +20575,7 @@ var GrantPermissionModal = ({
|
|
|
20596
20575
|
value: pin,
|
|
20597
20576
|
onChange: (e) => setPin(e.currentTarget.value)
|
|
20598
20577
|
}
|
|
20599
|
-
), error && /* @__PURE__ */ React205.createElement(Alert28, { color: "red" }, error), /* @__PURE__ */ React205.createElement(
|
|
20578
|
+
), error && /* @__PURE__ */ React205.createElement(Alert28, { color: "red" }, error), /* @__PURE__ */ React205.createElement(Group65, { justify: "flex-end" }, /* @__PURE__ */ React205.createElement(Button38, { variant: "subtle", onClick: handleClose, disabled: loading }, "Cancel"), /* @__PURE__ */ React205.createElement(Button38, { onClick: handleGrant, loading }, "Grant Permission")))
|
|
20600
20579
|
);
|
|
20601
20580
|
};
|
|
20602
20581
|
|
|
@@ -20661,6 +20640,8 @@ async function getEntity(entityId) {
|
|
|
20661
20640
|
export {
|
|
20662
20641
|
usePanelStore,
|
|
20663
20642
|
usePanel,
|
|
20643
|
+
useListBlocksUIStore,
|
|
20644
|
+
useListBlocksUI,
|
|
20664
20645
|
BlocknoteProvider,
|
|
20665
20646
|
useBlocknoteContext,
|
|
20666
20647
|
useBlocknoteHandlers,
|
|
@@ -20668,8 +20649,6 @@ export {
|
|
|
20668
20649
|
StakeType,
|
|
20669
20650
|
AuthzExecActionTypes,
|
|
20670
20651
|
ValidatorActionType,
|
|
20671
|
-
useListBlocksUIStore,
|
|
20672
|
-
useListBlocksUI,
|
|
20673
20652
|
ListBlockSpec,
|
|
20674
20653
|
OverviewBlock,
|
|
20675
20654
|
ProposalBlockSpec,
|
|
@@ -20703,4 +20682,4 @@ export {
|
|
|
20703
20682
|
ixoGraphQLClient,
|
|
20704
20683
|
getEntity
|
|
20705
20684
|
};
|
|
20706
|
-
//# sourceMappingURL=chunk-
|
|
20685
|
+
//# sourceMappingURL=chunk-HJL3K6NS.mjs.map
|