@ixo/editor 1.14.0 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1287,11 +1287,11 @@ var CheckboxBlockSpec = createReactBlockSpec(
|
|
|
1287
1287
|
);
|
|
1288
1288
|
|
|
1289
1289
|
// src/mantine/blocks/list/ListBlockSpec.tsx
|
|
1290
|
-
import
|
|
1290
|
+
import React42 from "react";
|
|
1291
1291
|
import { createReactBlockSpec as createReactBlockSpec2 } from "@blocknote/react";
|
|
1292
1292
|
|
|
1293
1293
|
// src/mantine/blocks/list/ListBlock.tsx
|
|
1294
|
-
import
|
|
1294
|
+
import React41 from "react";
|
|
1295
1295
|
|
|
1296
1296
|
// src/mantine/blocks/list/template/TemplateView.tsx
|
|
1297
1297
|
import React16, { useMemo as useMemo6 } from "react";
|
|
@@ -2202,9 +2202,9 @@ var ListTemplateView = ({ editor, block }) => {
|
|
|
2202
2202
|
return /* @__PURE__ */ React16.createElement(Card5, { withBorder: true, padding: "md", radius: "md", style: { width: "100%", cursor: "pointer", position: "relative" }, onClick: open }, /* @__PURE__ */ React16.createElement(Badge2, { size: "xs", variant: "light", color: "gray", style: { position: "absolute", top: 8, right: 8 } }, "Template"), /* @__PURE__ */ React16.createElement(Group5, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React16.createElement(Group5, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React16.createElement(ActionIcon3, { variant: "light", color: "blue", size: "lg", radius: "xl", style: { flexShrink: 0 } }, getIcon(block.props.icon, 18, 1.5, "checklist")), /* @__PURE__ */ React16.createElement(Stack9, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React16.createElement(Text7, { fw: 500, size: "sm", contentEditable: false }, listName), /* @__PURE__ */ React16.createElement(Text7, { size: "xs", c: "dimmed", contentEditable: false }, listType ? `List of ${listName.toLowerCase()}` : "Click to configure list type and settings")))));
|
|
2203
2203
|
};
|
|
2204
2204
|
|
|
2205
|
-
// src/mantine/blocks/list/flow/
|
|
2206
|
-
import
|
|
2207
|
-
import { Group as Group7, Stack as Stack26, Text as Text26, ActionIcon as
|
|
2205
|
+
// src/mantine/blocks/list/flow/ListFlowView.tsx
|
|
2206
|
+
import React40, { useState as useState6, useEffect as useEffect6, useMemo as useMemo9, useCallback as useCallback10 } from "react";
|
|
2207
|
+
import { Group as Group7, Stack as Stack26, Text as Text26, ActionIcon as ActionIcon5, Alert as Alert4, Loader as Loader2, Center as Center2, Flex as Flex17, Button as Button5, Title as Title4, Collapse } from "@mantine/core";
|
|
2208
2208
|
|
|
2209
2209
|
// src/mantine/blocks/list/linked_resources/LinkedResourcesList.tsx
|
|
2210
2210
|
import React20 from "react";
|
|
@@ -2489,9 +2489,9 @@ var ValidatorsList = ({ items, mods, isItemChecked, onItemCheck }) => {
|
|
|
2489
2489
|
|
|
2490
2490
|
// src/mantine/blocks/list/ListActionsMenu.tsx
|
|
2491
2491
|
import React31 from "react";
|
|
2492
|
-
import { Menu, Text as Text19 } from "@mantine/core";
|
|
2493
|
-
import { IconArrowDown, IconArrowUp, IconAdjustments, IconCheckbox as IconCheckbox2, IconAdjustmentsHorizontal } from "@tabler/icons-react";
|
|
2494
|
-
var ListActionsMenu = ({ options, selectionMode, onSelectActionClick, value, onChange }) => {
|
|
2492
|
+
import { Menu, Text as Text19, ActionIcon as ActionIcon4 } from "@mantine/core";
|
|
2493
|
+
import { IconArrowDown, IconArrowUp, IconAdjustments, IconCheckbox as IconCheckbox2, IconAdjustmentsHorizontal, IconDownload } from "@tabler/icons-react";
|
|
2494
|
+
var ListActionsMenu = ({ options, selectionMode, onSelectActionClick, value, onChange, onDownloadCsv }) => {
|
|
2495
2495
|
const renderItem = (opt, direction) => {
|
|
2496
2496
|
const isActive = value?.key === opt.key && value?.direction === direction;
|
|
2497
2497
|
const Icon = direction === "asc" ? IconArrowUp : IconArrowDown;
|
|
@@ -2508,7 +2508,7 @@ var ListActionsMenu = ({ options, selectionMode, onSelectActionClick, value, onC
|
|
|
2508
2508
|
opt.label
|
|
2509
2509
|
);
|
|
2510
2510
|
};
|
|
2511
|
-
return /* @__PURE__ */ React31.createElement(Menu, { shadow: "md", width: 220 }, /* @__PURE__ */ React31.createElement(Menu.Target, null, /* @__PURE__ */ React31.createElement(
|
|
2511
|
+
return /* @__PURE__ */ React31.createElement(Menu, { shadow: "md", width: 220 }, /* @__PURE__ */ React31.createElement(Menu.Target, null, /* @__PURE__ */ React31.createElement(ActionIcon4, { variant: "subtle", size: "sm", "aria-label": "List actions", title: "List actions" }, /* @__PURE__ */ React31.createElement(IconAdjustmentsHorizontal, { size: 18 }))), /* @__PURE__ */ React31.createElement(Menu.Dropdown, null, /* @__PURE__ */ React31.createElement(Menu.Label, null, /* @__PURE__ */ React31.createElement(Text19, { c: "dimmed" }, "Order By")), options.map((opt) => /* @__PURE__ */ React31.createElement(React31.Fragment, { key: opt.key }, renderItem(opt, "desc"), renderItem(opt, "asc"))), /* @__PURE__ */ React31.createElement(Menu.Divider, null), /* @__PURE__ */ React31.createElement(Menu.Item, { leftSection: /* @__PURE__ */ React31.createElement(IconAdjustments, { size: 16 }) }, "Smart Filter"), /* @__PURE__ */ React31.createElement(Menu.Divider, null), /* @__PURE__ */ React31.createElement(Menu.Item, { onClick: () => onSelectActionClick(selectionMode === "single" ? null : "single"), leftSection: /* @__PURE__ */ React31.createElement(IconCheckbox2, { size: 16 }) }, "Single Select"), /* @__PURE__ */ React31.createElement(Menu.Item, { onClick: () => onSelectActionClick(selectionMode === "multi" ? null : "multi"), leftSection: /* @__PURE__ */ React31.createElement(IconCheckbox2, { size: 16 }) }, "Multi Select"), onDownloadCsv && /* @__PURE__ */ React31.createElement(React31.Fragment, null, /* @__PURE__ */ React31.createElement(Menu.Divider, null), /* @__PURE__ */ React31.createElement(Menu.Item, { onClick: onDownloadCsv, leftSection: /* @__PURE__ */ React31.createElement(IconDownload, { size: 16 }) }, "Download CSV"))));
|
|
2512
2512
|
};
|
|
2513
2513
|
|
|
2514
2514
|
// src/core/lib/sortListItems.ts
|
|
@@ -2581,8 +2581,8 @@ function filterListItems(items, filterOption) {
|
|
|
2581
2581
|
});
|
|
2582
2582
|
}
|
|
2583
2583
|
|
|
2584
|
-
// src/mantine/blocks/list/flow/
|
|
2585
|
-
import { IconArrowDown as IconArrowDown2, IconArrowRight as IconArrowRight2, IconArrowUp as IconArrowUp2 } from "@tabler/icons-react";
|
|
2584
|
+
// src/mantine/blocks/list/flow/ListFlowView.tsx
|
|
2585
|
+
import { IconArrowDown as IconArrowDown2, IconArrowRight as IconArrowRight2, IconArrowUp as IconArrowUp2, IconChevronDown, IconChevronUp, IconRefresh, IconSettings, IconAlertCircle } from "@tabler/icons-react";
|
|
2586
2586
|
|
|
2587
2587
|
// src/mantine/blocks/list/ListPagination.tsx
|
|
2588
2588
|
import React33 from "react";
|
|
@@ -2834,16 +2834,99 @@ var DaosList = ({ items, mods, isItemChecked, onItemCheck }) => {
|
|
|
2834
2834
|
return /* @__PURE__ */ React38.createElement(Box15, { flex: 1 }, /* @__PURE__ */ React38.createElement(Stack25, null, rows));
|
|
2835
2835
|
};
|
|
2836
2836
|
|
|
2837
|
-
// src/
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2837
|
+
// src/core/utils/files.ts
|
|
2838
|
+
function downloadArrayAsCsv(rows, options) {
|
|
2839
|
+
const safeString = (value) => {
|
|
2840
|
+
if (value === null || value === void 0) return "";
|
|
2841
|
+
if (typeof value === "string") return value;
|
|
2842
|
+
if (typeof value === "number" || typeof value === "boolean") return String(value);
|
|
2843
|
+
try {
|
|
2844
|
+
return JSON.stringify(value);
|
|
2845
|
+
} catch {
|
|
2846
|
+
return String(value);
|
|
2847
|
+
}
|
|
2848
|
+
};
|
|
2849
|
+
const csvEscape = (field) => {
|
|
2850
|
+
const needsQuotes = /[",\n\r]/.test(field) || field.includes(",");
|
|
2851
|
+
const out = field.replace(/"/g, '""');
|
|
2852
|
+
return needsQuotes ? `"${out}"` : out;
|
|
2853
|
+
};
|
|
2854
|
+
const isObjectRow = (r) => r !== null && typeof r === "object" && !Array.isArray(r);
|
|
2855
|
+
let headers = [];
|
|
2856
|
+
if (rows.length > 0 && isObjectRow(rows[0])) {
|
|
2857
|
+
const keySet = /* @__PURE__ */ new Set();
|
|
2858
|
+
for (const r of rows) {
|
|
2859
|
+
if (isObjectRow(r)) {
|
|
2860
|
+
for (const k of Object.keys(r)) keySet.add(k);
|
|
2861
|
+
}
|
|
2862
|
+
}
|
|
2863
|
+
headers = Array.from(keySet);
|
|
2864
|
+
} else {
|
|
2865
|
+
headers = ["value"];
|
|
2866
|
+
}
|
|
2867
|
+
const csvLines = [];
|
|
2868
|
+
csvLines.push(headers.map((h) => csvEscape(h)).join(","));
|
|
2869
|
+
for (const row of rows) {
|
|
2870
|
+
if (isObjectRow(row)) {
|
|
2871
|
+
const obj = row;
|
|
2872
|
+
const line = headers.map((h) => csvEscape(safeString(Object.prototype.hasOwnProperty.call(obj, h) ? obj[h] : ""))).join(",");
|
|
2873
|
+
csvLines.push(line);
|
|
2874
|
+
} else {
|
|
2875
|
+
csvLines.push(csvEscape(safeString(row)));
|
|
2876
|
+
}
|
|
2877
|
+
}
|
|
2878
|
+
const csvContent = csvLines.join("\r\n");
|
|
2879
|
+
const bom = "\uFEFF";
|
|
2880
|
+
const blob = new Blob([bom + csvContent], { type: "text/csv;charset=utf-8;" });
|
|
2881
|
+
const url = URL.createObjectURL(blob);
|
|
2882
|
+
const a = document.createElement("a");
|
|
2883
|
+
const pad = (n) => String(n).padStart(2, "0");
|
|
2884
|
+
const d = /* @__PURE__ */ new Date();
|
|
2885
|
+
const defaultName = `list-export-${d.getFullYear()}${pad(d.getMonth() + 1)}${pad(d.getDate())}-${pad(d.getHours())}${pad(d.getMinutes())}${pad(d.getSeconds())}.csv`;
|
|
2886
|
+
a.href = url;
|
|
2887
|
+
a.download = options?.filename || defaultName;
|
|
2888
|
+
document.body.appendChild(a);
|
|
2889
|
+
a.click();
|
|
2890
|
+
document.body.removeChild(a);
|
|
2891
|
+
URL.revokeObjectURL(url);
|
|
2892
|
+
}
|
|
2893
|
+
|
|
2894
|
+
// src/mantine/blocks/list/flow/ListFlowView.tsx
|
|
2895
|
+
import { useDisclosure } from "@mantine/hooks";
|
|
2896
|
+
|
|
2897
|
+
// src/mantine/blocks/list/ui/ListBlocksUIContext.tsx
|
|
2898
|
+
import React39, { createContext as createContext2, useCallback as useCallback9, useContext as useContext2, useMemo as useMemo8, useRef as useRef3 } from "react";
|
|
2899
|
+
var ListBlocksUIContext = createContext2(null);
|
|
2900
|
+
var ListBlocksUIProvider = ({ children }) => {
|
|
2901
|
+
const listenersRef = useRef3(/* @__PURE__ */ new Set());
|
|
2902
|
+
const subscribe = useCallback9((listener) => {
|
|
2903
|
+
listenersRef.current.add(listener);
|
|
2904
|
+
return () => {
|
|
2905
|
+
listenersRef.current.delete(listener);
|
|
2906
|
+
};
|
|
2907
|
+
}, []);
|
|
2908
|
+
const broadcastCollapse = useCallback9((event) => {
|
|
2909
|
+
listenersRef.current.forEach((listener) => listener(event));
|
|
2910
|
+
}, []);
|
|
2911
|
+
const value = useMemo8(() => ({ broadcastCollapse, subscribe }), [broadcastCollapse, subscribe]);
|
|
2912
|
+
return /* @__PURE__ */ React39.createElement(ListBlocksUIContext.Provider, { value }, children);
|
|
2913
|
+
};
|
|
2914
|
+
var useListBlocksUI = () => {
|
|
2915
|
+
const ctx = useContext2(ListBlocksUIContext);
|
|
2916
|
+
if (!ctx) {
|
|
2917
|
+
throw new Error("useListBlocksUI must be used within a ListBlocksUIProvider");
|
|
2918
|
+
}
|
|
2919
|
+
return ctx;
|
|
2920
|
+
};
|
|
2921
|
+
|
|
2922
|
+
// src/mantine/blocks/list/flow/ListFlowView.tsx
|
|
2841
2923
|
var LIST_FLOW_PANEL_ID = "list-flow-panel";
|
|
2842
2924
|
var LIST_SELECTION_FLOW_PANEL_ID = "list-selection-flow-panel";
|
|
2843
2925
|
var ListFlowView = ({ block, editor }) => {
|
|
2844
2926
|
const { editable } = useBlocknoteContext();
|
|
2845
2927
|
const [data, setData] = useState6(null);
|
|
2846
2928
|
const [loading, setLoading] = useState6(false);
|
|
2929
|
+
const [opened, { toggle, open, close }] = useDisclosure(true);
|
|
2847
2930
|
const [error, setError] = useState6(null);
|
|
2848
2931
|
const [showErrorDetails, setShowErrorDetails] = useState6(false);
|
|
2849
2932
|
const [page, setPage] = useState6(1);
|
|
@@ -2851,13 +2934,14 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
2851
2934
|
const [totalPages, setTotalPages] = useState6(0);
|
|
2852
2935
|
const [selectedIds, setSelectedIds] = useState6(/* @__PURE__ */ new Set());
|
|
2853
2936
|
const panelId = `${LIST_FLOW_PANEL_ID}-${block.id}`;
|
|
2854
|
-
const panelContent =
|
|
2937
|
+
const panelContent = useMemo9(() => /* @__PURE__ */ React40.createElement(TemplateConfig2, { editor, block }), [editor, block]);
|
|
2855
2938
|
const { open: openPanel } = usePanel(panelId, panelContent);
|
|
2856
2939
|
const handlers = useBlocknoteHandlers();
|
|
2857
2940
|
const listType = block.props.listType && block.props.listType !== "" ? block.props.listType : null;
|
|
2941
|
+
const { subscribe } = useListBlocksUI();
|
|
2858
2942
|
const selectionPanelId = `${LIST_SELECTION_FLOW_PANEL_ID}-${block.id}`;
|
|
2859
|
-
const selectionPanelContent =
|
|
2860
|
-
() => /* @__PURE__ */
|
|
2943
|
+
const selectionPanelContent = useMemo9(
|
|
2944
|
+
() => /* @__PURE__ */ React40.createElement(ListSelectionPanel, { editor, block, selectedIds, listType }),
|
|
2861
2945
|
[editor, block, selectedIds, listType]
|
|
2862
2946
|
);
|
|
2863
2947
|
const { open: openSelectionPanel } = usePanel(selectionPanelId, selectionPanelContent);
|
|
@@ -2868,13 +2952,13 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
2868
2952
|
setSelectedIds(new Set(lastSelected ? [lastSelected] : []));
|
|
2869
2953
|
}
|
|
2870
2954
|
}, [selectionMode, selectedIds]);
|
|
2871
|
-
const isItemChecked =
|
|
2955
|
+
const isItemChecked = useCallback10(
|
|
2872
2956
|
(id) => {
|
|
2873
2957
|
return selectedIds.has(id);
|
|
2874
2958
|
},
|
|
2875
2959
|
[selectedIds]
|
|
2876
2960
|
);
|
|
2877
|
-
const onItemCheck =
|
|
2961
|
+
const onItemCheck = useCallback10(
|
|
2878
2962
|
(id, checked) => {
|
|
2879
2963
|
setSelectedIds((prev) => {
|
|
2880
2964
|
const nextSelectedIds = new Set(prev);
|
|
@@ -2895,7 +2979,7 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
2895
2979
|
},
|
|
2896
2980
|
[selectionMode]
|
|
2897
2981
|
);
|
|
2898
|
-
const listConfig =
|
|
2982
|
+
const listConfig = useMemo9(() => {
|
|
2899
2983
|
if (block.props.listConfig && block.props.listConfig !== "{}") {
|
|
2900
2984
|
try {
|
|
2901
2985
|
return JSON.parse(block.props.listConfig);
|
|
@@ -2906,7 +2990,7 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
2906
2990
|
}
|
|
2907
2991
|
return {};
|
|
2908
2992
|
}, [block.props.listConfig]);
|
|
2909
|
-
const listSortConfigOptions =
|
|
2993
|
+
const listSortConfigOptions = useMemo9(() => {
|
|
2910
2994
|
if (block.props.sortOptions && block.props.sortOptions !== "{}") {
|
|
2911
2995
|
try {
|
|
2912
2996
|
return JSON.parse(block.props.sortOptions);
|
|
@@ -2917,7 +3001,7 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
2917
3001
|
}
|
|
2918
3002
|
return {};
|
|
2919
3003
|
}, [block.props.sortOptions]);
|
|
2920
|
-
const listFilterConfigOptions =
|
|
3004
|
+
const listFilterConfigOptions = useMemo9(() => {
|
|
2921
3005
|
if (block.props.filterOptions && block.props.filterOptions !== "{}") {
|
|
2922
3006
|
try {
|
|
2923
3007
|
return JSON.parse(block.props.filterOptions);
|
|
@@ -2928,7 +3012,7 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
2928
3012
|
}
|
|
2929
3013
|
return {};
|
|
2930
3014
|
}, [block.props.filterOptions]);
|
|
2931
|
-
const listFilterConfig =
|
|
3015
|
+
const listFilterConfig = useMemo9(() => {
|
|
2932
3016
|
if (block.props.filter && block.props.filter !== "{}") {
|
|
2933
3017
|
try {
|
|
2934
3018
|
return JSON.parse(block.props.filter);
|
|
@@ -2939,7 +3023,7 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
2939
3023
|
}
|
|
2940
3024
|
return {};
|
|
2941
3025
|
}, [block.props.filter]);
|
|
2942
|
-
const listSortConfig =
|
|
3026
|
+
const listSortConfig = useMemo9(() => {
|
|
2943
3027
|
if (block.props.sort && block.props.sort !== "{}") {
|
|
2944
3028
|
try {
|
|
2945
3029
|
return JSON.parse(block.props.sort);
|
|
@@ -2950,6 +3034,14 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
2950
3034
|
}
|
|
2951
3035
|
return {};
|
|
2952
3036
|
}, [block.props.sort]);
|
|
3037
|
+
useEffect6(() => {
|
|
3038
|
+
const unsubscribe = subscribe((event) => {
|
|
3039
|
+
if (event === "collapse") close();
|
|
3040
|
+
else if (event === "expand") open();
|
|
3041
|
+
else toggle();
|
|
3042
|
+
});
|
|
3043
|
+
return unsubscribe;
|
|
3044
|
+
}, [subscribe, close, open, toggle]);
|
|
2953
3045
|
const updateProps = (props) => {
|
|
2954
3046
|
editor.updateBlock(block, {
|
|
2955
3047
|
props: {
|
|
@@ -2958,7 +3050,7 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
2958
3050
|
}
|
|
2959
3051
|
});
|
|
2960
3052
|
};
|
|
2961
|
-
const fetchData =
|
|
3053
|
+
const fetchData = useCallback10(async () => {
|
|
2962
3054
|
if (!handlers || !listType || !listConfig) return;
|
|
2963
3055
|
setLoading(true);
|
|
2964
3056
|
setError(null);
|
|
@@ -3087,11 +3179,11 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
3087
3179
|
}
|
|
3088
3180
|
updateProps({ sort: JSON.stringify(sortOption) });
|
|
3089
3181
|
};
|
|
3090
|
-
const sortedData =
|
|
3182
|
+
const sortedData = useMemo9(() => {
|
|
3091
3183
|
if (!data) return null;
|
|
3092
3184
|
return sortListItems(data, listSortConfig);
|
|
3093
3185
|
}, [data?.items, listSortConfig]);
|
|
3094
|
-
const filteredData =
|
|
3186
|
+
const filteredData = useMemo9(() => {
|
|
3095
3187
|
if (!listFilterConfig?.key) return sortedData;
|
|
3096
3188
|
if (!sortedData) return null;
|
|
3097
3189
|
return filterListItems(sortedData, listFilterConfig);
|
|
@@ -3100,44 +3192,44 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
3100
3192
|
if (!filteredData || !listType) return null;
|
|
3101
3193
|
switch (listType) {
|
|
3102
3194
|
case "linked_resources":
|
|
3103
|
-
return /* @__PURE__ */
|
|
3195
|
+
return /* @__PURE__ */ React40.createElement(LinkedResourcesList, { items: filteredData, config: listConfig, mods: selectionMode, isItemChecked, onItemCheck });
|
|
3104
3196
|
case "assets":
|
|
3105
|
-
return /* @__PURE__ */
|
|
3197
|
+
return /* @__PURE__ */ React40.createElement(AssetsList, { items: filteredData, config: listConfig, mods: selectionMode, isItemChecked, onItemCheck });
|
|
3106
3198
|
case "transactions":
|
|
3107
|
-
return /* @__PURE__ */
|
|
3199
|
+
return /* @__PURE__ */ React40.createElement(TransactionsList, { items: filteredData, config: listConfig, mods: selectionMode, isItemChecked, onItemCheck });
|
|
3108
3200
|
case "collections":
|
|
3109
|
-
return /* @__PURE__ */
|
|
3201
|
+
return /* @__PURE__ */ React40.createElement(CollectionsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
|
|
3110
3202
|
case "investments":
|
|
3111
|
-
return /* @__PURE__ */
|
|
3203
|
+
return /* @__PURE__ */ React40.createElement(InvestmentsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
|
|
3112
3204
|
case "oracles":
|
|
3113
|
-
return /* @__PURE__ */
|
|
3205
|
+
return /* @__PURE__ */ React40.createElement(OraclesList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
|
|
3114
3206
|
case "pods":
|
|
3115
|
-
return /* @__PURE__ */
|
|
3207
|
+
return /* @__PURE__ */ React40.createElement(PodsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
|
|
3116
3208
|
case "proposals":
|
|
3117
|
-
return /* @__PURE__ */
|
|
3209
|
+
return /* @__PURE__ */ React40.createElement(ProposalsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
|
|
3118
3210
|
case "requests":
|
|
3119
|
-
return /* @__PURE__ */
|
|
3211
|
+
return /* @__PURE__ */ React40.createElement(RequestsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
|
|
3120
3212
|
case "projects":
|
|
3121
|
-
return /* @__PURE__ */
|
|
3213
|
+
return /* @__PURE__ */ React40.createElement(ProjectsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
|
|
3122
3214
|
case "daos":
|
|
3123
|
-
return /* @__PURE__ */
|
|
3215
|
+
return /* @__PURE__ */ React40.createElement(DaosList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
|
|
3124
3216
|
case "group_members":
|
|
3125
|
-
return /* @__PURE__ */
|
|
3217
|
+
return /* @__PURE__ */ React40.createElement(MembersList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
|
|
3126
3218
|
case "dao_members":
|
|
3127
|
-
return /* @__PURE__ */
|
|
3219
|
+
return /* @__PURE__ */ React40.createElement(DaoMembersList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
|
|
3128
3220
|
case "validators":
|
|
3129
|
-
return /* @__PURE__ */
|
|
3221
|
+
return /* @__PURE__ */ React40.createElement(ValidatorsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
|
|
3130
3222
|
default:
|
|
3131
3223
|
return null;
|
|
3132
3224
|
}
|
|
3133
3225
|
};
|
|
3134
3226
|
if (!listType) {
|
|
3135
|
-
return /* @__PURE__ */
|
|
3227
|
+
return /* @__PURE__ */ React40.createElement(Center2, { py: "xl" }, /* @__PURE__ */ React40.createElement(Text26, { size: "sm", c: "dimmed" }, "List not configured"));
|
|
3136
3228
|
}
|
|
3137
|
-
return /* @__PURE__ */
|
|
3229
|
+
return /* @__PURE__ */ React40.createElement(Stack26, { w: "100%" }, /* @__PURE__ */ React40.createElement(Flex17, { px: 5, align: "center", justify: "space-between" }, /* @__PURE__ */ React40.createElement(Title4, { order: 4 }, getListNameByType(listType)), /* @__PURE__ */ React40.createElement(ActionIcon5, { variant: "subtle", size: "sm", onClick: toggle, "aria-label": opened ? "Collapse" : "Expand", title: opened ? "Collapse" : "Expand" }, opened ? /* @__PURE__ */ React40.createElement(IconChevronUp, { size: 18 }) : /* @__PURE__ */ React40.createElement(IconChevronDown, { size: 18 }))), /* @__PURE__ */ React40.createElement(Collapse, { pb: 5, px: 5, in: opened }, /* @__PURE__ */ React40.createElement(Stack26, { mih: totalPages !== 1 ? 500 : void 0, w: "100%" }, /* @__PURE__ */ React40.createElement(Flex17, { align: "center", gap: "xs" }, listSortConfig?.key && /* @__PURE__ */ React40.createElement(Flex17, { align: "center" }, /* @__PURE__ */ React40.createElement(Text26, { size: "xs" }, listSortConfig.key?.replace(/([A-Z])/g, " $1").replace(
|
|
3138
3230
|
/^./,
|
|
3139
3231
|
(str) => str.toUpperCase()
|
|
3140
|
-
), " "), /* @__PURE__ */
|
|
3232
|
+
), " "), /* @__PURE__ */ React40.createElement(Text26, { lh: 0.5 }, listSortConfig.direction === "asc" && /* @__PURE__ */ React40.createElement(IconArrowUp2, { size: 18 }), listSortConfig.direction === "desc" && /* @__PURE__ */ React40.createElement(IconArrowDown2, { size: 18 }))), selectionMode && /* @__PURE__ */ React40.createElement(Text26, { lh: 0.5 }, selectionMode === "single" ? "Single Selection" : "Multi Selection")), /* @__PURE__ */ React40.createElement(Flex17, { justify: "space-between" }, /* @__PURE__ */ React40.createElement(Flex17, { gap: "xs", align: "center" }, /* @__PURE__ */ React40.createElement(FilterTab, { key: "All", label: "All", isActive: !listFilterConfig?.key, onClick: () => handleFilterChange(null) }), Array.isArray(listFilterConfigOptions) && listFilterConfigOptions.length > 0 && listFilterConfigOptions.map(({ key, label, type }) => /* @__PURE__ */ React40.createElement(
|
|
3141
3233
|
FilterTab,
|
|
3142
3234
|
{
|
|
3143
3235
|
key: label,
|
|
@@ -3145,16 +3237,17 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
3145
3237
|
isActive: listFilterConfig?.key === key && listFilterConfig?.value === type,
|
|
3146
3238
|
onClick: () => handleFilterChange({ key, value: type })
|
|
3147
3239
|
}
|
|
3148
|
-
))), /* @__PURE__ */
|
|
3240
|
+
))), /* @__PURE__ */ React40.createElement(Flex17, { gap: "xs" }, /* @__PURE__ */ React40.createElement(ActionIcon5, { variant: "subtle", size: "sm", onClick: fetchData, loading }, /* @__PURE__ */ React40.createElement(IconRefresh, { size: 18 })), editable && /* @__PURE__ */ React40.createElement(ActionIcon5, { variant: "subtle", size: "sm", onClick: openPanel }, /* @__PURE__ */ React40.createElement(IconSettings, { size: 18 })), selectedIds.size > 0 && /* @__PURE__ */ React40.createElement(ActionIcon5, { variant: "subtle", size: "sm", onClick: openSelectionPanel }, /* @__PURE__ */ React40.createElement(IconArrowRight2, null)), listConfig && listSortConfigOptions && listSortConfigOptions?.length > 0 && /* @__PURE__ */ React40.createElement(
|
|
3149
3241
|
ListActionsMenu,
|
|
3150
3242
|
{
|
|
3151
3243
|
onSelectActionClick: (mode) => setSelectionMode(mode),
|
|
3152
3244
|
selectionMode,
|
|
3153
3245
|
options: listSortConfigOptions,
|
|
3154
3246
|
value: listSortConfig,
|
|
3155
|
-
onChange: (sortOption) => handleSortChange(sortOption)
|
|
3247
|
+
onChange: (sortOption) => handleSortChange(sortOption),
|
|
3248
|
+
onDownloadCsv: data?.items ? () => downloadArrayAsCsv(data.items) : void 0
|
|
3156
3249
|
}
|
|
3157
|
-
))), /* @__PURE__ */
|
|
3250
|
+
))), /* @__PURE__ */ React40.createElement(Flex17, { flex: 1 }, loading ? /* @__PURE__ */ React40.createElement(Center2, { py: "xl", w: "100%" }, /* @__PURE__ */ React40.createElement(Loader2, { size: "md", mx: "auto" })) : error ? /* @__PURE__ */ React40.createElement(Alert4, { color: "red", title: "Failed to load data", icon: /* @__PURE__ */ React40.createElement(IconAlertCircle, { size: 18 }) }, /* @__PURE__ */ React40.createElement(Stack26, { gap: "xs" }, /* @__PURE__ */ React40.createElement(Text26, { size: "sm" }, showErrorDetails ? error : "Unable to fetch list data"), /* @__PURE__ */ React40.createElement(Group7, { gap: "xs" }, /* @__PURE__ */ React40.createElement(Button5, { size: "xs", variant: "subtle", onClick: fetchData }, "Retry"), /* @__PURE__ */ React40.createElement(Button5, { size: "xs", variant: "subtle", onClick: () => setShowErrorDetails(!showErrorDetails) }, showErrorDetails ? "Hide" : "Show", " Details")))) : /* @__PURE__ */ React40.createElement(Stack26, { flex: 1 }, /* @__PURE__ */ React40.createElement(Stack26, { gap: "md" }, renderListComponent(), /* @__PURE__ */ React40.createElement(
|
|
3158
3251
|
ListPagination,
|
|
3159
3252
|
{
|
|
3160
3253
|
page,
|
|
@@ -3163,7 +3256,7 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
3163
3256
|
},
|
|
3164
3257
|
totalPages
|
|
3165
3258
|
}
|
|
3166
|
-
))));
|
|
3259
|
+
)))))));
|
|
3167
3260
|
};
|
|
3168
3261
|
|
|
3169
3262
|
// src/mantine/blocks/list/ListBlock.tsx
|
|
@@ -3172,9 +3265,9 @@ function ListBlock({ editor, block }) {
|
|
|
3172
3265
|
const listType = block.props.listType && block.props.listType !== "";
|
|
3173
3266
|
const isConfigured = listType;
|
|
3174
3267
|
if (editable && !isConfigured) {
|
|
3175
|
-
return /* @__PURE__ */
|
|
3268
|
+
return /* @__PURE__ */ React41.createElement(ListTemplateView, { editor, block });
|
|
3176
3269
|
}
|
|
3177
|
-
return /* @__PURE__ */
|
|
3270
|
+
return /* @__PURE__ */ React41.createElement(ListFlowView, { block, editor });
|
|
3178
3271
|
}
|
|
3179
3272
|
|
|
3180
3273
|
// src/mantine/blocks/list/ListBlockSpec.tsx
|
|
@@ -3209,16 +3302,16 @@ var ListBlockSpec = createReactBlockSpec2(
|
|
|
3209
3302
|
{
|
|
3210
3303
|
render: (props) => {
|
|
3211
3304
|
const ixoProps = props;
|
|
3212
|
-
return /* @__PURE__ */
|
|
3305
|
+
return /* @__PURE__ */ React42.createElement(ListBlock, { ...ixoProps });
|
|
3213
3306
|
}
|
|
3214
3307
|
}
|
|
3215
3308
|
);
|
|
3216
3309
|
|
|
3217
3310
|
// src/mantine/blocks/overview/OverviewBlock.tsx
|
|
3218
|
-
import
|
|
3311
|
+
import React43 from "react";
|
|
3219
3312
|
import { createReactBlockSpec as createReactBlockSpec3 } from "@blocknote/react";
|
|
3220
3313
|
var OverviewBlockContent = ({ block, editor }) => {
|
|
3221
|
-
return /* @__PURE__ */
|
|
3314
|
+
return /* @__PURE__ */ React43.createElement(
|
|
3222
3315
|
"div",
|
|
3223
3316
|
{
|
|
3224
3317
|
style: {
|
|
@@ -3230,7 +3323,7 @@ var OverviewBlockContent = ({ block, editor }) => {
|
|
|
3230
3323
|
border: "1px solid #e5e7eb"
|
|
3231
3324
|
}
|
|
3232
3325
|
},
|
|
3233
|
-
/* @__PURE__ */
|
|
3326
|
+
/* @__PURE__ */ React43.createElement("div", { style: { marginBottom: "12px" } }, /* @__PURE__ */ React43.createElement(
|
|
3234
3327
|
"input",
|
|
3235
3328
|
{
|
|
3236
3329
|
type: "text",
|
|
@@ -3256,7 +3349,7 @@ var OverviewBlockContent = ({ block, editor }) => {
|
|
|
3256
3349
|
}
|
|
3257
3350
|
}
|
|
3258
3351
|
)),
|
|
3259
|
-
/* @__PURE__ */
|
|
3352
|
+
/* @__PURE__ */ React43.createElement("div", { style: { minHeight: "40px", color: "#6b7280" } }, block.props.did ? /* @__PURE__ */ React43.createElement("p", null, "Loading overview for DID: ", block.props.did) : /* @__PURE__ */ React43.createElement("p", null, "Enter a DID to load overview data"))
|
|
3260
3353
|
);
|
|
3261
3354
|
};
|
|
3262
3355
|
var OverviewBlock = createReactBlockSpec3(
|
|
@@ -3270,7 +3363,7 @@ var OverviewBlock = createReactBlockSpec3(
|
|
|
3270
3363
|
content: "none"
|
|
3271
3364
|
},
|
|
3272
3365
|
{
|
|
3273
|
-
render: (props) => /* @__PURE__ */
|
|
3366
|
+
render: (props) => /* @__PURE__ */ React43.createElement(OverviewBlockContent, { ...props })
|
|
3274
3367
|
}
|
|
3275
3368
|
);
|
|
3276
3369
|
|
|
@@ -3297,7 +3390,7 @@ var ValidatorActionType = /* @__PURE__ */ ((ValidatorActionType2) => {
|
|
|
3297
3390
|
})(ValidatorActionType || {});
|
|
3298
3391
|
|
|
3299
3392
|
// src/mantine/context/hooks/useSharedProposal.ts
|
|
3300
|
-
import { useState as useState7, useEffect as useEffect7, useCallback as
|
|
3393
|
+
import { useState as useState7, useEffect as useEffect7, useCallback as useCallback11 } from "react";
|
|
3301
3394
|
var useSharedProposal = ({ proposalId, contractAddress, autoFetch = true }) => {
|
|
3302
3395
|
const { sharedProposals, fetchSharedProposal, invalidateProposal, subscribeToProposal } = useBlocknoteContext();
|
|
3303
3396
|
const [localProposal, setLocalProposal] = useState7(null);
|
|
@@ -3314,8 +3407,8 @@ var useSharedProposal = ({ proposalId, contractAddress, autoFetch = true }) => {
|
|
|
3314
3407
|
setLocalProposal(proposal);
|
|
3315
3408
|
}
|
|
3316
3409
|
}, [subscribeToProposal, cacheKey]);
|
|
3317
|
-
const refetch =
|
|
3318
|
-
const invalidate =
|
|
3410
|
+
const refetch = useCallback11(() => fetchSharedProposal(proposalId, contractAddress, true), [fetchSharedProposal, proposalId, contractAddress]);
|
|
3411
|
+
const invalidate = useCallback11(() => invalidateProposal(proposalId), [invalidateProposal, proposalId]);
|
|
3319
3412
|
return {
|
|
3320
3413
|
proposal: localProposal,
|
|
3321
3414
|
loading: sharedProposals[cacheKey]?.loading ?? false,
|
|
@@ -3326,21 +3419,21 @@ var useSharedProposal = ({ proposalId, contractAddress, autoFetch = true }) => {
|
|
|
3326
3419
|
};
|
|
3327
3420
|
|
|
3328
3421
|
// src/mantine/blocks/proposal/ProposalBlockSpec.tsx
|
|
3329
|
-
import
|
|
3422
|
+
import React87 from "react";
|
|
3330
3423
|
import { createReactBlockSpec as createReactBlockSpec4 } from "@blocknote/react";
|
|
3331
3424
|
|
|
3332
3425
|
// src/mantine/blocks/proposal/ProposalBlock.tsx
|
|
3333
|
-
import
|
|
3426
|
+
import React86 from "react";
|
|
3334
3427
|
|
|
3335
3428
|
// src/mantine/blocks/proposal/template/TemplateView.tsx
|
|
3336
|
-
import
|
|
3429
|
+
import React80, { useMemo as useMemo11 } from "react";
|
|
3337
3430
|
|
|
3338
3431
|
// src/mantine/blocks/proposal/template/TemplateConfig.tsx
|
|
3339
|
-
import
|
|
3340
|
-
import { Paper as Paper6, CloseButton as CloseButton4, Title as
|
|
3432
|
+
import React79, { useCallback as useCallback13 } from "react";
|
|
3433
|
+
import { Paper as Paper6, CloseButton as CloseButton4, Title as Title5 } from "@mantine/core";
|
|
3341
3434
|
|
|
3342
3435
|
// src/mantine/blocks/proposal/template/GeneralTab.tsx
|
|
3343
|
-
import
|
|
3436
|
+
import React44, { useEffect as useEffect8, useState as useState8 } from "react";
|
|
3344
3437
|
import { Stack as Stack27, Text as Text27, TextInput as TextInput5, Textarea as Textarea2, Select as Select3, Loader as Loader3 } from "@mantine/core";
|
|
3345
3438
|
var GeneralTab3 = ({ title, description, coreAddress, onTitleChange, onDescriptionChange, onGroupChange }) => {
|
|
3346
3439
|
const handlers = useBlocknoteHandlers();
|
|
@@ -3372,7 +3465,7 @@ var GeneralTab3 = ({ title, description, coreAddress, onTitleChange, onDescripti
|
|
|
3372
3465
|
};
|
|
3373
3466
|
fetchGroups();
|
|
3374
3467
|
}, [handlers]);
|
|
3375
|
-
return /* @__PURE__ */
|
|
3468
|
+
return /* @__PURE__ */ React44.createElement(Stack27, { gap: "lg" }, /* @__PURE__ */ React44.createElement(Stack27, { gap: "xs" }, /* @__PURE__ */ React44.createElement(Text27, { size: "sm", fw: 600 }, "Title"), /* @__PURE__ */ React44.createElement(
|
|
3376
3469
|
TextInput5,
|
|
3377
3470
|
{
|
|
3378
3471
|
placeholder: "e.g. Proposal Title",
|
|
@@ -3383,7 +3476,7 @@ var GeneralTab3 = ({ title, description, coreAddress, onTitleChange, onDescripti
|
|
|
3383
3476
|
onTitleChange(newTitle);
|
|
3384
3477
|
}
|
|
3385
3478
|
}
|
|
3386
|
-
)), /* @__PURE__ */
|
|
3479
|
+
)), /* @__PURE__ */ React44.createElement(Stack27, { gap: "xs" }, /* @__PURE__ */ React44.createElement(Text27, { size: "sm", fw: 600 }, "Description"), /* @__PURE__ */ React44.createElement(
|
|
3387
3480
|
Textarea2,
|
|
3388
3481
|
{
|
|
3389
3482
|
placeholder: "Describe what this proposal is about",
|
|
@@ -3395,7 +3488,7 @@ var GeneralTab3 = ({ title, description, coreAddress, onTitleChange, onDescripti
|
|
|
3395
3488
|
onDescriptionChange(newDescription);
|
|
3396
3489
|
}
|
|
3397
3490
|
}
|
|
3398
|
-
)), /* @__PURE__ */
|
|
3491
|
+
)), /* @__PURE__ */ React44.createElement(Stack27, { gap: "xs" }, /* @__PURE__ */ React44.createElement(Text27, { size: "sm", fw: 600 }, "Group"), /* @__PURE__ */ React44.createElement(
|
|
3399
3492
|
Select3,
|
|
3400
3493
|
{
|
|
3401
3494
|
placeholder: loadingGroups ? "Loading groups..." : "Select a DAO group",
|
|
@@ -3413,19 +3506,19 @@ var GeneralTab3 = ({ title, description, coreAddress, onTitleChange, onDescripti
|
|
|
3413
3506
|
label: group.name
|
|
3414
3507
|
})),
|
|
3415
3508
|
disabled: loadingGroups,
|
|
3416
|
-
rightSection: loadingGroups ? /* @__PURE__ */
|
|
3509
|
+
rightSection: loadingGroups ? /* @__PURE__ */ React44.createElement(Loader3, { size: "xs" }) : void 0,
|
|
3417
3510
|
searchable: true
|
|
3418
3511
|
}
|
|
3419
3512
|
)));
|
|
3420
3513
|
};
|
|
3421
3514
|
|
|
3422
3515
|
// src/mantine/blocks/proposal/template/ActionsTab.tsx
|
|
3423
|
-
import
|
|
3516
|
+
import React77, { useCallback as useCallback12, useEffect as useEffect11, useState as useState16 } from "react";
|
|
3424
3517
|
import { Card as Card13, Stack as Stack60 } from "@mantine/core";
|
|
3425
3518
|
|
|
3426
3519
|
// src/mantine/blocks/proposal/actions-components/ActionsCard.tsx
|
|
3427
|
-
import
|
|
3428
|
-
import { Card as Card6, Group as Group8, Text as Text28, Badge as Badge5, Stack as Stack28, ActionIcon as
|
|
3520
|
+
import React45 from "react";
|
|
3521
|
+
import { Card as Card6, Group as Group8, Text as Text28, Badge as Badge5, Stack as Stack28, ActionIcon as ActionIcon6, ScrollArea } from "@mantine/core";
|
|
3429
3522
|
var getActionSummary = (action) => {
|
|
3430
3523
|
switch (action.type) {
|
|
3431
3524
|
case "Spend":
|
|
@@ -3457,7 +3550,7 @@ var ActionsCard = ({ actions, isSelected, onClick, onEditAction, onRemoveAction,
|
|
|
3457
3550
|
}
|
|
3458
3551
|
onClick();
|
|
3459
3552
|
};
|
|
3460
|
-
return /* @__PURE__ */
|
|
3553
|
+
return /* @__PURE__ */ React45.createElement(
|
|
3461
3554
|
Card6,
|
|
3462
3555
|
{
|
|
3463
3556
|
shadow: "sm",
|
|
@@ -3474,7 +3567,7 @@ var ActionsCard = ({ actions, isSelected, onClick, onEditAction, onRemoveAction,
|
|
|
3474
3567
|
},
|
|
3475
3568
|
onClick: handleCardClick
|
|
3476
3569
|
},
|
|
3477
|
-
/* @__PURE__ */
|
|
3570
|
+
/* @__PURE__ */ React45.createElement(Group8, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React45.createElement(Stack28, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React45.createElement(Text28, { size: "md", fw: 600, style: { color: "#f1f3f5" } }, "Proposal Actions (", actions.length, ")"), actions.length === 0 ? /* @__PURE__ */ React45.createElement(Text28, { size: "sm", style: { color: "#868e96" } }, "No actions added yet.") : /* @__PURE__ */ React45.createElement(ScrollArea, { h: actions.length > 3 ? 150 : void 0, style: { marginTop: 8 } }, /* @__PURE__ */ React45.createElement(Stack28, { gap: "xs" }, actions.map((action, index) => /* @__PURE__ */ React45.createElement(
|
|
3478
3571
|
Card6,
|
|
3479
3572
|
{
|
|
3480
3573
|
key: index,
|
|
@@ -3485,7 +3578,7 @@ var ActionsCard = ({ actions, isSelected, onClick, onEditAction, onRemoveAction,
|
|
|
3485
3578
|
borderColor: "#333"
|
|
3486
3579
|
}
|
|
3487
3580
|
},
|
|
3488
|
-
/* @__PURE__ */
|
|
3581
|
+
/* @__PURE__ */ React45.createElement(Group8, { justify: "space-between", align: "center" }, /* @__PURE__ */ React45.createElement(Group8, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React45.createElement(
|
|
3489
3582
|
Badge5,
|
|
3490
3583
|
{
|
|
3491
3584
|
size: "sm",
|
|
@@ -3496,8 +3589,8 @@ var ActionsCard = ({ actions, isSelected, onClick, onEditAction, onRemoveAction,
|
|
|
3496
3589
|
}
|
|
3497
3590
|
},
|
|
3498
3591
|
action.type
|
|
3499
|
-
), /* @__PURE__ */
|
|
3500
|
-
|
|
3592
|
+
), /* @__PURE__ */ React45.createElement(Text28, { size: "sm", style: { color: "#adb5bd" } }, getActionSummary(action))), !disabled && /* @__PURE__ */ React45.createElement(Group8, { gap: 4 }, /* @__PURE__ */ React45.createElement(
|
|
3593
|
+
ActionIcon6,
|
|
3501
3594
|
{
|
|
3502
3595
|
size: "sm",
|
|
3503
3596
|
variant: "subtle",
|
|
@@ -3509,8 +3602,8 @@ var ActionsCard = ({ actions, isSelected, onClick, onEditAction, onRemoveAction,
|
|
|
3509
3602
|
style: { color: "#4dabf7" }
|
|
3510
3603
|
},
|
|
3511
3604
|
"\u270F\uFE0F"
|
|
3512
|
-
), /* @__PURE__ */
|
|
3513
|
-
|
|
3605
|
+
), /* @__PURE__ */ React45.createElement(
|
|
3606
|
+
ActionIcon6,
|
|
3514
3607
|
{
|
|
3515
3608
|
size: "sm",
|
|
3516
3609
|
variant: "subtle",
|
|
@@ -3528,14 +3621,14 @@ var ActionsCard = ({ actions, isSelected, onClick, onEditAction, onRemoveAction,
|
|
|
3528
3621
|
};
|
|
3529
3622
|
|
|
3530
3623
|
// src/mantine/blocks/proposal/ActionsPanel.tsx
|
|
3531
|
-
import
|
|
3624
|
+
import React76, { useState as useState15, useEffect as useEffect10, useMemo as useMemo10 } from "react";
|
|
3532
3625
|
import { Stack as Stack59, Button as Button11, Group as Group19, Text as Text36, Card as Card12, Badge as Badge8, Divider as Divider4, ScrollArea as ScrollArea3, Alert as Alert7, Tabs as Tabs2, SimpleGrid, Paper as Paper5 } from "@mantine/core";
|
|
3533
3626
|
|
|
3534
3627
|
// src/mantine/blocks/proposal/actions-components/SpendActionForm.tsx
|
|
3535
|
-
import
|
|
3628
|
+
import React46 from "react";
|
|
3536
3629
|
import { TextInput as TextInput6, Stack as Stack29 } from "@mantine/core";
|
|
3537
3630
|
var SpendActionForm = ({ data, onChange }) => {
|
|
3538
|
-
return /* @__PURE__ */
|
|
3631
|
+
return /* @__PURE__ */ React46.createElement(Stack29, null, /* @__PURE__ */ React46.createElement(
|
|
3539
3632
|
TextInput6,
|
|
3540
3633
|
{
|
|
3541
3634
|
label: "Recipient Address",
|
|
@@ -3555,7 +3648,7 @@ var SpendActionForm = ({ data, onChange }) => {
|
|
|
3555
3648
|
}
|
|
3556
3649
|
}
|
|
3557
3650
|
}
|
|
3558
|
-
), /* @__PURE__ */
|
|
3651
|
+
), /* @__PURE__ */ React46.createElement(
|
|
3559
3652
|
TextInput6,
|
|
3560
3653
|
{
|
|
3561
3654
|
label: "Denomination",
|
|
@@ -3575,7 +3668,7 @@ var SpendActionForm = ({ data, onChange }) => {
|
|
|
3575
3668
|
}
|
|
3576
3669
|
}
|
|
3577
3670
|
}
|
|
3578
|
-
), /* @__PURE__ */
|
|
3671
|
+
), /* @__PURE__ */ React46.createElement(
|
|
3579
3672
|
TextInput6,
|
|
3580
3673
|
{
|
|
3581
3674
|
label: "Amount",
|
|
@@ -3599,8 +3692,8 @@ var SpendActionForm = ({ data, onChange }) => {
|
|
|
3599
3692
|
};
|
|
3600
3693
|
|
|
3601
3694
|
// src/mantine/blocks/proposal/actions-components/UpdateMembersActionForm.tsx
|
|
3602
|
-
import
|
|
3603
|
-
import { Stack as Stack30, TextInput as TextInput7, NumberInput as NumberInput2, Button as Button6, Group as Group9, Text as Text29, Card as Card7, Badge as Badge6, ActionIcon as
|
|
3695
|
+
import React47, { useState as useState9 } from "react";
|
|
3696
|
+
import { Stack as Stack30, TextInput as TextInput7, NumberInput as NumberInput2, Button as Button6, Group as Group9, Text as Text29, Card as Card7, Badge as Badge6, ActionIcon as ActionIcon7, Divider as Divider3, ScrollArea as ScrollArea2 } from "@mantine/core";
|
|
3604
3697
|
var UpdateMembersActionForm = ({ data, onChange }) => {
|
|
3605
3698
|
const [newMember, setNewMember] = useState9({ addr: "", weight: 1 });
|
|
3606
3699
|
const [newRemoveAddress, setNewRemoveAddress] = useState9("");
|
|
@@ -3643,7 +3736,7 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
|
|
|
3643
3736
|
}
|
|
3644
3737
|
}
|
|
3645
3738
|
};
|
|
3646
|
-
return /* @__PURE__ */
|
|
3739
|
+
return /* @__PURE__ */ React47.createElement(Stack30, null, /* @__PURE__ */ React47.createElement(Stack30, { gap: "xs" }, /* @__PURE__ */ React47.createElement(Text29, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Members to Add"), /* @__PURE__ */ React47.createElement(ScrollArea2, { h: 150 }, /* @__PURE__ */ React47.createElement(Stack30, { gap: "xs" }, (data.add || []).map((member, index) => /* @__PURE__ */ React47.createElement(
|
|
3647
3740
|
Card7,
|
|
3648
3741
|
{
|
|
3649
3742
|
key: index,
|
|
@@ -3654,7 +3747,7 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
|
|
|
3654
3747
|
borderColor: "#333"
|
|
3655
3748
|
}
|
|
3656
3749
|
},
|
|
3657
|
-
/* @__PURE__ */
|
|
3750
|
+
/* @__PURE__ */ React47.createElement(Group9, { justify: "space-between" }, /* @__PURE__ */ React47.createElement("div", null, /* @__PURE__ */ React47.createElement(Text29, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, member.addr.slice(0, 20), "..."), /* @__PURE__ */ React47.createElement(
|
|
3658
3751
|
Badge6,
|
|
3659
3752
|
{
|
|
3660
3753
|
size: "sm",
|
|
@@ -3665,8 +3758,8 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
|
|
|
3665
3758
|
},
|
|
3666
3759
|
"Weight: ",
|
|
3667
3760
|
member.weight
|
|
3668
|
-
)), /* @__PURE__ */
|
|
3669
|
-
)))), /* @__PURE__ */
|
|
3761
|
+
)), /* @__PURE__ */ React47.createElement(ActionIcon7, { size: "sm", variant: "subtle", onClick: () => handleRemoveMember(index), style: { color: "#ff6b6b" } }, "\u{1F5D1}\uFE0F"))
|
|
3762
|
+
)))), /* @__PURE__ */ React47.createElement(Group9, { grow: true }, /* @__PURE__ */ React47.createElement(TextInput7, { placeholder: "Member address", value: newMember.addr, onChange: (e) => setNewMember({ ...newMember, addr: e.currentTarget.value }), styles: inputStyles29 }), /* @__PURE__ */ React47.createElement(
|
|
3670
3763
|
NumberInput2,
|
|
3671
3764
|
{
|
|
3672
3765
|
placeholder: "Weight",
|
|
@@ -3675,7 +3768,7 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
|
|
|
3675
3768
|
min: 1,
|
|
3676
3769
|
styles: inputStyles29
|
|
3677
3770
|
}
|
|
3678
|
-
), /* @__PURE__ */
|
|
3771
|
+
), /* @__PURE__ */ React47.createElement(
|
|
3679
3772
|
Button6,
|
|
3680
3773
|
{
|
|
3681
3774
|
size: "sm",
|
|
@@ -3688,7 +3781,7 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
|
|
|
3688
3781
|
}
|
|
3689
3782
|
},
|
|
3690
3783
|
"\u2795 Add"
|
|
3691
|
-
))), /* @__PURE__ */
|
|
3784
|
+
))), /* @__PURE__ */ React47.createElement(Divider3, { color: "#333" }), /* @__PURE__ */ React47.createElement(Stack30, { gap: "xs" }, /* @__PURE__ */ React47.createElement(Text29, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Members to Remove"), /* @__PURE__ */ React47.createElement(ScrollArea2, { h: 100 }, /* @__PURE__ */ React47.createElement(Stack30, { gap: "xs" }, (data.remove || []).map((item, index) => /* @__PURE__ */ React47.createElement(
|
|
3692
3785
|
Card7,
|
|
3693
3786
|
{
|
|
3694
3787
|
key: index,
|
|
@@ -3699,8 +3792,8 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
|
|
|
3699
3792
|
borderColor: "#333"
|
|
3700
3793
|
}
|
|
3701
3794
|
},
|
|
3702
|
-
/* @__PURE__ */
|
|
3703
|
-
)))), /* @__PURE__ */
|
|
3795
|
+
/* @__PURE__ */ React47.createElement(Group9, { justify: "space-between" }, /* @__PURE__ */ React47.createElement(Text29, { size: "sm", style: { color: "#adb5bd" } }, item.addr.slice(0, 30), "..."), /* @__PURE__ */ React47.createElement(ActionIcon7, { size: "sm", variant: "subtle", onClick: () => handleRemoveRemoveAddress(index), style: { color: "#ff6b6b" } }, "\u{1F5D1}\uFE0F"))
|
|
3796
|
+
)))), /* @__PURE__ */ React47.createElement(Group9, { grow: true }, /* @__PURE__ */ React47.createElement(TextInput7, { placeholder: "Address to remove", value: newRemoveAddress, onChange: (e) => setNewRemoveAddress(e.currentTarget.value), styles: inputStyles29 }), /* @__PURE__ */ React47.createElement(
|
|
3704
3797
|
Button6,
|
|
3705
3798
|
{
|
|
3706
3799
|
size: "sm",
|
|
@@ -3717,7 +3810,7 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
|
|
|
3717
3810
|
};
|
|
3718
3811
|
|
|
3719
3812
|
// src/mantine/blocks/proposal/actions-components/StakeActionForm.tsx
|
|
3720
|
-
import
|
|
3813
|
+
import React48 from "react";
|
|
3721
3814
|
import { Stack as Stack31, TextInput as TextInput8, Select as Select4, NumberInput as NumberInput3 } from "@mantine/core";
|
|
3722
3815
|
var stakeTypeOptions = [
|
|
3723
3816
|
{ value: StakeType.Delegate, label: "Delegate" },
|
|
@@ -3763,7 +3856,7 @@ var selectStyles = {
|
|
|
3763
3856
|
var StakeActionForm = ({ data, onChange }) => {
|
|
3764
3857
|
const isRedelegate = data.stakeType === StakeType.Redelegate;
|
|
3765
3858
|
const needsAmount = data.stakeType !== StakeType.WithdrawDelegatorReward;
|
|
3766
|
-
return /* @__PURE__ */
|
|
3859
|
+
return /* @__PURE__ */ React48.createElement(Stack31, { gap: "md" }, /* @__PURE__ */ React48.createElement(
|
|
3767
3860
|
Select4,
|
|
3768
3861
|
{
|
|
3769
3862
|
label: "Stake Type",
|
|
@@ -3773,7 +3866,7 @@ var StakeActionForm = ({ data, onChange }) => {
|
|
|
3773
3866
|
required: true,
|
|
3774
3867
|
styles: selectStyles
|
|
3775
3868
|
}
|
|
3776
|
-
), /* @__PURE__ */
|
|
3869
|
+
), /* @__PURE__ */ React48.createElement(
|
|
3777
3870
|
TextInput8,
|
|
3778
3871
|
{
|
|
3779
3872
|
label: "Validator Address",
|
|
@@ -3783,7 +3876,7 @@ var StakeActionForm = ({ data, onChange }) => {
|
|
|
3783
3876
|
required: true,
|
|
3784
3877
|
styles: inputStyles
|
|
3785
3878
|
}
|
|
3786
|
-
), isRedelegate && /* @__PURE__ */
|
|
3879
|
+
), isRedelegate && /* @__PURE__ */ React48.createElement(
|
|
3787
3880
|
TextInput8,
|
|
3788
3881
|
{
|
|
3789
3882
|
label: "Destination Validator Address",
|
|
@@ -3793,7 +3886,7 @@ var StakeActionForm = ({ data, onChange }) => {
|
|
|
3793
3886
|
required: true,
|
|
3794
3887
|
styles: inputStyles
|
|
3795
3888
|
}
|
|
3796
|
-
), needsAmount && /* @__PURE__ */
|
|
3889
|
+
), needsAmount && /* @__PURE__ */ React48.createElement(React48.Fragment, null, /* @__PURE__ */ React48.createElement(
|
|
3797
3890
|
NumberInput3,
|
|
3798
3891
|
{
|
|
3799
3892
|
label: "Amount",
|
|
@@ -3805,7 +3898,7 @@ var StakeActionForm = ({ data, onChange }) => {
|
|
|
3805
3898
|
required: true,
|
|
3806
3899
|
styles: inputStyles
|
|
3807
3900
|
}
|
|
3808
|
-
), /* @__PURE__ */
|
|
3901
|
+
), /* @__PURE__ */ React48.createElement(
|
|
3809
3902
|
Select4,
|
|
3810
3903
|
{
|
|
3811
3904
|
label: "Denomination",
|
|
@@ -3822,7 +3915,7 @@ var StakeActionForm = ({ data, onChange }) => {
|
|
|
3822
3915
|
};
|
|
3823
3916
|
|
|
3824
3917
|
// src/mantine/blocks/proposal/actions-components/JoinActionForm.tsx
|
|
3825
|
-
import
|
|
3918
|
+
import React49 from "react";
|
|
3826
3919
|
import { Stack as Stack32, TextInput as TextInput9 } from "@mantine/core";
|
|
3827
3920
|
var inputStyles2 = {
|
|
3828
3921
|
label: { color: "#adb5bd" },
|
|
@@ -3836,7 +3929,7 @@ var inputStyles2 = {
|
|
|
3836
3929
|
}
|
|
3837
3930
|
};
|
|
3838
3931
|
var JoinActionForm = ({ data, onChange }) => {
|
|
3839
|
-
return /* @__PURE__ */
|
|
3932
|
+
return /* @__PURE__ */ React49.createElement(Stack32, { gap: "md" }, /* @__PURE__ */ React49.createElement(TextInput9, { label: "ID", placeholder: "did:ixo:entity:abc123...", value: data.id, onChange: (e) => onChange({ ...data, id: e.target.value }), required: true, styles: inputStyles2 }), /* @__PURE__ */ React49.createElement(
|
|
3840
3933
|
TextInput9,
|
|
3841
3934
|
{
|
|
3842
3935
|
label: "Core Address",
|
|
@@ -3846,11 +3939,11 @@ var JoinActionForm = ({ data, onChange }) => {
|
|
|
3846
3939
|
required: true,
|
|
3847
3940
|
styles: inputStyles2
|
|
3848
3941
|
}
|
|
3849
|
-
), /* @__PURE__ */
|
|
3942
|
+
), /* @__PURE__ */ React49.createElement(TextInput9, { label: "Address", placeholder: "ixo1...", value: data.address, onChange: (e) => onChange({ ...data, address: e.target.value }), required: true, styles: inputStyles2 }));
|
|
3850
3943
|
};
|
|
3851
3944
|
|
|
3852
3945
|
// src/mantine/blocks/proposal/actions-components/forms/MintActionForm.tsx
|
|
3853
|
-
import
|
|
3946
|
+
import React50 from "react";
|
|
3854
3947
|
import { Stack as Stack33, TextInput as TextInput10, NumberInput as NumberInput4 } from "@mantine/core";
|
|
3855
3948
|
var inputStyles3 = {
|
|
3856
3949
|
label: { color: "#adb5bd" },
|
|
@@ -3864,7 +3957,7 @@ var inputStyles3 = {
|
|
|
3864
3957
|
}
|
|
3865
3958
|
};
|
|
3866
3959
|
var MintActionForm = ({ data, onChange }) => {
|
|
3867
|
-
return /* @__PURE__ */
|
|
3960
|
+
return /* @__PURE__ */ React50.createElement(Stack33, { gap: "md" }, /* @__PURE__ */ React50.createElement(TextInput10, { label: "Recipient Address", placeholder: "ixo1...", value: data.to, onChange: (e) => onChange({ ...data, to: e.currentTarget.value }), required: true, styles: inputStyles3 }), /* @__PURE__ */ React50.createElement(
|
|
3868
3961
|
NumberInput4,
|
|
3869
3962
|
{
|
|
3870
3963
|
label: "Amount",
|
|
@@ -3880,7 +3973,7 @@ var MintActionForm = ({ data, onChange }) => {
|
|
|
3880
3973
|
};
|
|
3881
3974
|
|
|
3882
3975
|
// src/mantine/blocks/proposal/actions-components/forms/ExecuteActionForm.tsx
|
|
3883
|
-
import
|
|
3976
|
+
import React51, { useState as useState10 } from "react";
|
|
3884
3977
|
import { Stack as Stack34, TextInput as TextInput11, Textarea as Textarea3, Button as Button7, Group as Group10, Text as Text30, Card as Card8 } from "@mantine/core";
|
|
3885
3978
|
var inputStyles4 = {
|
|
3886
3979
|
label: { color: "#adb5bd" },
|
|
@@ -3918,7 +4011,7 @@ var ExecuteActionForm = ({ data, onChange }) => {
|
|
|
3918
4011
|
return data.message;
|
|
3919
4012
|
}
|
|
3920
4013
|
};
|
|
3921
|
-
return /* @__PURE__ */
|
|
4014
|
+
return /* @__PURE__ */ React51.createElement(Stack34, { gap: "md" }, /* @__PURE__ */ React51.createElement(
|
|
3922
4015
|
TextInput11,
|
|
3923
4016
|
{
|
|
3924
4017
|
label: "Contract Address",
|
|
@@ -3928,7 +4021,7 @@ var ExecuteActionForm = ({ data, onChange }) => {
|
|
|
3928
4021
|
required: true,
|
|
3929
4022
|
styles: inputStyles4
|
|
3930
4023
|
}
|
|
3931
|
-
), /* @__PURE__ */
|
|
4024
|
+
), /* @__PURE__ */ React51.createElement(
|
|
3932
4025
|
Textarea3,
|
|
3933
4026
|
{
|
|
3934
4027
|
label: "Message (JSON)",
|
|
@@ -3939,7 +4032,7 @@ var ExecuteActionForm = ({ data, onChange }) => {
|
|
|
3939
4032
|
required: true,
|
|
3940
4033
|
styles: inputStyles4
|
|
3941
4034
|
}
|
|
3942
|
-
), /* @__PURE__ */
|
|
4035
|
+
), /* @__PURE__ */ React51.createElement(Stack34, { gap: "xs" }, /* @__PURE__ */ React51.createElement(Text30, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Funds (Optional)"), (data.funds || []).map((fund, index) => /* @__PURE__ */ React51.createElement(Card8, { key: index, withBorder: true, padding: "xs", style: { backgroundColor: "#2a2a2a", borderColor: "#333" } }, /* @__PURE__ */ React51.createElement(Group10, { justify: "space-between" }, /* @__PURE__ */ React51.createElement(Text30, { size: "sm", style: { color: "#f1f3f5" } }, fund.amount, " ", fund.denom), /* @__PURE__ */ React51.createElement(Button7, { size: "xs", variant: "subtle", onClick: () => handleRemoveFund(index), style: { color: "#ff6b6b" } }, "Remove")))), /* @__PURE__ */ React51.createElement(Group10, { grow: true }, /* @__PURE__ */ React51.createElement(TextInput11, { placeholder: "Amount", value: newFund.amount, onChange: (e) => setNewFund({ ...newFund, amount: e.currentTarget.value }), styles: inputStyles4 }), /* @__PURE__ */ React51.createElement(TextInput11, { placeholder: "Denom (e.g., uixo)", value: newFund.denom, onChange: (e) => setNewFund({ ...newFund, denom: e.currentTarget.value }), styles: inputStyles4 }), /* @__PURE__ */ React51.createElement(
|
|
3943
4036
|
Button7,
|
|
3944
4037
|
{
|
|
3945
4038
|
size: "sm",
|
|
@@ -3954,7 +4047,7 @@ var ExecuteActionForm = ({ data, onChange }) => {
|
|
|
3954
4047
|
};
|
|
3955
4048
|
|
|
3956
4049
|
// src/mantine/blocks/proposal/actions-components/forms/CustomActionForm.tsx
|
|
3957
|
-
import
|
|
4050
|
+
import React52, { useState as useState11, useEffect as useEffect9 } from "react";
|
|
3958
4051
|
import { Stack as Stack35, Textarea as Textarea4, Alert as Alert5, Text as Text31, Badge as Badge7 } from "@mantine/core";
|
|
3959
4052
|
import { Group as Group11 } from "@mantine/core";
|
|
3960
4053
|
var inputStyles5 = {
|
|
@@ -3992,7 +4085,7 @@ var CustomActionForm = ({ data, onChange }) => {
|
|
|
3992
4085
|
return data.message;
|
|
3993
4086
|
}
|
|
3994
4087
|
};
|
|
3995
|
-
return /* @__PURE__ */
|
|
4088
|
+
return /* @__PURE__ */ React52.createElement(Stack35, { gap: "md" }, /* @__PURE__ */ React52.createElement(Alert5, { color: "yellow", style: { backgroundColor: "#2a2a2a", borderColor: "#ffd43b" } }, /* @__PURE__ */ React52.createElement(Text31, { size: "sm", style: { color: "#ffd43b" } }, "\u26A0\uFE0F Custom actions require valid JSON messages. Supports both Wasm and Stargate message formats.")), /* @__PURE__ */ React52.createElement("div", null, /* @__PURE__ */ React52.createElement(Group11, { gap: "xs", mb: "xs" }, /* @__PURE__ */ React52.createElement(Text31, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Custom Message (JSON)"), /* @__PURE__ */ React52.createElement(
|
|
3996
4089
|
Badge7,
|
|
3997
4090
|
{
|
|
3998
4091
|
size: "sm",
|
|
@@ -4002,7 +4095,7 @@ var CustomActionForm = ({ data, onChange }) => {
|
|
|
4002
4095
|
}
|
|
4003
4096
|
},
|
|
4004
4097
|
isValid ? "Valid JSON" : "Invalid JSON"
|
|
4005
|
-
)), /* @__PURE__ */
|
|
4098
|
+
)), /* @__PURE__ */ React52.createElement(
|
|
4006
4099
|
Textarea4,
|
|
4007
4100
|
{
|
|
4008
4101
|
placeholder: `Example Wasm message:
|
|
@@ -4035,7 +4128,7 @@ Example Stargate message:
|
|
|
4035
4128
|
};
|
|
4036
4129
|
|
|
4037
4130
|
// src/mantine/blocks/proposal/actions-components/forms/AuthzExecActionForm.tsx
|
|
4038
|
-
import
|
|
4131
|
+
import React53 from "react";
|
|
4039
4132
|
import { Stack as Stack36, Select as Select5, TextInput as TextInput12, Textarea as Textarea5 } from "@mantine/core";
|
|
4040
4133
|
var inputStyles6 = {
|
|
4041
4134
|
label: { color: "#adb5bd" },
|
|
@@ -4071,7 +4164,7 @@ var AuthzExecActionForm = ({ data, onChange }) => {
|
|
|
4071
4164
|
onChange({ ...data, [field]: value });
|
|
4072
4165
|
}
|
|
4073
4166
|
};
|
|
4074
|
-
return /* @__PURE__ */
|
|
4167
|
+
return /* @__PURE__ */ React53.createElement(Stack36, { gap: "md" }, /* @__PURE__ */ React53.createElement(
|
|
4075
4168
|
Select5,
|
|
4076
4169
|
{
|
|
4077
4170
|
label: "Action Type",
|
|
@@ -4082,7 +4175,7 @@ var AuthzExecActionForm = ({ data, onChange }) => {
|
|
|
4082
4175
|
required: true,
|
|
4083
4176
|
styles: inputStyles6
|
|
4084
4177
|
}
|
|
4085
|
-
), data.authzExecActionType === AuthzExecActionTypes.Delegate && /* @__PURE__ */
|
|
4178
|
+
), data.authzExecActionType === AuthzExecActionTypes.Delegate && /* @__PURE__ */ React53.createElement(
|
|
4086
4179
|
Textarea5,
|
|
4087
4180
|
{
|
|
4088
4181
|
label: "Delegate Message (JSON)",
|
|
@@ -4092,7 +4185,7 @@ var AuthzExecActionForm = ({ data, onChange }) => {
|
|
|
4092
4185
|
minRows: 4,
|
|
4093
4186
|
styles: inputStyles6
|
|
4094
4187
|
}
|
|
4095
|
-
), data.authzExecActionType === AuthzExecActionTypes.Undelegate && /* @__PURE__ */
|
|
4188
|
+
), data.authzExecActionType === AuthzExecActionTypes.Undelegate && /* @__PURE__ */ React53.createElement(
|
|
4096
4189
|
Textarea5,
|
|
4097
4190
|
{
|
|
4098
4191
|
label: "Undelegate Message (JSON)",
|
|
@@ -4102,7 +4195,7 @@ var AuthzExecActionForm = ({ data, onChange }) => {
|
|
|
4102
4195
|
minRows: 4,
|
|
4103
4196
|
styles: inputStyles6
|
|
4104
4197
|
}
|
|
4105
|
-
), data.authzExecActionType === AuthzExecActionTypes.Redelegate && /* @__PURE__ */
|
|
4198
|
+
), data.authzExecActionType === AuthzExecActionTypes.Redelegate && /* @__PURE__ */ React53.createElement(
|
|
4106
4199
|
Textarea5,
|
|
4107
4200
|
{
|
|
4108
4201
|
label: "Redelegate Message (JSON)",
|
|
@@ -4112,7 +4205,7 @@ var AuthzExecActionForm = ({ data, onChange }) => {
|
|
|
4112
4205
|
minRows: 4,
|
|
4113
4206
|
styles: inputStyles6
|
|
4114
4207
|
}
|
|
4115
|
-
), data.authzExecActionType === AuthzExecActionTypes.ClaimRewards && /* @__PURE__ */
|
|
4208
|
+
), data.authzExecActionType === AuthzExecActionTypes.ClaimRewards && /* @__PURE__ */ React53.createElement(
|
|
4116
4209
|
Textarea5,
|
|
4117
4210
|
{
|
|
4118
4211
|
label: "Claim Rewards Message (JSON)",
|
|
@@ -4122,7 +4215,7 @@ var AuthzExecActionForm = ({ data, onChange }) => {
|
|
|
4122
4215
|
minRows: 3,
|
|
4123
4216
|
styles: inputStyles6
|
|
4124
4217
|
}
|
|
4125
|
-
), data.authzExecActionType === AuthzExecActionTypes.Custom && /* @__PURE__ */
|
|
4218
|
+
), data.authzExecActionType === AuthzExecActionTypes.Custom && /* @__PURE__ */ React53.createElement(
|
|
4126
4219
|
TextInput12,
|
|
4127
4220
|
{
|
|
4128
4221
|
label: "Custom Message",
|
|
@@ -4135,7 +4228,7 @@ var AuthzExecActionForm = ({ data, onChange }) => {
|
|
|
4135
4228
|
};
|
|
4136
4229
|
|
|
4137
4230
|
// src/mantine/blocks/proposal/actions-components/forms/AuthzGrantActionForm.tsx
|
|
4138
|
-
import
|
|
4231
|
+
import React54 from "react";
|
|
4139
4232
|
import { Stack as Stack37, TextInput as TextInput13 } from "@mantine/core";
|
|
4140
4233
|
var inputStyles7 = {
|
|
4141
4234
|
label: { color: "#adb5bd" },
|
|
@@ -4149,7 +4242,7 @@ var inputStyles7 = {
|
|
|
4149
4242
|
}
|
|
4150
4243
|
};
|
|
4151
4244
|
var AuthzGrantActionForm = ({ data, onChange }) => {
|
|
4152
|
-
return /* @__PURE__ */
|
|
4245
|
+
return /* @__PURE__ */ React54.createElement(Stack37, { gap: "md" }, /* @__PURE__ */ React54.createElement(
|
|
4153
4246
|
TextInput13,
|
|
4154
4247
|
{
|
|
4155
4248
|
label: "Type URL",
|
|
@@ -4159,7 +4252,7 @@ var AuthzGrantActionForm = ({ data, onChange }) => {
|
|
|
4159
4252
|
required: true,
|
|
4160
4253
|
styles: inputStyles7
|
|
4161
4254
|
}
|
|
4162
|
-
), /* @__PURE__ */
|
|
4255
|
+
), /* @__PURE__ */ React54.createElement(
|
|
4163
4256
|
TextInput13,
|
|
4164
4257
|
{
|
|
4165
4258
|
label: "Grantee Address",
|
|
@@ -4172,7 +4265,7 @@ var AuthzGrantActionForm = ({ data, onChange }) => {
|
|
|
4172
4265
|
required: true,
|
|
4173
4266
|
styles: inputStyles7
|
|
4174
4267
|
}
|
|
4175
|
-
), /* @__PURE__ */
|
|
4268
|
+
), /* @__PURE__ */ React54.createElement(
|
|
4176
4269
|
TextInput13,
|
|
4177
4270
|
{
|
|
4178
4271
|
label: "Message Type URL",
|
|
@@ -4189,7 +4282,7 @@ var AuthzGrantActionForm = ({ data, onChange }) => {
|
|
|
4189
4282
|
};
|
|
4190
4283
|
|
|
4191
4284
|
// src/mantine/blocks/proposal/actions-components/forms/BurnNftActionForm.tsx
|
|
4192
|
-
import
|
|
4285
|
+
import React55 from "react";
|
|
4193
4286
|
import { Stack as Stack38, TextInput as TextInput14 } from "@mantine/core";
|
|
4194
4287
|
var inputStyles8 = {
|
|
4195
4288
|
label: { color: "#adb5bd" },
|
|
@@ -4203,7 +4296,7 @@ var inputStyles8 = {
|
|
|
4203
4296
|
}
|
|
4204
4297
|
};
|
|
4205
4298
|
var BurnNftActionForm = ({ data, onChange }) => {
|
|
4206
|
-
return /* @__PURE__ */
|
|
4299
|
+
return /* @__PURE__ */ React55.createElement(Stack38, { gap: "md" }, /* @__PURE__ */ React55.createElement(
|
|
4207
4300
|
TextInput14,
|
|
4208
4301
|
{
|
|
4209
4302
|
label: "Collection Address",
|
|
@@ -4213,11 +4306,11 @@ var BurnNftActionForm = ({ data, onChange }) => {
|
|
|
4213
4306
|
required: true,
|
|
4214
4307
|
styles: inputStyles8
|
|
4215
4308
|
}
|
|
4216
|
-
), /* @__PURE__ */
|
|
4309
|
+
), /* @__PURE__ */ React55.createElement(TextInput14, { label: "Token ID", placeholder: "1", value: data.tokenId, onChange: (e) => onChange({ ...data, tokenId: e.currentTarget.value }), required: true, styles: inputStyles8 }));
|
|
4217
4310
|
};
|
|
4218
4311
|
|
|
4219
4312
|
// src/mantine/blocks/proposal/actions-components/forms/TransferNftActionForm.tsx
|
|
4220
|
-
import
|
|
4313
|
+
import React56 from "react";
|
|
4221
4314
|
import { Stack as Stack39, TextInput as TextInput15, Checkbox as Checkbox4, Textarea as Textarea6 } from "@mantine/core";
|
|
4222
4315
|
var inputStyles9 = {
|
|
4223
4316
|
label: { color: "#adb5bd" },
|
|
@@ -4231,7 +4324,7 @@ var inputStyles9 = {
|
|
|
4231
4324
|
}
|
|
4232
4325
|
};
|
|
4233
4326
|
var TransferNftActionForm = ({ data, onChange }) => {
|
|
4234
|
-
return /* @__PURE__ */
|
|
4327
|
+
return /* @__PURE__ */ React56.createElement(Stack39, { gap: "md" }, /* @__PURE__ */ React56.createElement(
|
|
4235
4328
|
TextInput15,
|
|
4236
4329
|
{
|
|
4237
4330
|
label: "Collection Address",
|
|
@@ -4241,7 +4334,7 @@ var TransferNftActionForm = ({ data, onChange }) => {
|
|
|
4241
4334
|
required: true,
|
|
4242
4335
|
styles: inputStyles9
|
|
4243
4336
|
}
|
|
4244
|
-
), /* @__PURE__ */
|
|
4337
|
+
), /* @__PURE__ */ React56.createElement(TextInput15, { label: "Token ID", placeholder: "1", value: data.tokenId, onChange: (e) => onChange({ ...data, tokenId: e.currentTarget.value }), required: true, styles: inputStyles9 }), /* @__PURE__ */ React56.createElement(
|
|
4245
4338
|
TextInput15,
|
|
4246
4339
|
{
|
|
4247
4340
|
label: "Recipient Address",
|
|
@@ -4251,7 +4344,7 @@ var TransferNftActionForm = ({ data, onChange }) => {
|
|
|
4251
4344
|
required: true,
|
|
4252
4345
|
styles: inputStyles9
|
|
4253
4346
|
}
|
|
4254
|
-
), /* @__PURE__ */
|
|
4347
|
+
), /* @__PURE__ */ React56.createElement(
|
|
4255
4348
|
Checkbox4,
|
|
4256
4349
|
{
|
|
4257
4350
|
label: "Execute Smart Contract",
|
|
@@ -4262,7 +4355,7 @@ var TransferNftActionForm = ({ data, onChange }) => {
|
|
|
4262
4355
|
input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
4263
4356
|
}
|
|
4264
4357
|
}
|
|
4265
|
-
), data.executeSmartContract && /* @__PURE__ */
|
|
4358
|
+
), data.executeSmartContract && /* @__PURE__ */ React56.createElement(
|
|
4266
4359
|
Textarea6,
|
|
4267
4360
|
{
|
|
4268
4361
|
label: "Smart Contract Message (JSON)",
|
|
@@ -4276,7 +4369,7 @@ var TransferNftActionForm = ({ data, onChange }) => {
|
|
|
4276
4369
|
};
|
|
4277
4370
|
|
|
4278
4371
|
// src/mantine/blocks/proposal/actions-components/forms/ManageCw721ActionForm.tsx
|
|
4279
|
-
import
|
|
4372
|
+
import React57 from "react";
|
|
4280
4373
|
import { Stack as Stack40, TextInput as TextInput16, Radio, Group as Group12 } from "@mantine/core";
|
|
4281
4374
|
var inputStyles10 = {
|
|
4282
4375
|
label: { color: "#adb5bd" },
|
|
@@ -4290,7 +4383,7 @@ var inputStyles10 = {
|
|
|
4290
4383
|
}
|
|
4291
4384
|
};
|
|
4292
4385
|
var ManageCw721ActionForm = ({ data, onChange }) => {
|
|
4293
|
-
return /* @__PURE__ */
|
|
4386
|
+
return /* @__PURE__ */ React57.createElement(Stack40, { gap: "md" }, /* @__PURE__ */ React57.createElement(Radio.Group, { label: "Action", value: data.adding ? "add" : "remove", onChange: (value) => onChange({ ...data, adding: value === "add" }) }, /* @__PURE__ */ React57.createElement(Group12, { mt: "xs" }, /* @__PURE__ */ React57.createElement(
|
|
4294
4387
|
Radio,
|
|
4295
4388
|
{
|
|
4296
4389
|
value: "add",
|
|
@@ -4300,7 +4393,7 @@ var ManageCw721ActionForm = ({ data, onChange }) => {
|
|
|
4300
4393
|
radio: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
4301
4394
|
}
|
|
4302
4395
|
}
|
|
4303
|
-
), /* @__PURE__ */
|
|
4396
|
+
), /* @__PURE__ */ React57.createElement(
|
|
4304
4397
|
Radio,
|
|
4305
4398
|
{
|
|
4306
4399
|
value: "remove",
|
|
@@ -4310,7 +4403,7 @@ var ManageCw721ActionForm = ({ data, onChange }) => {
|
|
|
4310
4403
|
radio: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
4311
4404
|
}
|
|
4312
4405
|
}
|
|
4313
|
-
))), /* @__PURE__ */
|
|
4406
|
+
))), /* @__PURE__ */ React57.createElement(
|
|
4314
4407
|
TextInput16,
|
|
4315
4408
|
{
|
|
4316
4409
|
label: "NFT Contract Address",
|
|
@@ -4324,7 +4417,7 @@ var ManageCw721ActionForm = ({ data, onChange }) => {
|
|
|
4324
4417
|
};
|
|
4325
4418
|
|
|
4326
4419
|
// src/mantine/blocks/proposal/actions-components/forms/InstantiateActionForm.tsx
|
|
4327
|
-
import
|
|
4420
|
+
import React58, { useState as useState12 } from "react";
|
|
4328
4421
|
import { Stack as Stack41, TextInput as TextInput17, Textarea as Textarea7, NumberInput as NumberInput5, Button as Button8, Group as Group13, Text as Text32, Card as Card9 } from "@mantine/core";
|
|
4329
4422
|
var inputStyles11 = {
|
|
4330
4423
|
label: { color: "#adb5bd" },
|
|
@@ -4362,7 +4455,7 @@ var InstantiateActionForm = ({ data, onChange }) => {
|
|
|
4362
4455
|
return data.message;
|
|
4363
4456
|
}
|
|
4364
4457
|
};
|
|
4365
|
-
return /* @__PURE__ */
|
|
4458
|
+
return /* @__PURE__ */ React58.createElement(Stack41, { gap: "md" }, /* @__PURE__ */ React58.createElement(
|
|
4366
4459
|
TextInput17,
|
|
4367
4460
|
{
|
|
4368
4461
|
label: "Admin Address",
|
|
@@ -4372,7 +4465,7 @@ var InstantiateActionForm = ({ data, onChange }) => {
|
|
|
4372
4465
|
required: true,
|
|
4373
4466
|
styles: inputStyles11
|
|
4374
4467
|
}
|
|
4375
|
-
), /* @__PURE__ */
|
|
4468
|
+
), /* @__PURE__ */ React58.createElement(
|
|
4376
4469
|
NumberInput5,
|
|
4377
4470
|
{
|
|
4378
4471
|
label: "Code ID",
|
|
@@ -4383,7 +4476,7 @@ var InstantiateActionForm = ({ data, onChange }) => {
|
|
|
4383
4476
|
required: true,
|
|
4384
4477
|
styles: inputStyles11
|
|
4385
4478
|
}
|
|
4386
|
-
), /* @__PURE__ */
|
|
4479
|
+
), /* @__PURE__ */ React58.createElement(TextInput17, { label: "Label", placeholder: "My Contract", value: data.label, onChange: (e) => onChange({ ...data, label: e.currentTarget.value }), required: true, styles: inputStyles11 }), /* @__PURE__ */ React58.createElement(
|
|
4387
4480
|
Textarea7,
|
|
4388
4481
|
{
|
|
4389
4482
|
label: "Instantiate Message (JSON)",
|
|
@@ -4394,7 +4487,7 @@ var InstantiateActionForm = ({ data, onChange }) => {
|
|
|
4394
4487
|
required: true,
|
|
4395
4488
|
styles: inputStyles11
|
|
4396
4489
|
}
|
|
4397
|
-
), /* @__PURE__ */
|
|
4490
|
+
), /* @__PURE__ */ React58.createElement(Stack41, { gap: "xs" }, /* @__PURE__ */ React58.createElement(Text32, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Funds (Optional)"), (data.funds || []).map((fund, index) => /* @__PURE__ */ React58.createElement(Card9, { key: index, withBorder: true, padding: "xs", style: { backgroundColor: "#2a2a2a", borderColor: "#333" } }, /* @__PURE__ */ React58.createElement(Group13, { justify: "space-between" }, /* @__PURE__ */ React58.createElement(Text32, { size: "sm", style: { color: "#f1f3f5" } }, fund.amount, " ", fund.denom), /* @__PURE__ */ React58.createElement(Button8, { size: "xs", variant: "subtle", onClick: () => handleRemoveFund(index), style: { color: "#ff6b6b" } }, "Remove")))), /* @__PURE__ */ React58.createElement(Group13, { grow: true }, /* @__PURE__ */ React58.createElement(TextInput17, { placeholder: "Amount", value: newFund.amount, onChange: (e) => setNewFund({ ...newFund, amount: e.currentTarget.value }), styles: inputStyles11 }), /* @__PURE__ */ React58.createElement(TextInput17, { placeholder: "Denom (e.g., uixo)", value: newFund.denom, onChange: (e) => setNewFund({ ...newFund, denom: e.currentTarget.value }), styles: inputStyles11 }), /* @__PURE__ */ React58.createElement(
|
|
4398
4491
|
Button8,
|
|
4399
4492
|
{
|
|
4400
4493
|
size: "sm",
|
|
@@ -4409,7 +4502,7 @@ var InstantiateActionForm = ({ data, onChange }) => {
|
|
|
4409
4502
|
};
|
|
4410
4503
|
|
|
4411
4504
|
// src/mantine/blocks/proposal/actions-components/forms/MigrateActionForm.tsx
|
|
4412
|
-
import
|
|
4505
|
+
import React59 from "react";
|
|
4413
4506
|
import { Stack as Stack42, TextInput as TextInput18, Textarea as Textarea8, NumberInput as NumberInput6 } from "@mantine/core";
|
|
4414
4507
|
var inputStyles12 = {
|
|
4415
4508
|
label: { color: "#adb5bd" },
|
|
@@ -4431,7 +4524,7 @@ var MigrateActionForm = ({ data, onChange }) => {
|
|
|
4431
4524
|
return data.msg;
|
|
4432
4525
|
}
|
|
4433
4526
|
};
|
|
4434
|
-
return /* @__PURE__ */
|
|
4527
|
+
return /* @__PURE__ */ React59.createElement(Stack42, { gap: "md" }, /* @__PURE__ */ React59.createElement(
|
|
4435
4528
|
TextInput18,
|
|
4436
4529
|
{
|
|
4437
4530
|
label: "Contract Address",
|
|
@@ -4441,7 +4534,7 @@ var MigrateActionForm = ({ data, onChange }) => {
|
|
|
4441
4534
|
required: true,
|
|
4442
4535
|
styles: inputStyles12
|
|
4443
4536
|
}
|
|
4444
|
-
), /* @__PURE__ */
|
|
4537
|
+
), /* @__PURE__ */ React59.createElement(
|
|
4445
4538
|
NumberInput6,
|
|
4446
4539
|
{
|
|
4447
4540
|
label: "New Code ID",
|
|
@@ -4452,7 +4545,7 @@ var MigrateActionForm = ({ data, onChange }) => {
|
|
|
4452
4545
|
required: true,
|
|
4453
4546
|
styles: inputStyles12
|
|
4454
4547
|
}
|
|
4455
|
-
), /* @__PURE__ */
|
|
4548
|
+
), /* @__PURE__ */ React59.createElement(
|
|
4456
4549
|
Textarea8,
|
|
4457
4550
|
{
|
|
4458
4551
|
label: "Migration Message (JSON)",
|
|
@@ -4467,7 +4560,7 @@ var MigrateActionForm = ({ data, onChange }) => {
|
|
|
4467
4560
|
};
|
|
4468
4561
|
|
|
4469
4562
|
// src/mantine/blocks/proposal/actions-components/forms/UpdateAdminActionForm.tsx
|
|
4470
|
-
import
|
|
4563
|
+
import React60 from "react";
|
|
4471
4564
|
import { Stack as Stack43, TextInput as TextInput19 } from "@mantine/core";
|
|
4472
4565
|
var inputStyles13 = {
|
|
4473
4566
|
label: { color: "#adb5bd" },
|
|
@@ -4481,7 +4574,7 @@ var inputStyles13 = {
|
|
|
4481
4574
|
}
|
|
4482
4575
|
};
|
|
4483
4576
|
var UpdateAdminActionForm = ({ data, onChange }) => {
|
|
4484
|
-
return /* @__PURE__ */
|
|
4577
|
+
return /* @__PURE__ */ React60.createElement(Stack43, { gap: "md" }, /* @__PURE__ */ React60.createElement(
|
|
4485
4578
|
TextInput19,
|
|
4486
4579
|
{
|
|
4487
4580
|
label: "Contract Address",
|
|
@@ -4491,7 +4584,7 @@ var UpdateAdminActionForm = ({ data, onChange }) => {
|
|
|
4491
4584
|
required: true,
|
|
4492
4585
|
styles: inputStyles13
|
|
4493
4586
|
}
|
|
4494
|
-
), /* @__PURE__ */
|
|
4587
|
+
), /* @__PURE__ */ React60.createElement(
|
|
4495
4588
|
TextInput19,
|
|
4496
4589
|
{
|
|
4497
4590
|
label: "New Admin Address",
|
|
@@ -4505,7 +4598,7 @@ var UpdateAdminActionForm = ({ data, onChange }) => {
|
|
|
4505
4598
|
};
|
|
4506
4599
|
|
|
4507
4600
|
// src/mantine/blocks/proposal/actions-components/forms/ManageCw20ActionForm.tsx
|
|
4508
|
-
import
|
|
4601
|
+
import React61 from "react";
|
|
4509
4602
|
import { Stack as Stack44, TextInput as TextInput20, Radio as Radio2, Group as Group14 } from "@mantine/core";
|
|
4510
4603
|
var inputStyles14 = {
|
|
4511
4604
|
label: { color: "#adb5bd" },
|
|
@@ -4519,7 +4612,7 @@ var inputStyles14 = {
|
|
|
4519
4612
|
}
|
|
4520
4613
|
};
|
|
4521
4614
|
var ManageCw20ActionForm = ({ data, onChange }) => {
|
|
4522
|
-
return /* @__PURE__ */
|
|
4615
|
+
return /* @__PURE__ */ React61.createElement(Stack44, { gap: "md" }, /* @__PURE__ */ React61.createElement(Radio2.Group, { label: "Action", value: data.adding ? "add" : "remove", onChange: (value) => onChange({ ...data, adding: value === "add" }) }, /* @__PURE__ */ React61.createElement(Group14, { mt: "xs" }, /* @__PURE__ */ React61.createElement(
|
|
4523
4616
|
Radio2,
|
|
4524
4617
|
{
|
|
4525
4618
|
value: "add",
|
|
@@ -4529,7 +4622,7 @@ var ManageCw20ActionForm = ({ data, onChange }) => {
|
|
|
4529
4622
|
radio: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
4530
4623
|
}
|
|
4531
4624
|
}
|
|
4532
|
-
), /* @__PURE__ */
|
|
4625
|
+
), /* @__PURE__ */ React61.createElement(
|
|
4533
4626
|
Radio2,
|
|
4534
4627
|
{
|
|
4535
4628
|
value: "remove",
|
|
@@ -4539,7 +4632,7 @@ var ManageCw20ActionForm = ({ data, onChange }) => {
|
|
|
4539
4632
|
radio: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
4540
4633
|
}
|
|
4541
4634
|
}
|
|
4542
|
-
))), /* @__PURE__ */
|
|
4635
|
+
))), /* @__PURE__ */ React61.createElement(
|
|
4543
4636
|
TextInput20,
|
|
4544
4637
|
{
|
|
4545
4638
|
label: "Token Contract Address",
|
|
@@ -4553,7 +4646,7 @@ var ManageCw20ActionForm = ({ data, onChange }) => {
|
|
|
4553
4646
|
};
|
|
4554
4647
|
|
|
4555
4648
|
// src/mantine/blocks/proposal/actions-components/forms/ManageSubDaosActionForm.tsx
|
|
4556
|
-
import
|
|
4649
|
+
import React62, { useState as useState13 } from "react";
|
|
4557
4650
|
import { Stack as Stack45, TextInput as TextInput21, Button as Button9, Group as Group15, Text as Text33, Card as Card10, Textarea as Textarea9 } from "@mantine/core";
|
|
4558
4651
|
var inputStyles15 = {
|
|
4559
4652
|
label: { color: "#adb5bd" },
|
|
@@ -4599,7 +4692,7 @@ var ManageSubDaosActionForm = ({ data, onChange }) => {
|
|
|
4599
4692
|
toRemove: (data.toRemove || []).filter((_, i) => i !== index)
|
|
4600
4693
|
});
|
|
4601
4694
|
};
|
|
4602
|
-
return /* @__PURE__ */
|
|
4695
|
+
return /* @__PURE__ */ React62.createElement(Stack45, { gap: "md" }, /* @__PURE__ */ React62.createElement(Stack45, { gap: "xs" }, /* @__PURE__ */ React62.createElement(Text33, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "SubDAOs to Add"), (data.toAdd || []).map((subDao, index) => /* @__PURE__ */ React62.createElement(Card10, { key: index, withBorder: true, padding: "xs", style: { backgroundColor: "#2a2a2a", borderColor: "#333" } }, /* @__PURE__ */ React62.createElement(Stack45, { gap: "xs" }, /* @__PURE__ */ React62.createElement(Group15, { justify: "space-between" }, /* @__PURE__ */ React62.createElement(Text33, { size: "sm", style: { color: "#f1f3f5" } }, subDao.addr), /* @__PURE__ */ React62.createElement(Button9, { size: "xs", variant: "subtle", onClick: () => handleRemoveFromAddList(index), style: { color: "#ff6b6b" } }, "Remove")), subDao.charter && /* @__PURE__ */ React62.createElement(Text33, { size: "xs", style: { color: "#adb5bd" } }, "Charter: ", subDao.charter)))), /* @__PURE__ */ React62.createElement(Stack45, { gap: "xs" }, /* @__PURE__ */ React62.createElement(TextInput21, { placeholder: "SubDAO Address", value: newSubDao.addr, onChange: (e) => setNewSubDao({ ...newSubDao, addr: e.currentTarget.value }), styles: inputStyles15 }), /* @__PURE__ */ React62.createElement(
|
|
4603
4696
|
Textarea9,
|
|
4604
4697
|
{
|
|
4605
4698
|
placeholder: "Charter (optional)",
|
|
@@ -4608,7 +4701,7 @@ var ManageSubDaosActionForm = ({ data, onChange }) => {
|
|
|
4608
4701
|
minRows: 2,
|
|
4609
4702
|
styles: inputStyles15
|
|
4610
4703
|
}
|
|
4611
|
-
), /* @__PURE__ */
|
|
4704
|
+
), /* @__PURE__ */ React62.createElement(
|
|
4612
4705
|
Button9,
|
|
4613
4706
|
{
|
|
4614
4707
|
size: "sm",
|
|
@@ -4619,7 +4712,7 @@ var ManageSubDaosActionForm = ({ data, onChange }) => {
|
|
|
4619
4712
|
}
|
|
4620
4713
|
},
|
|
4621
4714
|
"Add SubDAO"
|
|
4622
|
-
))), /* @__PURE__ */
|
|
4715
|
+
))), /* @__PURE__ */ React62.createElement(Stack45, { gap: "xs" }, /* @__PURE__ */ React62.createElement(Text33, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "SubDAOs to Remove"), (data.toRemove || []).map((subDao, index) => /* @__PURE__ */ React62.createElement(Card10, { key: index, withBorder: true, padding: "xs", style: { backgroundColor: "#2a2a2a", borderColor: "#333" } }, /* @__PURE__ */ React62.createElement(Group15, { justify: "space-between" }, /* @__PURE__ */ React62.createElement(Text33, { size: "sm", style: { color: "#f1f3f5" } }, subDao.address), /* @__PURE__ */ React62.createElement(Button9, { size: "xs", variant: "subtle", onClick: () => handleRemoveFromRemoveList(index), style: { color: "#ff6b6b" } }, "Remove")))), /* @__PURE__ */ React62.createElement(Group15, { grow: true }, /* @__PURE__ */ React62.createElement(TextInput21, { placeholder: "SubDAO Address to Remove", value: newRemoveAddress, onChange: (e) => setNewRemoveAddress(e.currentTarget.value), styles: inputStyles15 }), /* @__PURE__ */ React62.createElement(
|
|
4623
4716
|
Button9,
|
|
4624
4717
|
{
|
|
4625
4718
|
size: "sm",
|
|
@@ -4634,7 +4727,7 @@ var ManageSubDaosActionForm = ({ data, onChange }) => {
|
|
|
4634
4727
|
};
|
|
4635
4728
|
|
|
4636
4729
|
// src/mantine/blocks/proposal/actions-components/forms/UpdateInfoActionForm.tsx
|
|
4637
|
-
import
|
|
4730
|
+
import React63 from "react";
|
|
4638
4731
|
import { Stack as Stack46, TextInput as TextInput22, Textarea as Textarea10, Checkbox as Checkbox5 } from "@mantine/core";
|
|
4639
4732
|
var inputStyles16 = {
|
|
4640
4733
|
label: { color: "#adb5bd" },
|
|
@@ -4648,7 +4741,7 @@ var inputStyles16 = {
|
|
|
4648
4741
|
}
|
|
4649
4742
|
};
|
|
4650
4743
|
var UpdateInfoActionForm = ({ data, onChange }) => {
|
|
4651
|
-
return /* @__PURE__ */
|
|
4744
|
+
return /* @__PURE__ */ React63.createElement(Stack46, { gap: "md" }, /* @__PURE__ */ React63.createElement(TextInput22, { label: "DAO Name", placeholder: "My DAO", value: data.name, onChange: (e) => onChange({ ...data, name: e.currentTarget.value }), required: true, styles: inputStyles16 }), /* @__PURE__ */ React63.createElement(
|
|
4652
4745
|
Textarea10,
|
|
4653
4746
|
{
|
|
4654
4747
|
label: "Description",
|
|
@@ -4658,7 +4751,7 @@ var UpdateInfoActionForm = ({ data, onChange }) => {
|
|
|
4658
4751
|
minRows: 3,
|
|
4659
4752
|
styles: inputStyles16
|
|
4660
4753
|
}
|
|
4661
|
-
), /* @__PURE__ */
|
|
4754
|
+
), /* @__PURE__ */ React63.createElement(
|
|
4662
4755
|
TextInput22,
|
|
4663
4756
|
{
|
|
4664
4757
|
label: "Image URL (Optional)",
|
|
@@ -4667,7 +4760,7 @@ var UpdateInfoActionForm = ({ data, onChange }) => {
|
|
|
4667
4760
|
onChange: (e) => onChange({ ...data, image_url: e.currentTarget.value || null }),
|
|
4668
4761
|
styles: inputStyles16
|
|
4669
4762
|
}
|
|
4670
|
-
), /* @__PURE__ */
|
|
4763
|
+
), /* @__PURE__ */ React63.createElement(
|
|
4671
4764
|
TextInput22,
|
|
4672
4765
|
{
|
|
4673
4766
|
label: "DAO URI (Optional)",
|
|
@@ -4676,7 +4769,7 @@ var UpdateInfoActionForm = ({ data, onChange }) => {
|
|
|
4676
4769
|
onChange: (e) => onChange({ ...data, dao_uri: e.currentTarget.value || null }),
|
|
4677
4770
|
styles: inputStyles16
|
|
4678
4771
|
}
|
|
4679
|
-
), /* @__PURE__ */
|
|
4772
|
+
), /* @__PURE__ */ React63.createElement(
|
|
4680
4773
|
Checkbox5,
|
|
4681
4774
|
{
|
|
4682
4775
|
label: "Automatically add CW20 tokens",
|
|
@@ -4687,7 +4780,7 @@ var UpdateInfoActionForm = ({ data, onChange }) => {
|
|
|
4687
4780
|
input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
4688
4781
|
}
|
|
4689
4782
|
}
|
|
4690
|
-
), /* @__PURE__ */
|
|
4783
|
+
), /* @__PURE__ */ React63.createElement(
|
|
4691
4784
|
Checkbox5,
|
|
4692
4785
|
{
|
|
4693
4786
|
label: "Automatically add CW721 NFTs",
|
|
@@ -4702,7 +4795,7 @@ var UpdateInfoActionForm = ({ data, onChange }) => {
|
|
|
4702
4795
|
};
|
|
4703
4796
|
|
|
4704
4797
|
// src/mantine/blocks/proposal/actions-components/forms/ManageStorageItemsActionForm.tsx
|
|
4705
|
-
import
|
|
4798
|
+
import React64 from "react";
|
|
4706
4799
|
import { Stack as Stack47, TextInput as TextInput23, Radio as Radio3, Group as Group16, Textarea as Textarea11 } from "@mantine/core";
|
|
4707
4800
|
var inputStyles17 = {
|
|
4708
4801
|
label: { color: "#adb5bd" },
|
|
@@ -4716,7 +4809,7 @@ var inputStyles17 = {
|
|
|
4716
4809
|
}
|
|
4717
4810
|
};
|
|
4718
4811
|
var ManageStorageItemsActionForm = ({ data, onChange }) => {
|
|
4719
|
-
return /* @__PURE__ */
|
|
4812
|
+
return /* @__PURE__ */ React64.createElement(Stack47, { gap: "md" }, /* @__PURE__ */ React64.createElement(Radio3.Group, { label: "Action", value: data.setting ? "set" : "remove", onChange: (value) => onChange({ ...data, setting: value === "set" }) }, /* @__PURE__ */ React64.createElement(Group16, { mt: "xs" }, /* @__PURE__ */ React64.createElement(
|
|
4720
4813
|
Radio3,
|
|
4721
4814
|
{
|
|
4722
4815
|
value: "set",
|
|
@@ -4726,7 +4819,7 @@ var ManageStorageItemsActionForm = ({ data, onChange }) => {
|
|
|
4726
4819
|
radio: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
4727
4820
|
}
|
|
4728
4821
|
}
|
|
4729
|
-
), /* @__PURE__ */
|
|
4822
|
+
), /* @__PURE__ */ React64.createElement(
|
|
4730
4823
|
Radio3,
|
|
4731
4824
|
{
|
|
4732
4825
|
value: "remove",
|
|
@@ -4736,7 +4829,7 @@ var ManageStorageItemsActionForm = ({ data, onChange }) => {
|
|
|
4736
4829
|
radio: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
4737
4830
|
}
|
|
4738
4831
|
}
|
|
4739
|
-
))), /* @__PURE__ */
|
|
4832
|
+
))), /* @__PURE__ */ React64.createElement(TextInput23, { label: "Storage Key", placeholder: "config_key", value: data.key, onChange: (e) => onChange({ ...data, key: e.currentTarget.value }), required: true, styles: inputStyles17 }), data.setting && /* @__PURE__ */ React64.createElement(
|
|
4740
4833
|
Textarea11,
|
|
4741
4834
|
{
|
|
4742
4835
|
label: "Storage Value",
|
|
@@ -4751,7 +4844,7 @@ var ManageStorageItemsActionForm = ({ data, onChange }) => {
|
|
|
4751
4844
|
};
|
|
4752
4845
|
|
|
4753
4846
|
// src/mantine/blocks/proposal/actions-components/forms/DaoAdminExecActionForm.tsx
|
|
4754
|
-
import
|
|
4847
|
+
import React65, { useState as useState14 } from "react";
|
|
4755
4848
|
import { Stack as Stack48, TextInput as TextInput24, Button as Button10, Group as Group17, Text as Text34, Card as Card11, Textarea as Textarea12 } from "@mantine/core";
|
|
4756
4849
|
var inputStyles18 = {
|
|
4757
4850
|
label: { color: "#adb5bd" },
|
|
@@ -4785,7 +4878,7 @@ var DaoAdminExecActionForm = ({ data, onChange }) => {
|
|
|
4785
4878
|
msgs: (data.msgs || []).filter((_, i) => i !== index)
|
|
4786
4879
|
});
|
|
4787
4880
|
};
|
|
4788
|
-
return /* @__PURE__ */
|
|
4881
|
+
return /* @__PURE__ */ React65.createElement(Stack48, { gap: "md" }, /* @__PURE__ */ React65.createElement(
|
|
4789
4882
|
TextInput24,
|
|
4790
4883
|
{
|
|
4791
4884
|
label: "Core Address",
|
|
@@ -4795,7 +4888,7 @@ var DaoAdminExecActionForm = ({ data, onChange }) => {
|
|
|
4795
4888
|
required: true,
|
|
4796
4889
|
styles: inputStyles18
|
|
4797
4890
|
}
|
|
4798
|
-
), /* @__PURE__ */
|
|
4891
|
+
), /* @__PURE__ */ React65.createElement(Stack48, { gap: "xs" }, /* @__PURE__ */ React65.createElement(Text34, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Messages to Execute"), (data.msgs || []).map((msg, index) => /* @__PURE__ */ React65.createElement(Card11, { key: index, withBorder: true, padding: "xs", style: { backgroundColor: "#2a2a2a", borderColor: "#333" } }, /* @__PURE__ */ React65.createElement(Group17, { justify: "space-between" }, /* @__PURE__ */ React65.createElement(Text34, { size: "sm", style: { color: "#f1f3f5" } }, "Message ", index + 1), /* @__PURE__ */ React65.createElement(Button10, { size: "xs", variant: "subtle", onClick: () => handleRemoveMessage(index), style: { color: "#ff6b6b" } }, "Remove")), /* @__PURE__ */ React65.createElement(Text34, { size: "xs", style: { color: "#adb5bd", fontFamily: "monospace" } }, JSON.stringify(msg, null, 2).substring(0, 100), "..."))), /* @__PURE__ */ React65.createElement(
|
|
4799
4892
|
Textarea12,
|
|
4800
4893
|
{
|
|
4801
4894
|
placeholder: 'Add cosmos message as JSON:\\n{"bank": {"send": {"to_address": "ixo1...", "amount": [{"denom": "uixo", "amount": "1000"}]}}}',
|
|
@@ -4804,7 +4897,7 @@ var DaoAdminExecActionForm = ({ data, onChange }) => {
|
|
|
4804
4897
|
minRows: 4,
|
|
4805
4898
|
styles: inputStyles18
|
|
4806
4899
|
}
|
|
4807
|
-
), /* @__PURE__ */
|
|
4900
|
+
), /* @__PURE__ */ React65.createElement(
|
|
4808
4901
|
Button10,
|
|
4809
4902
|
{
|
|
4810
4903
|
size: "sm",
|
|
@@ -4819,7 +4912,7 @@ var DaoAdminExecActionForm = ({ data, onChange }) => {
|
|
|
4819
4912
|
};
|
|
4820
4913
|
|
|
4821
4914
|
// src/mantine/blocks/proposal/actions-components/forms/AcceptToMarketplaceActionForm.tsx
|
|
4822
|
-
import
|
|
4915
|
+
import React66 from "react";
|
|
4823
4916
|
import { Stack as Stack49, TextInput as TextInput25 } from "@mantine/core";
|
|
4824
4917
|
var inputStyles19 = {
|
|
4825
4918
|
label: { color: "#adb5bd" },
|
|
@@ -4833,7 +4926,7 @@ var inputStyles19 = {
|
|
|
4833
4926
|
}
|
|
4834
4927
|
};
|
|
4835
4928
|
var AcceptToMarketplaceActionForm = ({ data, onChange }) => {
|
|
4836
|
-
return /* @__PURE__ */
|
|
4929
|
+
return /* @__PURE__ */ React66.createElement(Stack49, { gap: "md" }, /* @__PURE__ */ React66.createElement(TextInput25, { label: "DID", placeholder: "did:ixo:...", value: data.did, onChange: (e) => onChange({ ...data, did: e.currentTarget.value }), required: true, styles: inputStyles19 }), /* @__PURE__ */ React66.createElement(
|
|
4837
4930
|
TextInput25,
|
|
4838
4931
|
{
|
|
4839
4932
|
label: "Relayer Node DID",
|
|
@@ -4843,7 +4936,7 @@ var AcceptToMarketplaceActionForm = ({ data, onChange }) => {
|
|
|
4843
4936
|
required: true,
|
|
4844
4937
|
styles: inputStyles19
|
|
4845
4938
|
}
|
|
4846
|
-
), /* @__PURE__ */
|
|
4939
|
+
), /* @__PURE__ */ React66.createElement(
|
|
4847
4940
|
TextInput25,
|
|
4848
4941
|
{
|
|
4849
4942
|
label: "Relayer Node Address",
|
|
@@ -4857,7 +4950,7 @@ var AcceptToMarketplaceActionForm = ({ data, onChange }) => {
|
|
|
4857
4950
|
};
|
|
4858
4951
|
|
|
4859
4952
|
// src/mantine/blocks/proposal/actions-components/forms/CreateEntityActionForm.tsx
|
|
4860
|
-
import
|
|
4953
|
+
import React67 from "react";
|
|
4861
4954
|
import { Stack as Stack50, Textarea as Textarea13, Alert as Alert6, Text as Text35 } from "@mantine/core";
|
|
4862
4955
|
var inputStyles20 = {
|
|
4863
4956
|
label: { color: "#adb5bd" },
|
|
@@ -4878,7 +4971,7 @@ var CreateEntityActionForm = ({ data, onChange }) => {
|
|
|
4878
4971
|
} catch {
|
|
4879
4972
|
}
|
|
4880
4973
|
};
|
|
4881
|
-
return /* @__PURE__ */
|
|
4974
|
+
return /* @__PURE__ */ React67.createElement(Stack50, { gap: "md" }, /* @__PURE__ */ React67.createElement(Alert6, { color: "blue", style: { backgroundColor: "#2a2a2a", borderColor: "#4dabf7" } }, /* @__PURE__ */ React67.createElement(Text35, { size: "sm", style: { color: "#4dabf7" } }, "This is a complex entity creation action. Please provide the complete entity data as JSON.")), /* @__PURE__ */ React67.createElement(
|
|
4882
4975
|
Textarea13,
|
|
4883
4976
|
{
|
|
4884
4977
|
label: "Entity Data (JSON)",
|
|
@@ -4893,7 +4986,7 @@ var CreateEntityActionForm = ({ data, onChange }) => {
|
|
|
4893
4986
|
};
|
|
4894
4987
|
|
|
4895
4988
|
// src/mantine/blocks/proposal/actions-components/forms/UpdateVotingConfigActionForm.tsx
|
|
4896
|
-
import
|
|
4989
|
+
import React68 from "react";
|
|
4897
4990
|
import { Stack as Stack51, Checkbox as Checkbox6, Select as Select6, NumberInput as NumberInput7, Group as Group18 } from "@mantine/core";
|
|
4898
4991
|
var inputStyles21 = {
|
|
4899
4992
|
label: { color: "#adb5bd" },
|
|
@@ -4907,7 +5000,7 @@ var inputStyles21 = {
|
|
|
4907
5000
|
}
|
|
4908
5001
|
};
|
|
4909
5002
|
var UpdateVotingConfigActionForm = ({ data, onChange }) => {
|
|
4910
|
-
return /* @__PURE__ */
|
|
5003
|
+
return /* @__PURE__ */ React68.createElement(Stack51, { gap: "md" }, /* @__PURE__ */ React68.createElement(
|
|
4911
5004
|
Checkbox6,
|
|
4912
5005
|
{
|
|
4913
5006
|
label: "Only members can execute",
|
|
@@ -4918,7 +5011,7 @@ var UpdateVotingConfigActionForm = ({ data, onChange }) => {
|
|
|
4918
5011
|
input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
4919
5012
|
}
|
|
4920
5013
|
}
|
|
4921
|
-
), /* @__PURE__ */
|
|
5014
|
+
), /* @__PURE__ */ React68.createElement(
|
|
4922
5015
|
Select6,
|
|
4923
5016
|
{
|
|
4924
5017
|
label: "Threshold Type",
|
|
@@ -4930,7 +5023,7 @@ var UpdateVotingConfigActionForm = ({ data, onChange }) => {
|
|
|
4930
5023
|
],
|
|
4931
5024
|
styles: inputStyles21
|
|
4932
5025
|
}
|
|
4933
|
-
), data.thresholdType === "%" && /* @__PURE__ */
|
|
5026
|
+
), data.thresholdType === "%" && /* @__PURE__ */ React68.createElement(
|
|
4934
5027
|
NumberInput7,
|
|
4935
5028
|
{
|
|
4936
5029
|
label: "Threshold Percentage",
|
|
@@ -4942,7 +5035,7 @@ var UpdateVotingConfigActionForm = ({ data, onChange }) => {
|
|
|
4942
5035
|
suffix: "%",
|
|
4943
5036
|
styles: inputStyles21
|
|
4944
5037
|
}
|
|
4945
|
-
), /* @__PURE__ */
|
|
5038
|
+
), /* @__PURE__ */ React68.createElement(
|
|
4946
5039
|
Checkbox6,
|
|
4947
5040
|
{
|
|
4948
5041
|
label: "Enable Quorum",
|
|
@@ -4953,7 +5046,7 @@ var UpdateVotingConfigActionForm = ({ data, onChange }) => {
|
|
|
4953
5046
|
input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
4954
5047
|
}
|
|
4955
5048
|
}
|
|
4956
|
-
), data.quorumEnabled && /* @__PURE__ */
|
|
5049
|
+
), data.quorumEnabled && /* @__PURE__ */ React68.createElement(React68.Fragment, null, /* @__PURE__ */ React68.createElement(
|
|
4957
5050
|
Select6,
|
|
4958
5051
|
{
|
|
4959
5052
|
label: "Quorum Type",
|
|
@@ -4965,7 +5058,7 @@ var UpdateVotingConfigActionForm = ({ data, onChange }) => {
|
|
|
4965
5058
|
],
|
|
4966
5059
|
styles: inputStyles21
|
|
4967
5060
|
}
|
|
4968
|
-
), data.quorumType === "%" && /* @__PURE__ */
|
|
5061
|
+
), data.quorumType === "%" && /* @__PURE__ */ React68.createElement(
|
|
4969
5062
|
NumberInput7,
|
|
4970
5063
|
{
|
|
4971
5064
|
label: "Quorum Percentage",
|
|
@@ -4977,7 +5070,7 @@ var UpdateVotingConfigActionForm = ({ data, onChange }) => {
|
|
|
4977
5070
|
suffix: "%",
|
|
4978
5071
|
styles: inputStyles21
|
|
4979
5072
|
}
|
|
4980
|
-
)), /* @__PURE__ */
|
|
5073
|
+
)), /* @__PURE__ */ React68.createElement(Group18, { grow: true }, /* @__PURE__ */ React68.createElement(
|
|
4981
5074
|
NumberInput7,
|
|
4982
5075
|
{
|
|
4983
5076
|
label: "Proposal Duration",
|
|
@@ -4987,7 +5080,7 @@ var UpdateVotingConfigActionForm = ({ data, onChange }) => {
|
|
|
4987
5080
|
min: 1,
|
|
4988
5081
|
styles: inputStyles21
|
|
4989
5082
|
}
|
|
4990
|
-
), /* @__PURE__ */
|
|
5083
|
+
), /* @__PURE__ */ React68.createElement(
|
|
4991
5084
|
Select6,
|
|
4992
5085
|
{
|
|
4993
5086
|
label: "Duration Units",
|
|
@@ -5001,7 +5094,7 @@ var UpdateVotingConfigActionForm = ({ data, onChange }) => {
|
|
|
5001
5094
|
],
|
|
5002
5095
|
styles: inputStyles21
|
|
5003
5096
|
}
|
|
5004
|
-
)), /* @__PURE__ */
|
|
5097
|
+
)), /* @__PURE__ */ React68.createElement(
|
|
5005
5098
|
Checkbox6,
|
|
5006
5099
|
{
|
|
5007
5100
|
label: "Allow revoting",
|
|
@@ -5016,7 +5109,7 @@ var UpdateVotingConfigActionForm = ({ data, onChange }) => {
|
|
|
5016
5109
|
};
|
|
5017
5110
|
|
|
5018
5111
|
// src/mantine/blocks/proposal/actions-components/forms/UpdatePreProposeConfigActionForm.tsx
|
|
5019
|
-
import
|
|
5112
|
+
import React69 from "react";
|
|
5020
5113
|
import { Stack as Stack52, Checkbox as Checkbox7, TextInput as TextInput26, Select as Select7, Textarea as Textarea14 } from "@mantine/core";
|
|
5021
5114
|
var inputStyles22 = {
|
|
5022
5115
|
label: { color: "#adb5bd" },
|
|
@@ -5030,7 +5123,7 @@ var inputStyles22 = {
|
|
|
5030
5123
|
}
|
|
5031
5124
|
};
|
|
5032
5125
|
var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
|
|
5033
|
-
return /* @__PURE__ */
|
|
5126
|
+
return /* @__PURE__ */ React69.createElement(Stack52, { gap: "md" }, /* @__PURE__ */ React69.createElement(
|
|
5034
5127
|
Checkbox7,
|
|
5035
5128
|
{
|
|
5036
5129
|
label: "Anyone can propose",
|
|
@@ -5041,7 +5134,7 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
|
|
|
5041
5134
|
input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
5042
5135
|
}
|
|
5043
5136
|
}
|
|
5044
|
-
), /* @__PURE__ */
|
|
5137
|
+
), /* @__PURE__ */ React69.createElement(
|
|
5045
5138
|
Checkbox7,
|
|
5046
5139
|
{
|
|
5047
5140
|
label: "Deposit required",
|
|
@@ -5052,7 +5145,7 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
|
|
|
5052
5145
|
input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
5053
5146
|
}
|
|
5054
5147
|
}
|
|
5055
|
-
), data.depositRequired && /* @__PURE__ */
|
|
5148
|
+
), data.depositRequired && /* @__PURE__ */ React69.createElement(React69.Fragment, null, /* @__PURE__ */ React69.createElement(
|
|
5056
5149
|
TextInput26,
|
|
5057
5150
|
{
|
|
5058
5151
|
label: "Deposit Amount",
|
|
@@ -5065,7 +5158,7 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
|
|
|
5065
5158
|
required: true,
|
|
5066
5159
|
styles: inputStyles22
|
|
5067
5160
|
}
|
|
5068
|
-
), /* @__PURE__ */
|
|
5161
|
+
), /* @__PURE__ */ React69.createElement(
|
|
5069
5162
|
Select7,
|
|
5070
5163
|
{
|
|
5071
5164
|
label: "Deposit Type",
|
|
@@ -5081,7 +5174,7 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
|
|
|
5081
5174
|
],
|
|
5082
5175
|
styles: inputStyles22
|
|
5083
5176
|
}
|
|
5084
|
-
), /* @__PURE__ */
|
|
5177
|
+
), /* @__PURE__ */ React69.createElement(
|
|
5085
5178
|
TextInput26,
|
|
5086
5179
|
{
|
|
5087
5180
|
label: "Token Denomination or Address",
|
|
@@ -5094,7 +5187,7 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
|
|
|
5094
5187
|
required: true,
|
|
5095
5188
|
styles: inputStyles22
|
|
5096
5189
|
}
|
|
5097
|
-
), /* @__PURE__ */
|
|
5190
|
+
), /* @__PURE__ */ React69.createElement(
|
|
5098
5191
|
TextInput26,
|
|
5099
5192
|
{
|
|
5100
5193
|
label: "Refund Policy",
|
|
@@ -5107,7 +5200,7 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
|
|
|
5107
5200
|
required: true,
|
|
5108
5201
|
styles: inputStyles22
|
|
5109
5202
|
}
|
|
5110
|
-
), data.depositInfo.type !== "native" && /* @__PURE__ */
|
|
5203
|
+
), data.depositInfo.type !== "native" && /* @__PURE__ */ React69.createElement(
|
|
5111
5204
|
Textarea14,
|
|
5112
5205
|
{
|
|
5113
5206
|
label: "Token Configuration (JSON)",
|
|
@@ -5130,7 +5223,7 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
|
|
|
5130
5223
|
};
|
|
5131
5224
|
|
|
5132
5225
|
// src/mantine/blocks/proposal/actions-components/forms/GovernanceVoteActionForm.tsx
|
|
5133
|
-
import
|
|
5226
|
+
import React70 from "react";
|
|
5134
5227
|
import { Stack as Stack53, TextInput as TextInput27, Select as Select8 } from "@mantine/core";
|
|
5135
5228
|
var inputStyles23 = {
|
|
5136
5229
|
label: { color: "#adb5bd" },
|
|
@@ -5150,7 +5243,7 @@ var GovernanceVoteActionForm = ({ data, onChange }) => {
|
|
|
5150
5243
|
{ value: "3", label: "No" },
|
|
5151
5244
|
{ value: "4", label: "No with Veto" }
|
|
5152
5245
|
];
|
|
5153
|
-
return /* @__PURE__ */
|
|
5246
|
+
return /* @__PURE__ */ React70.createElement(Stack53, { gap: "md" }, /* @__PURE__ */ React70.createElement(
|
|
5154
5247
|
TextInput27,
|
|
5155
5248
|
{
|
|
5156
5249
|
label: "Proposal ID",
|
|
@@ -5160,7 +5253,7 @@ var GovernanceVoteActionForm = ({ data, onChange }) => {
|
|
|
5160
5253
|
required: true,
|
|
5161
5254
|
styles: inputStyles23
|
|
5162
5255
|
}
|
|
5163
|
-
), /* @__PURE__ */
|
|
5256
|
+
), /* @__PURE__ */ React70.createElement(
|
|
5164
5257
|
Select8,
|
|
5165
5258
|
{
|
|
5166
5259
|
label: "Vote Option",
|
|
@@ -5174,7 +5267,7 @@ var GovernanceVoteActionForm = ({ data, onChange }) => {
|
|
|
5174
5267
|
};
|
|
5175
5268
|
|
|
5176
5269
|
// src/mantine/blocks/proposal/actions-components/forms/WithdrawTokenSwapActionForm.tsx
|
|
5177
|
-
import
|
|
5270
|
+
import React71 from "react";
|
|
5178
5271
|
import { Stack as Stack54, TextInput as TextInput28, Checkbox as Checkbox8 } from "@mantine/core";
|
|
5179
5272
|
var inputStyles24 = {
|
|
5180
5273
|
label: { color: "#adb5bd" },
|
|
@@ -5188,7 +5281,7 @@ var inputStyles24 = {
|
|
|
5188
5281
|
}
|
|
5189
5282
|
};
|
|
5190
5283
|
var WithdrawTokenSwapActionForm = ({ data, onChange }) => {
|
|
5191
|
-
return /* @__PURE__ */
|
|
5284
|
+
return /* @__PURE__ */ React71.createElement(Stack54, { gap: "md" }, /* @__PURE__ */ React71.createElement(
|
|
5192
5285
|
Checkbox8,
|
|
5193
5286
|
{
|
|
5194
5287
|
label: "Contract chosen",
|
|
@@ -5199,7 +5292,7 @@ var WithdrawTokenSwapActionForm = ({ data, onChange }) => {
|
|
|
5199
5292
|
input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
5200
5293
|
}
|
|
5201
5294
|
}
|
|
5202
|
-
), data.contractChosen && /* @__PURE__ */
|
|
5295
|
+
), data.contractChosen && /* @__PURE__ */ React71.createElement(
|
|
5203
5296
|
TextInput28,
|
|
5204
5297
|
{
|
|
5205
5298
|
label: "Token Swap Contract Address",
|
|
@@ -5213,7 +5306,7 @@ var WithdrawTokenSwapActionForm = ({ data, onChange }) => {
|
|
|
5213
5306
|
};
|
|
5214
5307
|
|
|
5215
5308
|
// src/mantine/blocks/proposal/actions-components/forms/PerformTokenSwapActionForm.tsx
|
|
5216
|
-
import
|
|
5309
|
+
import React72 from "react";
|
|
5217
5310
|
import { Stack as Stack55, TextInput as TextInput29, Checkbox as Checkbox9, Textarea as Textarea15 } from "@mantine/core";
|
|
5218
5311
|
var inputStyles25 = {
|
|
5219
5312
|
label: { color: "#adb5bd" },
|
|
@@ -5227,7 +5320,7 @@ var inputStyles25 = {
|
|
|
5227
5320
|
}
|
|
5228
5321
|
};
|
|
5229
5322
|
var PerformTokenSwapActionForm = ({ data, onChange }) => {
|
|
5230
|
-
return /* @__PURE__ */
|
|
5323
|
+
return /* @__PURE__ */ React72.createElement(Stack55, { gap: "md" }, /* @__PURE__ */ React72.createElement(
|
|
5231
5324
|
Checkbox9,
|
|
5232
5325
|
{
|
|
5233
5326
|
label: "Contract chosen",
|
|
@@ -5238,7 +5331,7 @@ var PerformTokenSwapActionForm = ({ data, onChange }) => {
|
|
|
5238
5331
|
input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
|
|
5239
5332
|
}
|
|
5240
5333
|
}
|
|
5241
|
-
), data.contractChosen && /* @__PURE__ */
|
|
5334
|
+
), data.contractChosen && /* @__PURE__ */ React72.createElement(React72.Fragment, null, /* @__PURE__ */ React72.createElement(
|
|
5242
5335
|
TextInput29,
|
|
5243
5336
|
{
|
|
5244
5337
|
label: "Token Swap Contract Address",
|
|
@@ -5248,7 +5341,7 @@ var PerformTokenSwapActionForm = ({ data, onChange }) => {
|
|
|
5248
5341
|
required: true,
|
|
5249
5342
|
styles: inputStyles25
|
|
5250
5343
|
}
|
|
5251
|
-
), /* @__PURE__ */
|
|
5344
|
+
), /* @__PURE__ */ React72.createElement(
|
|
5252
5345
|
Textarea15,
|
|
5253
5346
|
{
|
|
5254
5347
|
label: "Self Party Information (JSON)",
|
|
@@ -5264,7 +5357,7 @@ var PerformTokenSwapActionForm = ({ data, onChange }) => {
|
|
|
5264
5357
|
minRows: 4,
|
|
5265
5358
|
styles: inputStyles25
|
|
5266
5359
|
}
|
|
5267
|
-
), /* @__PURE__ */
|
|
5360
|
+
), /* @__PURE__ */ React72.createElement(
|
|
5268
5361
|
Textarea15,
|
|
5269
5362
|
{
|
|
5270
5363
|
label: "Counterparty Information (JSON)",
|
|
@@ -5284,7 +5377,7 @@ var PerformTokenSwapActionForm = ({ data, onChange }) => {
|
|
|
5284
5377
|
};
|
|
5285
5378
|
|
|
5286
5379
|
// src/mantine/blocks/proposal/actions-components/forms/StakeToGroupActionForm.tsx
|
|
5287
|
-
import
|
|
5380
|
+
import React73 from "react";
|
|
5288
5381
|
import { Stack as Stack56, TextInput as TextInput30 } from "@mantine/core";
|
|
5289
5382
|
var inputStyles26 = {
|
|
5290
5383
|
label: { color: "#adb5bd" },
|
|
@@ -5298,7 +5391,7 @@ var inputStyles26 = {
|
|
|
5298
5391
|
}
|
|
5299
5392
|
};
|
|
5300
5393
|
var StakeToGroupActionForm = ({ data, onChange }) => {
|
|
5301
|
-
return /* @__PURE__ */
|
|
5394
|
+
return /* @__PURE__ */ React73.createElement(Stack56, { gap: "md" }, /* @__PURE__ */ React73.createElement(
|
|
5302
5395
|
TextInput30,
|
|
5303
5396
|
{
|
|
5304
5397
|
label: "Token Contract Address",
|
|
@@ -5308,7 +5401,7 @@ var StakeToGroupActionForm = ({ data, onChange }) => {
|
|
|
5308
5401
|
required: true,
|
|
5309
5402
|
styles: inputStyles26
|
|
5310
5403
|
}
|
|
5311
|
-
), /* @__PURE__ */
|
|
5404
|
+
), /* @__PURE__ */ React73.createElement(
|
|
5312
5405
|
TextInput30,
|
|
5313
5406
|
{
|
|
5314
5407
|
label: "Staking Contract Address",
|
|
@@ -5318,11 +5411,11 @@ var StakeToGroupActionForm = ({ data, onChange }) => {
|
|
|
5318
5411
|
required: true,
|
|
5319
5412
|
styles: inputStyles26
|
|
5320
5413
|
}
|
|
5321
|
-
), /* @__PURE__ */
|
|
5414
|
+
), /* @__PURE__ */ React73.createElement(TextInput30, { label: "Amount", placeholder: "1000", value: data.amount, onChange: (e) => onChange({ ...data, amount: e.currentTarget.value }), required: true, styles: inputStyles26 }));
|
|
5322
5415
|
};
|
|
5323
5416
|
|
|
5324
5417
|
// src/mantine/blocks/proposal/actions-components/forms/SendGroupTokenActionForm.tsx
|
|
5325
|
-
import
|
|
5418
|
+
import React74 from "react";
|
|
5326
5419
|
import { Stack as Stack57, TextInput as TextInput31 } from "@mantine/core";
|
|
5327
5420
|
var inputStyles27 = {
|
|
5328
5421
|
label: { color: "#adb5bd" },
|
|
@@ -5336,7 +5429,7 @@ var inputStyles27 = {
|
|
|
5336
5429
|
}
|
|
5337
5430
|
};
|
|
5338
5431
|
var SendGroupTokenActionForm = ({ data, onChange }) => {
|
|
5339
|
-
return /* @__PURE__ */
|
|
5432
|
+
return /* @__PURE__ */ React74.createElement(Stack57, { gap: "md" }, /* @__PURE__ */ React74.createElement(
|
|
5340
5433
|
TextInput31,
|
|
5341
5434
|
{
|
|
5342
5435
|
label: "Contract Address",
|
|
@@ -5346,7 +5439,7 @@ var SendGroupTokenActionForm = ({ data, onChange }) => {
|
|
|
5346
5439
|
required: true,
|
|
5347
5440
|
styles: inputStyles27
|
|
5348
5441
|
}
|
|
5349
|
-
), /* @__PURE__ */
|
|
5442
|
+
), /* @__PURE__ */ React74.createElement(
|
|
5350
5443
|
TextInput31,
|
|
5351
5444
|
{
|
|
5352
5445
|
label: "Recipient Address",
|
|
@@ -5356,11 +5449,11 @@ var SendGroupTokenActionForm = ({ data, onChange }) => {
|
|
|
5356
5449
|
required: true,
|
|
5357
5450
|
styles: inputStyles27
|
|
5358
5451
|
}
|
|
5359
|
-
), /* @__PURE__ */
|
|
5452
|
+
), /* @__PURE__ */ React74.createElement(TextInput31, { label: "Amount", placeholder: "1000", value: data.amount, onChange: (e) => onChange({ ...data, amount: e.currentTarget.value }), required: true, styles: inputStyles27 }));
|
|
5360
5453
|
};
|
|
5361
5454
|
|
|
5362
5455
|
// src/mantine/blocks/proposal/actions-components/forms/ValidatorActionsActionForm.tsx
|
|
5363
|
-
import
|
|
5456
|
+
import React75 from "react";
|
|
5364
5457
|
import { Stack as Stack58, Select as Select9, Textarea as Textarea16 } from "@mantine/core";
|
|
5365
5458
|
var inputStyles28 = {
|
|
5366
5459
|
label: { color: "#adb5bd" },
|
|
@@ -5380,7 +5473,7 @@ var ValidatorActionsActionForm = ({ data, onChange }) => {
|
|
|
5380
5473
|
{ value: "/cosmos.slashing.v1beta1.MsgUnjail" /* UnjailValidator */, label: "Unjail Validator" },
|
|
5381
5474
|
{ value: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission" /* WithdrawValidatorCommission */, label: "Withdraw Commission" }
|
|
5382
5475
|
];
|
|
5383
|
-
return /* @__PURE__ */
|
|
5476
|
+
return /* @__PURE__ */ React75.createElement(Stack58, { gap: "md" }, /* @__PURE__ */ React75.createElement(
|
|
5384
5477
|
Select9,
|
|
5385
5478
|
{
|
|
5386
5479
|
label: "Validator Action Type",
|
|
@@ -5390,7 +5483,7 @@ var ValidatorActionsActionForm = ({ data, onChange }) => {
|
|
|
5390
5483
|
required: true,
|
|
5391
5484
|
styles: inputStyles28
|
|
5392
5485
|
}
|
|
5393
|
-
), data.validatorActionType === "/cosmos.staking.v1beta1.MsgCreateValidator" /* CreateValidator */ && /* @__PURE__ */
|
|
5486
|
+
), data.validatorActionType === "/cosmos.staking.v1beta1.MsgCreateValidator" /* CreateValidator */ && /* @__PURE__ */ React75.createElement(
|
|
5394
5487
|
Textarea16,
|
|
5395
5488
|
{
|
|
5396
5489
|
label: "Create Validator Message (JSON)",
|
|
@@ -5401,7 +5494,7 @@ var ValidatorActionsActionForm = ({ data, onChange }) => {
|
|
|
5401
5494
|
required: true,
|
|
5402
5495
|
styles: inputStyles28
|
|
5403
5496
|
}
|
|
5404
|
-
), data.validatorActionType === "/cosmos.staking.v1beta1.MsgEditValidator" /* EditValidator */ && /* @__PURE__ */
|
|
5497
|
+
), data.validatorActionType === "/cosmos.staking.v1beta1.MsgEditValidator" /* EditValidator */ && /* @__PURE__ */ React75.createElement(
|
|
5405
5498
|
Textarea16,
|
|
5406
5499
|
{
|
|
5407
5500
|
label: "Edit Validator Message (JSON)",
|
|
@@ -6082,7 +6175,7 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
|
|
|
6082
6175
|
return config?.getDefaultData() || {};
|
|
6083
6176
|
});
|
|
6084
6177
|
const currentActionConfig = getActionConfig(selectedActionType);
|
|
6085
|
-
const categorizedActions =
|
|
6178
|
+
const categorizedActions = useMemo10(() => getCategorizedActions(), []);
|
|
6086
6179
|
useEffect10(() => {
|
|
6087
6180
|
if (!isEditing) {
|
|
6088
6181
|
const config = getActionConfig(selectedActionType);
|
|
@@ -6106,10 +6199,10 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
|
|
|
6106
6199
|
};
|
|
6107
6200
|
const renderActionForm = () => {
|
|
6108
6201
|
if (!currentActionConfig) {
|
|
6109
|
-
return /* @__PURE__ */
|
|
6202
|
+
return /* @__PURE__ */ React76.createElement(Alert7, { color: "red", style: { backgroundColor: "#2a2a2a", borderColor: "#ff6b6b" } }, /* @__PURE__ */ React76.createElement(Text36, { size: "sm", style: { color: "#ff6b6b" } }, "Unknown action type selected"));
|
|
6110
6203
|
}
|
|
6111
6204
|
const FormComponent = currentActionConfig.FormComponent;
|
|
6112
|
-
return /* @__PURE__ */
|
|
6205
|
+
return /* @__PURE__ */ React76.createElement(FormComponent, { data: actionData, onChange: setActionData, isTemplateMode });
|
|
6113
6206
|
};
|
|
6114
6207
|
const getCategoryColor = (category) => {
|
|
6115
6208
|
const colors = {
|
|
@@ -6124,7 +6217,7 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
|
|
|
6124
6217
|
};
|
|
6125
6218
|
return colors[category] || "#6b7280";
|
|
6126
6219
|
};
|
|
6127
|
-
return /* @__PURE__ */
|
|
6220
|
+
return /* @__PURE__ */ React76.createElement(Stack59, { style: { backgroundColor: "#1a1a1a", color: "#f1f3f5", height: "100%" } }, /* @__PURE__ */ React76.createElement(Text36, { size: "lg", fw: 600, style: { color: "#f1f3f5" } }, isEditing ? "Edit Action" : "Add New Action"), !isEditing ? /* @__PURE__ */ React76.createElement(Stack59, { gap: "md" }, /* @__PURE__ */ React76.createElement(Text36, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Select Action Type"), /* @__PURE__ */ React76.createElement(
|
|
6128
6221
|
Tabs2,
|
|
6129
6222
|
{
|
|
6130
6223
|
defaultValue: ACTION_CATEGORIES[0].id,
|
|
@@ -6145,8 +6238,8 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
|
|
|
6145
6238
|
panel: { paddingTop: "md" }
|
|
6146
6239
|
}
|
|
6147
6240
|
},
|
|
6148
|
-
/* @__PURE__ */
|
|
6149
|
-
ACTION_CATEGORIES.map((category) => /* @__PURE__ */
|
|
6241
|
+
/* @__PURE__ */ React76.createElement(Tabs2.List, null, ACTION_CATEGORIES.map((category) => /* @__PURE__ */ React76.createElement(Tabs2.Tab, { key: category.id, value: category.id }, /* @__PURE__ */ React76.createElement(Group19, { gap: "xs" }, /* @__PURE__ */ React76.createElement("span", null, category.icon), /* @__PURE__ */ React76.createElement("span", null, category.label))))),
|
|
6242
|
+
ACTION_CATEGORIES.map((category) => /* @__PURE__ */ React76.createElement(Tabs2.Panel, { key: category.id, value: category.id, mt: 10 }, /* @__PURE__ */ React76.createElement(SimpleGrid, { cols: 2, spacing: "xs" }, (categorizedActions.get(category.id) || []).map((config) => /* @__PURE__ */ React76.createElement(
|
|
6150
6243
|
Paper5,
|
|
6151
6244
|
{
|
|
6152
6245
|
key: config.value,
|
|
@@ -6160,9 +6253,9 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
|
|
|
6160
6253
|
},
|
|
6161
6254
|
onClick: () => setSelectedActionType(config.value)
|
|
6162
6255
|
},
|
|
6163
|
-
/* @__PURE__ */
|
|
6256
|
+
/* @__PURE__ */ React76.createElement(Stack59, { gap: "xs" }, /* @__PURE__ */ React76.createElement(Group19, { justify: "space-between" }, /* @__PURE__ */ React76.createElement(Text36, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, config.label), selectedActionType === config.value && /* @__PURE__ */ React76.createElement(Badge8, { size: "xs", style: { backgroundColor: "#4dabf7" } }, "Selected")), config.description && /* @__PURE__ */ React76.createElement(Text36, { size: "xs", style: { color: "#adb5bd" } }, config.description))
|
|
6164
6257
|
)))))
|
|
6165
|
-
)) : /* @__PURE__ */
|
|
6258
|
+
)) : /* @__PURE__ */ React76.createElement(
|
|
6166
6259
|
Card12,
|
|
6167
6260
|
{
|
|
6168
6261
|
withBorder: true,
|
|
@@ -6172,7 +6265,7 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
|
|
|
6172
6265
|
borderColor: "#333"
|
|
6173
6266
|
}
|
|
6174
6267
|
},
|
|
6175
|
-
/* @__PURE__ */
|
|
6268
|
+
/* @__PURE__ */ React76.createElement(Group19, { justify: "space-between" }, /* @__PURE__ */ React76.createElement(Group19, { gap: "xs" }, /* @__PURE__ */ React76.createElement(
|
|
6176
6269
|
Badge8,
|
|
6177
6270
|
{
|
|
6178
6271
|
size: "sm",
|
|
@@ -6182,10 +6275,10 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
|
|
|
6182
6275
|
}
|
|
6183
6276
|
},
|
|
6184
6277
|
currentActionConfig?.label || selectedActionType
|
|
6185
|
-
), /* @__PURE__ */
|
|
6186
|
-
), /* @__PURE__ */
|
|
6278
|
+
), /* @__PURE__ */ React76.createElement(Text36, { size: "sm", style: { color: "#adb5bd" } }, "(Editing)")))
|
|
6279
|
+
), /* @__PURE__ */ React76.createElement(Divider4, { color: "#333" }), /* @__PURE__ */ React76.createElement(ScrollArea3, { style: { flex: 1 } }, renderActionForm()), /* @__PURE__ */ React76.createElement(Divider4, { color: "#333" }), /* @__PURE__ */ React76.createElement(Stack59, { gap: "xs" }, /* @__PURE__ */ React76.createElement(Text36, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Current Actions (", actions.length, ")"), /* @__PURE__ */ React76.createElement(ScrollArea3, { h: 100 }, /* @__PURE__ */ React76.createElement(Stack59, { gap: "xs" }, actions.map((action, index) => {
|
|
6187
6280
|
const config = getActionConfig(action.type);
|
|
6188
|
-
return /* @__PURE__ */
|
|
6281
|
+
return /* @__PURE__ */ React76.createElement(
|
|
6189
6282
|
Card12,
|
|
6190
6283
|
{
|
|
6191
6284
|
key: index,
|
|
@@ -6198,7 +6291,7 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
|
|
|
6198
6291
|
opacity: index === editingIndex ? 0.7 : 1
|
|
6199
6292
|
}
|
|
6200
6293
|
},
|
|
6201
|
-
/* @__PURE__ */
|
|
6294
|
+
/* @__PURE__ */ React76.createElement(Group19, { gap: "xs" }, /* @__PURE__ */ React76.createElement(
|
|
6202
6295
|
Badge8,
|
|
6203
6296
|
{
|
|
6204
6297
|
size: "sm",
|
|
@@ -6208,9 +6301,9 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
|
|
|
6208
6301
|
}
|
|
6209
6302
|
},
|
|
6210
6303
|
config?.label || action.type
|
|
6211
|
-
), /* @__PURE__ */
|
|
6304
|
+
), /* @__PURE__ */ React76.createElement(Text36, { size: "sm", style: { color: "#adb5bd" } }, config?.getSummary(action.data) || "Action"), index === editingIndex && /* @__PURE__ */ React76.createElement(Badge8, { size: "xs", style: { backgroundColor: "#4dabf7", color: "#fff" } }, "Editing"))
|
|
6212
6305
|
);
|
|
6213
|
-
})))), /* @__PURE__ */
|
|
6306
|
+
})))), /* @__PURE__ */ React76.createElement(Group19, { justify: "flex-end", mt: "md" }, /* @__PURE__ */ React76.createElement(
|
|
6214
6307
|
Button11,
|
|
6215
6308
|
{
|
|
6216
6309
|
variant: "default",
|
|
@@ -6225,7 +6318,7 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
|
|
|
6225
6318
|
}
|
|
6226
6319
|
},
|
|
6227
6320
|
"Cancel"
|
|
6228
|
-
), /* @__PURE__ */
|
|
6321
|
+
), /* @__PURE__ */ React76.createElement(
|
|
6229
6322
|
Button11,
|
|
6230
6323
|
{
|
|
6231
6324
|
onClick: handleSave,
|
|
@@ -6265,22 +6358,22 @@ var ActionsTab = ({ actions, onActionsChange, editor, block }) => {
|
|
|
6265
6358
|
setIsEditorVisible(true);
|
|
6266
6359
|
}
|
|
6267
6360
|
}, [currentActions.length, isEditorVisible]);
|
|
6268
|
-
const handleAddAction =
|
|
6361
|
+
const handleAddAction = useCallback12(() => {
|
|
6269
6362
|
setEditingIndex(null);
|
|
6270
6363
|
setIsEditorVisible(true);
|
|
6271
6364
|
}, []);
|
|
6272
|
-
const handleEditAction =
|
|
6365
|
+
const handleEditAction = useCallback12((index) => {
|
|
6273
6366
|
setEditingIndex(index);
|
|
6274
6367
|
setIsEditorVisible(true);
|
|
6275
6368
|
}, []);
|
|
6276
|
-
const handleRemoveAction =
|
|
6369
|
+
const handleRemoveAction = useCallback12(
|
|
6277
6370
|
(index) => {
|
|
6278
6371
|
const newActions = currentActions.filter((_, i) => i !== index);
|
|
6279
6372
|
onActionsChange(newActions);
|
|
6280
6373
|
},
|
|
6281
6374
|
[currentActions, onActionsChange]
|
|
6282
6375
|
);
|
|
6283
|
-
const handleSaveAction =
|
|
6376
|
+
const handleSaveAction = useCallback12(
|
|
6284
6377
|
(action) => {
|
|
6285
6378
|
let newActions;
|
|
6286
6379
|
if (editingIndex !== null) {
|
|
@@ -6294,12 +6387,12 @@ var ActionsTab = ({ actions, onActionsChange, editor, block }) => {
|
|
|
6294
6387
|
},
|
|
6295
6388
|
[editingIndex, currentActions, onActionsChange]
|
|
6296
6389
|
);
|
|
6297
|
-
const handleCancelEditor =
|
|
6390
|
+
const handleCancelEditor = useCallback12(() => {
|
|
6298
6391
|
setIsEditorVisible(false);
|
|
6299
6392
|
setEditingIndex(null);
|
|
6300
6393
|
}, []);
|
|
6301
|
-
return /* @__PURE__ */
|
|
6302
|
-
}, onEditAction: handleEditAction, onRemoveAction: handleRemoveAction }), isEditorVisible && /* @__PURE__ */
|
|
6394
|
+
return /* @__PURE__ */ React77.createElement(Stack60, { gap: "md" }, /* @__PURE__ */ React77.createElement(ActionsCard, { actions: currentActions, isSelected: false, onClick: () => {
|
|
6395
|
+
}, onEditAction: handleEditAction, onRemoveAction: handleRemoveAction }), isEditorVisible && /* @__PURE__ */ React77.createElement(
|
|
6303
6396
|
Card13,
|
|
6304
6397
|
{
|
|
6305
6398
|
withBorder: true,
|
|
@@ -6310,21 +6403,21 @@ var ActionsTab = ({ actions, onActionsChange, editor, block }) => {
|
|
|
6310
6403
|
borderColor: "#333"
|
|
6311
6404
|
}
|
|
6312
6405
|
},
|
|
6313
|
-
/* @__PURE__ */
|
|
6406
|
+
/* @__PURE__ */ React77.createElement(ActionsPanel, { actions: currentActions, editingIndex, onSave: handleSaveAction, onCancel: handleCancelEditor, isTemplateMode: true })
|
|
6314
6407
|
));
|
|
6315
6408
|
};
|
|
6316
6409
|
|
|
6317
6410
|
// src/mantine/blocks/proposal/template/VoteTab.tsx
|
|
6318
|
-
import
|
|
6411
|
+
import React78 from "react";
|
|
6319
6412
|
import { Stack as Stack61, TextInput as TextInput32 } from "@mantine/core";
|
|
6320
6413
|
var VoteTab = ({ voteTitle, voteSubtitle, voteIcon, onVoteTitleChange, onVoteSubtitleChange, onVoteIconChange }) => {
|
|
6321
|
-
return /* @__PURE__ */
|
|
6414
|
+
return /* @__PURE__ */ React78.createElement(Stack61, { gap: "md" }, /* @__PURE__ */ React78.createElement(TextInput32, { label: "Vote Button Title", placeholder: "Vote on this proposal", value: voteTitle, onChange: (event) => onVoteTitleChange(event.currentTarget.value) }), /* @__PURE__ */ React78.createElement(TextInput32, { label: "Vote Button Subtitle", placeholder: "Cast your vote", value: voteSubtitle, onChange: (event) => onVoteSubtitleChange(event.currentTarget.value) }), /* @__PURE__ */ React78.createElement(TextInput32, { label: "Vote Icon", placeholder: "checklist", value: voteIcon, onChange: (event) => onVoteIconChange(event.currentTarget.value) }));
|
|
6322
6415
|
};
|
|
6323
6416
|
|
|
6324
6417
|
// src/mantine/blocks/proposal/template/TemplateConfig.tsx
|
|
6325
6418
|
var TemplateConfig3 = ({ editor, block }) => {
|
|
6326
6419
|
const { closePanel } = usePanelStore();
|
|
6327
|
-
const updateProp =
|
|
6420
|
+
const updateProp = useCallback13(
|
|
6328
6421
|
(key, value) => {
|
|
6329
6422
|
editor.updateBlock(block, {
|
|
6330
6423
|
props: {
|
|
@@ -6335,7 +6428,7 @@ var TemplateConfig3 = ({ editor, block }) => {
|
|
|
6335
6428
|
},
|
|
6336
6429
|
[editor, block]
|
|
6337
6430
|
);
|
|
6338
|
-
return /* @__PURE__ */
|
|
6431
|
+
return /* @__PURE__ */ React79.createElement(
|
|
6339
6432
|
Paper6,
|
|
6340
6433
|
{
|
|
6341
6434
|
p: "md",
|
|
@@ -6346,7 +6439,7 @@ var TemplateConfig3 = ({ editor, block }) => {
|
|
|
6346
6439
|
flexDirection: "column"
|
|
6347
6440
|
}
|
|
6348
6441
|
},
|
|
6349
|
-
/* @__PURE__ */
|
|
6442
|
+
/* @__PURE__ */ React79.createElement(
|
|
6350
6443
|
"div",
|
|
6351
6444
|
{
|
|
6352
6445
|
style: {
|
|
@@ -6356,17 +6449,17 @@ var TemplateConfig3 = ({ editor, block }) => {
|
|
|
6356
6449
|
marginBottom: "1rem"
|
|
6357
6450
|
}
|
|
6358
6451
|
},
|
|
6359
|
-
/* @__PURE__ */
|
|
6360
|
-
/* @__PURE__ */
|
|
6452
|
+
/* @__PURE__ */ React79.createElement(Title5, { order: 3 }, "Proposal Settings"),
|
|
6453
|
+
/* @__PURE__ */ React79.createElement(CloseButton4, { onClick: closePanel })
|
|
6361
6454
|
),
|
|
6362
|
-
/* @__PURE__ */
|
|
6455
|
+
/* @__PURE__ */ React79.createElement(
|
|
6363
6456
|
ReusablePanel,
|
|
6364
6457
|
{
|
|
6365
6458
|
extraTabs: [
|
|
6366
6459
|
{
|
|
6367
6460
|
label: "General",
|
|
6368
6461
|
value: "general",
|
|
6369
|
-
content: /* @__PURE__ */
|
|
6462
|
+
content: /* @__PURE__ */ React79.createElement(
|
|
6370
6463
|
GeneralTab3,
|
|
6371
6464
|
{
|
|
6372
6465
|
title: block.props.title || "",
|
|
@@ -6381,12 +6474,12 @@ var TemplateConfig3 = ({ editor, block }) => {
|
|
|
6381
6474
|
{
|
|
6382
6475
|
label: "Actions",
|
|
6383
6476
|
value: "actions",
|
|
6384
|
-
content: /* @__PURE__ */
|
|
6477
|
+
content: /* @__PURE__ */ React79.createElement(ActionsTab, { actions: block.props.actions || "[]", onActionsChange: (actions) => updateProp("actions", JSON.stringify(actions)), editor, block })
|
|
6385
6478
|
},
|
|
6386
6479
|
{
|
|
6387
6480
|
label: "Vote",
|
|
6388
6481
|
value: "vote",
|
|
6389
|
-
content: /* @__PURE__ */
|
|
6482
|
+
content: /* @__PURE__ */ React79.createElement(
|
|
6390
6483
|
VoteTab,
|
|
6391
6484
|
{
|
|
6392
6485
|
voteTitle: block.props.voteTitle || "",
|
|
@@ -6406,21 +6499,21 @@ var TemplateConfig3 = ({ editor, block }) => {
|
|
|
6406
6499
|
};
|
|
6407
6500
|
|
|
6408
6501
|
// src/mantine/blocks/proposal/template/TemplateView.tsx
|
|
6409
|
-
import { Card as Card14, Group as Group20, Stack as Stack62, Text as Text37, ActionIcon as
|
|
6502
|
+
import { Card as Card14, Group as Group20, Stack as Stack62, Text as Text37, ActionIcon as ActionIcon8 } from "@mantine/core";
|
|
6410
6503
|
var PROPOSAL_TEMPLATE_PANEL_ID = "proposal-template-panel";
|
|
6411
6504
|
var ProposalTemplateView = ({ editor, block }) => {
|
|
6412
6505
|
const panelId = `${PROPOSAL_TEMPLATE_PANEL_ID}-${block.id}`;
|
|
6413
|
-
const panelContent =
|
|
6506
|
+
const panelContent = useMemo11(() => /* @__PURE__ */ React80.createElement(TemplateConfig3, { editor, block }), [editor, block]);
|
|
6414
6507
|
const { open } = usePanel(panelId, panelContent);
|
|
6415
|
-
return /* @__PURE__ */
|
|
6508
|
+
return /* @__PURE__ */ React80.createElement(Card14, { withBorder: true, padding: "md", radius: "md", style: { width: "100%", cursor: "pointer" }, onClick: open }, /* @__PURE__ */ React80.createElement(Group20, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React80.createElement(Group20, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React80.createElement(ActionIcon8, { variant: "light", color: "blue", size: "lg", radius: "xl", style: { flexShrink: 0 } }, getIcon(block.props.icon, 18, 1.5, "file-text")), /* @__PURE__ */ React80.createElement(Stack62, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React80.createElement(Text37, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Proposal Title"), /* @__PURE__ */ React80.createElement(Text37, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description || "Proposal description"))), /* @__PURE__ */ React80.createElement(Text37, { size: "xs", c: "dimmed", contentEditable: false }, block.props.status || "draft")));
|
|
6416
6509
|
};
|
|
6417
6510
|
|
|
6418
6511
|
// src/mantine/blocks/proposal/flow/FlowView.tsx
|
|
6419
|
-
import
|
|
6512
|
+
import React85, { useMemo as useMemo12 } from "react";
|
|
6420
6513
|
|
|
6421
6514
|
// src/mantine/blocks/proposal/components/OnChainProposalCard.tsx
|
|
6422
|
-
import
|
|
6423
|
-
import { Card as Card15, Group as Group21, Stack as Stack63, Text as Text38, Skeleton, Badge as Badge9, Button as Button13, ActionIcon as
|
|
6515
|
+
import React81 from "react";
|
|
6516
|
+
import { Card as Card15, Group as Group21, Stack as Stack63, Text as Text38, Skeleton, Badge as Badge9, Button as Button13, ActionIcon as ActionIcon9 } from "@mantine/core";
|
|
6424
6517
|
var statusColor = {
|
|
6425
6518
|
open: "#4dabf7",
|
|
6426
6519
|
passed: "#51cf66",
|
|
@@ -6449,7 +6542,7 @@ var OnChainProposalCard = ({
|
|
|
6449
6542
|
onVote,
|
|
6450
6543
|
voteEnabled = false
|
|
6451
6544
|
}) => {
|
|
6452
|
-
return /* @__PURE__ */
|
|
6545
|
+
return /* @__PURE__ */ React81.createElement(
|
|
6453
6546
|
Card15,
|
|
6454
6547
|
{
|
|
6455
6548
|
shadow: "sm",
|
|
@@ -6462,9 +6555,9 @@ var OnChainProposalCard = ({
|
|
|
6462
6555
|
},
|
|
6463
6556
|
onClick
|
|
6464
6557
|
},
|
|
6465
|
-
isFetching && /* @__PURE__ */
|
|
6466
|
-
error && /* @__PURE__ */
|
|
6467
|
-
!isFetching && /* @__PURE__ */
|
|
6558
|
+
isFetching && /* @__PURE__ */ React81.createElement(Stack63, null, /* @__PURE__ */ React81.createElement(Skeleton, { height: 20, width: "70%" }), /* @__PURE__ */ React81.createElement(Skeleton, { height: 16 }), /* @__PURE__ */ React81.createElement(Skeleton, { height: 16, width: "40%" })),
|
|
6559
|
+
error && /* @__PURE__ */ React81.createElement(Text38, { size: "sm", c: "red" }, typeof error === "string" ? error : error.message || "An error occurred while loading the proposal."),
|
|
6560
|
+
!isFetching && /* @__PURE__ */ React81.createElement(Group21, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React81.createElement(Group21, { align: "flex-start", gap: "md", style: { flex: 1 } }, /* @__PURE__ */ React81.createElement(ActionIcon9, { variant: "light", color: "blue", size: "xl", radius: "xl", style: { flexShrink: 0 } }, getIcon(icon, 24, 1.5, "file-text")), /* @__PURE__ */ React81.createElement(Stack63, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React81.createElement(Group21, { gap: "xs" }, /* @__PURE__ */ React81.createElement(Text38, { size: "md", fw: 600 }, title || "Proposal"), /* @__PURE__ */ React81.createElement(Badge9, { color: statusColor[status], variant: "filled", size: "sm", radius: "sm" }, status.replace(/_/g, " ").toUpperCase())), /* @__PURE__ */ React81.createElement(Text38, { size: "sm", c: "dimmed" }, getDisplayDescription(description)))), /* @__PURE__ */ React81.createElement(Group21, { gap: "xs" }, voteEnabled && onVote && status === "open" && /* @__PURE__ */ React81.createElement(
|
|
6468
6561
|
Button13,
|
|
6469
6562
|
{
|
|
6470
6563
|
size: "sm",
|
|
@@ -6477,7 +6570,7 @@ var OnChainProposalCard = ({
|
|
|
6477
6570
|
style: { flexShrink: 0 }
|
|
6478
6571
|
},
|
|
6479
6572
|
"Vote"
|
|
6480
|
-
), status === "passed" && onExecute && /* @__PURE__ */
|
|
6573
|
+
), status === "passed" && onExecute && /* @__PURE__ */ React81.createElement(
|
|
6481
6574
|
Button13,
|
|
6482
6575
|
{
|
|
6483
6576
|
size: "sm",
|
|
@@ -6496,8 +6589,8 @@ var OnChainProposalCard = ({
|
|
|
6496
6589
|
};
|
|
6497
6590
|
|
|
6498
6591
|
// src/mantine/blocks/proposal/flow/FlowConfig.tsx
|
|
6499
|
-
import
|
|
6500
|
-
import { Paper as Paper7, CloseButton as CloseButton5, Title as
|
|
6592
|
+
import React84, { useCallback as useCallback15, useState as useState21 } from "react";
|
|
6593
|
+
import { Paper as Paper7, CloseButton as CloseButton5, Title as Title6, Stack as Stack66, TextInput as TextInput33, Textarea as Textarea18, Button as Button16, Text as Text41, Card as Card18 } from "@mantine/core";
|
|
6501
6594
|
|
|
6502
6595
|
// src/mantine/blocks/proposal/flow/useFlowBusinessLogic.ts
|
|
6503
6596
|
import { useEffect as useEffect12, useState as useState17 } from "react";
|
|
@@ -6737,7 +6830,7 @@ var useVoteBusinessLogic = ({ block, editor }) => {
|
|
|
6737
6830
|
};
|
|
6738
6831
|
|
|
6739
6832
|
// src/mantine/blocks/proposal/flow/VoteGeneralTab.tsx
|
|
6740
|
-
import
|
|
6833
|
+
import React82, { useState as useState19 } from "react";
|
|
6741
6834
|
import { Stack as Stack64, Text as Text39, Group as Group22, Card as Card16, Button as Button14, Progress as Progress2, Box as Box16, Textarea as Textarea17, Tooltip as Tooltip3 } from "@mantine/core";
|
|
6742
6835
|
var getVoteIcon = (voteType) => {
|
|
6743
6836
|
switch (voteType) {
|
|
@@ -6780,7 +6873,7 @@ var FlowGeneralTab = ({
|
|
|
6780
6873
|
setRationale("");
|
|
6781
6874
|
}
|
|
6782
6875
|
};
|
|
6783
|
-
return /* @__PURE__ */
|
|
6876
|
+
return /* @__PURE__ */ React82.createElement(Stack64, { gap: "lg" }, !hasSubmittedProposal && /* @__PURE__ */ React82.createElement(
|
|
6784
6877
|
Card16,
|
|
6785
6878
|
{
|
|
6786
6879
|
padding: "md",
|
|
@@ -6791,7 +6884,7 @@ var FlowGeneralTab = ({
|
|
|
6791
6884
|
color: "#f1f3f5"
|
|
6792
6885
|
}
|
|
6793
6886
|
},
|
|
6794
|
-
/* @__PURE__ */
|
|
6887
|
+
/* @__PURE__ */ React82.createElement(Group22, { gap: "xs", align: "center" }, /* @__PURE__ */ React82.createElement(
|
|
6795
6888
|
Box16,
|
|
6796
6889
|
{
|
|
6797
6890
|
style: {
|
|
@@ -6801,9 +6894,9 @@ var FlowGeneralTab = ({
|
|
|
6801
6894
|
borderRadius: "50%"
|
|
6802
6895
|
}
|
|
6803
6896
|
}
|
|
6804
|
-
), /* @__PURE__ */
|
|
6805
|
-
/* @__PURE__ */
|
|
6806
|
-
), /* @__PURE__ */
|
|
6897
|
+
), /* @__PURE__ */ React82.createElement(Text39, { size: "sm", fw: 500, style: { color: "#ffd43b" } }, "Waiting for Proposal Submission")),
|
|
6898
|
+
/* @__PURE__ */ React82.createElement(Text39, { size: "xs", style: { color: "#adb5bd", marginTop: 4 } }, "The connected proposal needs to be submitted before voting can begin.")
|
|
6899
|
+
), /* @__PURE__ */ React82.createElement(
|
|
6807
6900
|
Card16,
|
|
6808
6901
|
{
|
|
6809
6902
|
padding: "lg",
|
|
@@ -6815,7 +6908,7 @@ var FlowGeneralTab = ({
|
|
|
6815
6908
|
opacity: !hasSubmittedProposal ? 0.6 : 1
|
|
6816
6909
|
}
|
|
6817
6910
|
},
|
|
6818
|
-
/* @__PURE__ */
|
|
6911
|
+
/* @__PURE__ */ React82.createElement(Stack64, { gap: "xs" }, /* @__PURE__ */ React82.createElement(Group22, { justify: "space-between" }, /* @__PURE__ */ React82.createElement(Group22, { gap: "xs" }, /* @__PURE__ */ React82.createElement(
|
|
6819
6912
|
Box16,
|
|
6820
6913
|
{
|
|
6821
6914
|
w: 8,
|
|
@@ -6825,7 +6918,7 @@ var FlowGeneralTab = ({
|
|
|
6825
6918
|
borderRadius: "50%"
|
|
6826
6919
|
}
|
|
6827
6920
|
}
|
|
6828
|
-
), /* @__PURE__ */
|
|
6921
|
+
), /* @__PURE__ */ React82.createElement(Text39, { size: "sm", style: { color: "#adb5bd" } }, "Status")), /* @__PURE__ */ React82.createElement(Text39, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, hasSubmittedProposal ? proposalStatus === "open" ? "Active" : proposalStatus || "Active" : "Waiting")), /* @__PURE__ */ React82.createElement(Group22, { justify: "space-between" }, /* @__PURE__ */ React82.createElement(Group22, { gap: "xs" }, /* @__PURE__ */ React82.createElement(Box16, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React82.createElement(Text39, { size: "sm", style: { color: "#adb5bd" } }, "Proposal ID")), /* @__PURE__ */ React82.createElement(Text39, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, hasSubmittedProposal ? `#${proposalId}` : "TBD")), /* @__PURE__ */ React82.createElement(Group22, { justify: "space-between" }, /* @__PURE__ */ React82.createElement(Group22, { gap: "xs" }, /* @__PURE__ */ React82.createElement(Box16, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React82.createElement(Text39, { size: "sm", style: { color: "#adb5bd" } }, "Title")), /* @__PURE__ */ React82.createElement(
|
|
6829
6922
|
Text39,
|
|
6830
6923
|
{
|
|
6831
6924
|
size: "sm",
|
|
@@ -6835,8 +6928,8 @@ var FlowGeneralTab = ({
|
|
|
6835
6928
|
}
|
|
6836
6929
|
},
|
|
6837
6930
|
hasSubmittedProposal ? proposalTitle || "Untitled" : "N/A"
|
|
6838
|
-
)), /* @__PURE__ */
|
|
6839
|
-
/* @__PURE__ */
|
|
6931
|
+
)), /* @__PURE__ */ React82.createElement(Group22, { justify: "space-between" }, /* @__PURE__ */ React82.createElement(Group22, { gap: "xs" }, /* @__PURE__ */ React82.createElement(Box16, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React82.createElement(Text39, { size: "sm", style: { color: "#adb5bd" } }, "Description")), /* @__PURE__ */ React82.createElement(Text39, { size: "sm", fw: 500, style: { color: "#f1f3f5" }, title: proposalDescription }, hasSubmittedProposal ? proposalDescription ? proposalDescription.length > 30 ? proposalDescription.substring(0, 30) + "..." : proposalDescription : "No description" : "N/A")), /* @__PURE__ */ React82.createElement(Group22, { justify: "space-between" }, /* @__PURE__ */ React82.createElement(Group22, { gap: "xs" }, /* @__PURE__ */ React82.createElement(Box16, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React82.createElement(Text39, { size: "sm", style: { color: "#adb5bd" } }, "My Vote")), /* @__PURE__ */ React82.createElement(Text39, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, hasSubmittedProposal ? userVote?.vote ? userVote.vote.vote : "Pending" : "N/A"))),
|
|
6932
|
+
/* @__PURE__ */ React82.createElement(Stack64, { gap: "xs" }, /* @__PURE__ */ React82.createElement(Text39, { size: "sm", style: { color: "#adb5bd" } }, hasSubmittedProposal ? "Voting is open" : "Voting pending"), /* @__PURE__ */ React82.createElement(
|
|
6840
6933
|
Progress2,
|
|
6841
6934
|
{
|
|
6842
6935
|
value: hasSubmittedProposal ? 75 : 0,
|
|
@@ -6849,7 +6942,7 @@ var FlowGeneralTab = ({
|
|
|
6849
6942
|
}
|
|
6850
6943
|
}
|
|
6851
6944
|
))
|
|
6852
|
-
), hasSubmittedProposal && !hasVoted && (status === "open" || proposalStatus === "open") && /* @__PURE__ */
|
|
6945
|
+
), hasSubmittedProposal && !hasVoted && (status === "open" || proposalStatus === "open") && /* @__PURE__ */ React82.createElement(Stack64, { gap: "lg" }, disabled && isDisabled?.message && /* @__PURE__ */ React82.createElement(
|
|
6853
6946
|
Card16,
|
|
6854
6947
|
{
|
|
6855
6948
|
padding: "md",
|
|
@@ -6860,7 +6953,7 @@ var FlowGeneralTab = ({
|
|
|
6860
6953
|
color: "#f1f3f5"
|
|
6861
6954
|
}
|
|
6862
6955
|
},
|
|
6863
|
-
/* @__PURE__ */
|
|
6956
|
+
/* @__PURE__ */ React82.createElement(Group22, { gap: "xs", align: "center" }, /* @__PURE__ */ React82.createElement(
|
|
6864
6957
|
Box16,
|
|
6865
6958
|
{
|
|
6866
6959
|
style: {
|
|
@@ -6870,8 +6963,8 @@ var FlowGeneralTab = ({
|
|
|
6870
6963
|
borderRadius: "50%"
|
|
6871
6964
|
}
|
|
6872
6965
|
}
|
|
6873
|
-
), /* @__PURE__ */
|
|
6874
|
-
), /* @__PURE__ */
|
|
6966
|
+
), /* @__PURE__ */ React82.createElement(Text39, { size: "sm", fw: 500, style: { color: "#ffd43b" } }, isDisabled.message))
|
|
6967
|
+
), /* @__PURE__ */ React82.createElement(Stack64, { gap: "md" }, ["yes", "no", "no_with_veto", "abstain"].map((voteType) => /* @__PURE__ */ React82.createElement(Tooltip3, { key: voteType, label: disabled ? isDisabled?.message : void 0, disabled: !disabled, position: "top" }, /* @__PURE__ */ React82.createElement(
|
|
6875
6968
|
Button14,
|
|
6876
6969
|
{
|
|
6877
6970
|
variant: "outline",
|
|
@@ -6890,8 +6983,8 @@ var FlowGeneralTab = ({
|
|
|
6890
6983
|
opacity: disabled ? 0.5 : 1
|
|
6891
6984
|
}
|
|
6892
6985
|
},
|
|
6893
|
-
/* @__PURE__ */
|
|
6894
|
-
)))), /* @__PURE__ */
|
|
6986
|
+
/* @__PURE__ */ React82.createElement(Text39, { fw: 500, tt: "capitalize", style: { textAlign: "left" } }, voteType === "no_with_veto" ? "No with Veto" : voteType)
|
|
6987
|
+
)))), /* @__PURE__ */ React82.createElement(Stack64, { gap: "xs" }, /* @__PURE__ */ React82.createElement(Text39, { size: "sm", style: { color: "#adb5bd" } }, "Rationale (optional)"), /* @__PURE__ */ React82.createElement(
|
|
6895
6988
|
Textarea17,
|
|
6896
6989
|
{
|
|
6897
6990
|
value: rationale,
|
|
@@ -6908,7 +7001,7 @@ var FlowGeneralTab = ({
|
|
|
6908
7001
|
}
|
|
6909
7002
|
}
|
|
6910
7003
|
}
|
|
6911
|
-
))), (status === "executed" || proposalStatus === "executed") && /* @__PURE__ */
|
|
7004
|
+
))), (status === "executed" || proposalStatus === "executed") && /* @__PURE__ */ React82.createElement(
|
|
6912
7005
|
Card16,
|
|
6913
7006
|
{
|
|
6914
7007
|
padding: "md",
|
|
@@ -6918,8 +7011,8 @@ var FlowGeneralTab = ({
|
|
|
6918
7011
|
border: "1px solid #333"
|
|
6919
7012
|
}
|
|
6920
7013
|
},
|
|
6921
|
-
/* @__PURE__ */
|
|
6922
|
-
), !hasSubmittedProposal && /* @__PURE__ */
|
|
7014
|
+
/* @__PURE__ */ React82.createElement(Stack64, { gap: "xs" }, /* @__PURE__ */ React82.createElement(Text39, { fw: 500, size: "sm", style: { color: "#f1f3f5" } }, "Proposal Executed"), /* @__PURE__ */ React82.createElement(Text39, { size: "sm", style: { color: "#adb5bd" } }, "This proposal has been successfully executed."))
|
|
7015
|
+
), !hasSubmittedProposal && /* @__PURE__ */ React82.createElement(Stack64, { gap: "lg" }, /* @__PURE__ */ React82.createElement(Stack64, { gap: "md" }, ["yes", "no", "no_with_veto", "abstain"].map((voteType) => /* @__PURE__ */ React82.createElement(Tooltip3, { key: voteType, label: "Proposal must be submitted before voting", position: "top" }, /* @__PURE__ */ React82.createElement(
|
|
6923
7016
|
Button14,
|
|
6924
7017
|
{
|
|
6925
7018
|
variant: "outline",
|
|
@@ -6936,8 +7029,8 @@ var FlowGeneralTab = ({
|
|
|
6936
7029
|
opacity: 0.5
|
|
6937
7030
|
}
|
|
6938
7031
|
},
|
|
6939
|
-
/* @__PURE__ */
|
|
6940
|
-
))))), hasSubmittedProposal && !hasVoted && selectedVote && (status === "open" || proposalStatus === "open") && /* @__PURE__ */
|
|
7032
|
+
/* @__PURE__ */ React82.createElement(Text39, { fw: 500, tt: "capitalize", style: { textAlign: "left" } }, voteType === "no_with_veto" ? "No with Veto" : voteType)
|
|
7033
|
+
))))), hasSubmittedProposal && !hasVoted && selectedVote && (status === "open" || proposalStatus === "open") && /* @__PURE__ */ React82.createElement(Tooltip3, { label: disabled ? isDisabled?.message : "Sign to vote", position: "top" }, /* @__PURE__ */ React82.createElement("div", null, /* @__PURE__ */ React82.createElement(
|
|
6941
7034
|
Button14,
|
|
6942
7035
|
{
|
|
6943
7036
|
size: "sm",
|
|
@@ -6953,7 +7046,7 @@ var FlowGeneralTab = ({
|
|
|
6953
7046
|
}
|
|
6954
7047
|
},
|
|
6955
7048
|
"Sign"
|
|
6956
|
-
))), hasVoted && hasSubmittedProposal && /* @__PURE__ */
|
|
7049
|
+
))), hasVoted && hasSubmittedProposal && /* @__PURE__ */ React82.createElement(
|
|
6957
7050
|
Card16,
|
|
6958
7051
|
{
|
|
6959
7052
|
padding: "md",
|
|
@@ -6964,7 +7057,7 @@ var FlowGeneralTab = ({
|
|
|
6964
7057
|
color: "#f1f3f5"
|
|
6965
7058
|
}
|
|
6966
7059
|
},
|
|
6967
|
-
/* @__PURE__ */
|
|
7060
|
+
/* @__PURE__ */ React82.createElement(Stack64, { gap: "xs" }, /* @__PURE__ */ React82.createElement(Group22, { gap: "xs", align: "center" }, /* @__PURE__ */ React82.createElement(
|
|
6968
7061
|
Box16,
|
|
6969
7062
|
{
|
|
6970
7063
|
style: {
|
|
@@ -6974,12 +7067,12 @@ var FlowGeneralTab = ({
|
|
|
6974
7067
|
borderRadius: "50%"
|
|
6975
7068
|
}
|
|
6976
7069
|
}
|
|
6977
|
-
), /* @__PURE__ */
|
|
7070
|
+
), /* @__PURE__ */ React82.createElement(Text39, { size: "sm", fw: 500, style: { color: "#51cf66" } }, "Vote Submitted")), /* @__PURE__ */ React82.createElement(Text39, { size: "xs", style: { color: "#adb5bd" } }, "You have already voted on this proposal. Your vote:", " ", /* @__PURE__ */ React82.createElement(Text39, { span: true, fw: 500, tt: "capitalize" }, userVote?.vote?.vote)))
|
|
6978
7071
|
));
|
|
6979
7072
|
};
|
|
6980
7073
|
|
|
6981
7074
|
// src/mantine/blocks/proposal/flow/ActionsTab.tsx
|
|
6982
|
-
import
|
|
7075
|
+
import React83, { useCallback as useCallback14, useEffect as useEffect14, useState as useState20 } from "react";
|
|
6983
7076
|
import { Alert as Alert8, Button as Button15, Card as Card17, Stack as Stack65, Text as Text40 } from "@mantine/core";
|
|
6984
7077
|
var ActionsTab2 = ({ actions, onActionsChange, editor, block, isProposalCreated }) => {
|
|
6985
7078
|
const [isEditorVisible, setIsEditorVisible] = useState20(false);
|
|
@@ -7000,12 +7093,12 @@ var ActionsTab2 = ({ actions, onActionsChange, editor, block, isProposalCreated
|
|
|
7000
7093
|
setIsEditorVisible(true);
|
|
7001
7094
|
}
|
|
7002
7095
|
}, [currentActions.length, isEditorVisible, isProposalCreated]);
|
|
7003
|
-
const handleAddAction =
|
|
7096
|
+
const handleAddAction = useCallback14(() => {
|
|
7004
7097
|
if (isProposalCreated) return;
|
|
7005
7098
|
setEditingIndex(null);
|
|
7006
7099
|
setIsEditorVisible(true);
|
|
7007
7100
|
}, [isProposalCreated]);
|
|
7008
|
-
const handleEditAction =
|
|
7101
|
+
const handleEditAction = useCallback14(
|
|
7009
7102
|
(index) => {
|
|
7010
7103
|
if (isProposalCreated) return;
|
|
7011
7104
|
setEditingIndex(index);
|
|
@@ -7013,7 +7106,7 @@ var ActionsTab2 = ({ actions, onActionsChange, editor, block, isProposalCreated
|
|
|
7013
7106
|
},
|
|
7014
7107
|
[isProposalCreated]
|
|
7015
7108
|
);
|
|
7016
|
-
const handleRemoveAction =
|
|
7109
|
+
const handleRemoveAction = useCallback14(
|
|
7017
7110
|
(index) => {
|
|
7018
7111
|
if (isProposalCreated) return;
|
|
7019
7112
|
const newActions = currentActions.filter((_, i) => i !== index);
|
|
@@ -7021,7 +7114,7 @@ var ActionsTab2 = ({ actions, onActionsChange, editor, block, isProposalCreated
|
|
|
7021
7114
|
},
|
|
7022
7115
|
[currentActions, onActionsChange, isProposalCreated]
|
|
7023
7116
|
);
|
|
7024
|
-
const handleSaveAction =
|
|
7117
|
+
const handleSaveAction = useCallback14(
|
|
7025
7118
|
(action) => {
|
|
7026
7119
|
let newActions;
|
|
7027
7120
|
if (editingIndex !== null) {
|
|
@@ -7035,11 +7128,11 @@ var ActionsTab2 = ({ actions, onActionsChange, editor, block, isProposalCreated
|
|
|
7035
7128
|
},
|
|
7036
7129
|
[editingIndex, currentActions, onActionsChange]
|
|
7037
7130
|
);
|
|
7038
|
-
const handleCancelEditor =
|
|
7131
|
+
const handleCancelEditor = useCallback14(() => {
|
|
7039
7132
|
setIsEditorVisible(false);
|
|
7040
7133
|
setEditingIndex(null);
|
|
7041
7134
|
}, []);
|
|
7042
|
-
return /* @__PURE__ */
|
|
7135
|
+
return /* @__PURE__ */ React83.createElement(Stack65, { gap: "md" }, isProposalCreated && /* @__PURE__ */ React83.createElement(Alert8, { color: "yellow", title: "Actions Locked" }, /* @__PURE__ */ React83.createElement(Text40, { size: "sm" }, "Actions cannot be edited after the proposal has been created. These actions are now part of the on-chain proposal.")), /* @__PURE__ */ React83.createElement(Stack65, { gap: "sm" }, !isProposalCreated && /* @__PURE__ */ React83.createElement(
|
|
7043
7136
|
Button15,
|
|
7044
7137
|
{
|
|
7045
7138
|
onClick: handleAddAction,
|
|
@@ -7051,7 +7144,7 @@ var ActionsTab2 = ({ actions, onActionsChange, editor, block, isProposalCreated
|
|
|
7051
7144
|
}
|
|
7052
7145
|
},
|
|
7053
7146
|
"Add Action"
|
|
7054
|
-
), /* @__PURE__ */
|
|
7147
|
+
), /* @__PURE__ */ React83.createElement(
|
|
7055
7148
|
ActionsCard,
|
|
7056
7149
|
{
|
|
7057
7150
|
actions: currentActions,
|
|
@@ -7062,7 +7155,7 @@ var ActionsTab2 = ({ actions, onActionsChange, editor, block, isProposalCreated
|
|
|
7062
7155
|
onRemoveAction: handleRemoveAction,
|
|
7063
7156
|
disabled: isProposalCreated
|
|
7064
7157
|
}
|
|
7065
|
-
)), !isProposalCreated && isEditorVisible && /* @__PURE__ */
|
|
7158
|
+
)), !isProposalCreated && isEditorVisible && /* @__PURE__ */ React83.createElement(
|
|
7066
7159
|
Card17,
|
|
7067
7160
|
{
|
|
7068
7161
|
withBorder: true,
|
|
@@ -7073,7 +7166,7 @@ var ActionsTab2 = ({ actions, onActionsChange, editor, block, isProposalCreated
|
|
|
7073
7166
|
borderColor: "#333"
|
|
7074
7167
|
}
|
|
7075
7168
|
},
|
|
7076
|
-
/* @__PURE__ */
|
|
7169
|
+
/* @__PURE__ */ React83.createElement(ActionsPanel, { actions: currentActions, editingIndex, onSave: handleSaveAction, onCancel: handleCancelEditor, isTemplateMode: false })
|
|
7077
7170
|
));
|
|
7078
7171
|
};
|
|
7079
7172
|
|
|
@@ -7089,7 +7182,7 @@ var FlowConfig = ({ editor, block }) => {
|
|
|
7089
7182
|
});
|
|
7090
7183
|
const isProposalCreated = !!proposalId;
|
|
7091
7184
|
const voteLogic = useVoteBusinessLogic({ block, editor });
|
|
7092
|
-
const updateProp =
|
|
7185
|
+
const updateProp = useCallback15(
|
|
7093
7186
|
(key, value) => {
|
|
7094
7187
|
editor.updateBlock(block, {
|
|
7095
7188
|
props: {
|
|
@@ -7126,7 +7219,7 @@ var FlowConfig = ({ editor, block }) => {
|
|
|
7126
7219
|
setIsCreating(false);
|
|
7127
7220
|
}
|
|
7128
7221
|
};
|
|
7129
|
-
const createProposalTab = /* @__PURE__ */
|
|
7222
|
+
const createProposalTab = /* @__PURE__ */ React84.createElement(Stack66, { gap: "lg" }, coreAddress && /* @__PURE__ */ React84.createElement(Card18, { padding: "sm", radius: "md", withBorder: true }, /* @__PURE__ */ React84.createElement(Text41, { size: "xs", c: "dimmed" }, "Core Address:", " ", /* @__PURE__ */ React84.createElement(Text41, { span: true, ff: "monospace", c: "bright" }, coreAddress.slice(0, 20), "...", coreAddress.slice(-10)))), /* @__PURE__ */ React84.createElement(
|
|
7130
7223
|
TextInput33,
|
|
7131
7224
|
{
|
|
7132
7225
|
label: "Title",
|
|
@@ -7137,7 +7230,7 @@ var FlowConfig = ({ editor, block }) => {
|
|
|
7137
7230
|
required: true,
|
|
7138
7231
|
disabled: isProposalCreated
|
|
7139
7232
|
}
|
|
7140
|
-
), /* @__PURE__ */
|
|
7233
|
+
), /* @__PURE__ */ React84.createElement(
|
|
7141
7234
|
Textarea18,
|
|
7142
7235
|
{
|
|
7143
7236
|
label: "Description",
|
|
@@ -7149,8 +7242,8 @@ var FlowConfig = ({ editor, block }) => {
|
|
|
7149
7242
|
required: true,
|
|
7150
7243
|
disabled: isProposalCreated
|
|
7151
7244
|
}
|
|
7152
|
-
), errors.general && /* @__PURE__ */
|
|
7153
|
-
const handleActionsChange =
|
|
7245
|
+
), errors.general && /* @__PURE__ */ React84.createElement(Text41, { size: "sm", c: "red" }, errors.general), isProposalCreated && /* @__PURE__ */ React84.createElement(Card18, { padding: "md", radius: "md", withBorder: true, style: { borderColor: "var(--mantine-color-green-6)" } }, /* @__PURE__ */ React84.createElement(Text41, { fw: 500, size: "sm", c: "green" }, "Proposal Created Successfully"), /* @__PURE__ */ React84.createElement(Text41, { size: "sm", c: "dimmed" }, "Your proposal has been created and is now open for voting.")), /* @__PURE__ */ React84.createElement(Button16, { fullWidth: true, onClick: handleCreateProposal, disabled: isProposalCreated, loading: isCreating }, isProposalCreated ? "Proposal Created" : "Create Proposal"));
|
|
7246
|
+
const handleActionsChange = useCallback15(
|
|
7154
7247
|
(newActions) => {
|
|
7155
7248
|
updateProp("actions", JSON.stringify(newActions));
|
|
7156
7249
|
},
|
|
@@ -7165,12 +7258,12 @@ var FlowConfig = ({ editor, block }) => {
|
|
|
7165
7258
|
{
|
|
7166
7259
|
label: "Actions",
|
|
7167
7260
|
value: "actions",
|
|
7168
|
-
content: /* @__PURE__ */
|
|
7261
|
+
content: /* @__PURE__ */ React84.createElement(ActionsTab2, { actions: block.props.actions || "[]", onActionsChange: handleActionsChange, editor, block, isProposalCreated })
|
|
7169
7262
|
},
|
|
7170
7263
|
{
|
|
7171
7264
|
label: "Vote",
|
|
7172
7265
|
value: "vote",
|
|
7173
|
-
content: /* @__PURE__ */
|
|
7266
|
+
content: /* @__PURE__ */ React84.createElement(
|
|
7174
7267
|
FlowGeneralTab,
|
|
7175
7268
|
{
|
|
7176
7269
|
proposalId: voteLogic.proposalId,
|
|
@@ -7186,7 +7279,7 @@ var FlowConfig = ({ editor, block }) => {
|
|
|
7186
7279
|
)
|
|
7187
7280
|
}
|
|
7188
7281
|
];
|
|
7189
|
-
return /* @__PURE__ */
|
|
7282
|
+
return /* @__PURE__ */ React84.createElement(
|
|
7190
7283
|
Paper7,
|
|
7191
7284
|
{
|
|
7192
7285
|
p: "md",
|
|
@@ -7197,7 +7290,7 @@ var FlowConfig = ({ editor, block }) => {
|
|
|
7197
7290
|
flexDirection: "column"
|
|
7198
7291
|
}
|
|
7199
7292
|
},
|
|
7200
|
-
/* @__PURE__ */
|
|
7293
|
+
/* @__PURE__ */ React84.createElement(
|
|
7201
7294
|
"div",
|
|
7202
7295
|
{
|
|
7203
7296
|
style: {
|
|
@@ -7207,10 +7300,10 @@ var FlowConfig = ({ editor, block }) => {
|
|
|
7207
7300
|
marginBottom: "1rem"
|
|
7208
7301
|
}
|
|
7209
7302
|
},
|
|
7210
|
-
/* @__PURE__ */
|
|
7211
|
-
/* @__PURE__ */
|
|
7303
|
+
/* @__PURE__ */ React84.createElement(Title6, { order: 3 }, "Proposal Settings"),
|
|
7304
|
+
/* @__PURE__ */ React84.createElement(CloseButton5, { onClick: closePanel })
|
|
7212
7305
|
),
|
|
7213
|
-
/* @__PURE__ */
|
|
7306
|
+
/* @__PURE__ */ React84.createElement(ReusablePanel, { extraTabs, context: { editor, block } })
|
|
7214
7307
|
);
|
|
7215
7308
|
};
|
|
7216
7309
|
|
|
@@ -7222,13 +7315,13 @@ var ProposalFlowView = ({ block, editor }) => {
|
|
|
7222
7315
|
block,
|
|
7223
7316
|
editor
|
|
7224
7317
|
});
|
|
7225
|
-
const panelContent =
|
|
7318
|
+
const panelContent = useMemo12(() => /* @__PURE__ */ React85.createElement(FlowConfig, { editor, block }), [editor, block]);
|
|
7226
7319
|
const { open } = usePanel(panelId, panelContent);
|
|
7227
7320
|
const handleVote = () => {
|
|
7228
7321
|
open();
|
|
7229
7322
|
};
|
|
7230
7323
|
const showVoteButton = (block.props.voteEnabled || false) && proposalId;
|
|
7231
|
-
return /* @__PURE__ */
|
|
7324
|
+
return /* @__PURE__ */ React85.createElement(
|
|
7232
7325
|
OnChainProposalCard,
|
|
7233
7326
|
{
|
|
7234
7327
|
title,
|
|
@@ -7255,10 +7348,10 @@ function ProposalBlock({ editor, block }) {
|
|
|
7255
7348
|
console.log("[ProposalBlock] Rendering with docType:", docType);
|
|
7256
7349
|
if (docType === "template") {
|
|
7257
7350
|
console.log("[ProposalBlock] Rendering ProposalTemplateView (docType is template)");
|
|
7258
|
-
return /* @__PURE__ */
|
|
7351
|
+
return /* @__PURE__ */ React86.createElement(ProposalTemplateView, { editor, block });
|
|
7259
7352
|
}
|
|
7260
7353
|
console.log("[ProposalBlock] Rendering ProposalFlowView (docType is flow)");
|
|
7261
|
-
return /* @__PURE__ */
|
|
7354
|
+
return /* @__PURE__ */ React86.createElement(ProposalFlowView, { block, editor });
|
|
7262
7355
|
}
|
|
7263
7356
|
|
|
7264
7357
|
// src/mantine/blocks/proposal/ProposalBlockSpec.tsx
|
|
@@ -7317,28 +7410,28 @@ var ProposalBlockSpec = createReactBlockSpec4(
|
|
|
7317
7410
|
{
|
|
7318
7411
|
render: (props) => {
|
|
7319
7412
|
const ixoProps = props;
|
|
7320
|
-
return /* @__PURE__ */
|
|
7413
|
+
return /* @__PURE__ */ React87.createElement(ProposalBlock, { ...ixoProps });
|
|
7321
7414
|
}
|
|
7322
7415
|
}
|
|
7323
7416
|
);
|
|
7324
7417
|
|
|
7325
7418
|
// src/mantine/blocks/apiRequest/ApiRequestBlockSpec.tsx
|
|
7326
|
-
import
|
|
7419
|
+
import React93 from "react";
|
|
7327
7420
|
import { createReactBlockSpec as createReactBlockSpec5 } from "@blocknote/react";
|
|
7328
7421
|
|
|
7329
7422
|
// src/mantine/blocks/apiRequest/ApiRequestBlock.tsx
|
|
7330
|
-
import
|
|
7423
|
+
import React92 from "react";
|
|
7331
7424
|
|
|
7332
7425
|
// src/mantine/blocks/apiRequest/template/TemplateView.tsx
|
|
7333
|
-
import
|
|
7426
|
+
import React90, { useMemo as useMemo13 } from "react";
|
|
7334
7427
|
|
|
7335
7428
|
// src/mantine/blocks/apiRequest/template/TemplateConfig.tsx
|
|
7336
|
-
import
|
|
7337
|
-
import { Paper as Paper9, CloseButton as CloseButton6, Title as
|
|
7429
|
+
import React89, { useCallback as useCallback16 } from "react";
|
|
7430
|
+
import { Paper as Paper9, CloseButton as CloseButton6, Title as Title7 } from "@mantine/core";
|
|
7338
7431
|
|
|
7339
7432
|
// src/mantine/blocks/apiRequest/template/GeneralTab.tsx
|
|
7340
|
-
import
|
|
7341
|
-
import { Divider as Divider5, Select as Select10, Stack as Stack67, Text as Text42, TextInput as TextInput34, Textarea as Textarea19, Button as Button17, Group as Group23, ActionIcon as
|
|
7433
|
+
import React88, { useEffect as useEffect15, useState as useState22 } from "react";
|
|
7434
|
+
import { Divider as Divider5, Select as Select10, Stack as Stack67, Text as Text42, TextInput as TextInput34, Textarea as Textarea19, Button as Button17, Group as Group23, ActionIcon as ActionIcon10, Paper as Paper8 } from "@mantine/core";
|
|
7342
7435
|
import { IconTrash, IconPlus } from "@tabler/icons-react";
|
|
7343
7436
|
var GeneralTab4 = ({
|
|
7344
7437
|
title,
|
|
@@ -7398,7 +7491,7 @@ var GeneralTab4 = ({
|
|
|
7398
7491
|
setLocalBody(newBody);
|
|
7399
7492
|
onBodyChange(newBody);
|
|
7400
7493
|
};
|
|
7401
|
-
return /* @__PURE__ */
|
|
7494
|
+
return /* @__PURE__ */ React88.createElement(Stack67, { gap: "lg" }, /* @__PURE__ */ React88.createElement(Stack67, { gap: "xs" }, /* @__PURE__ */ React88.createElement(Text42, { size: "sm", fw: 600 }, "Title"), /* @__PURE__ */ React88.createElement(
|
|
7402
7495
|
TextInput34,
|
|
7403
7496
|
{
|
|
7404
7497
|
placeholder: "e.g. Submit User Data",
|
|
@@ -7409,7 +7502,7 @@ var GeneralTab4 = ({
|
|
|
7409
7502
|
onTitleChange(newTitle);
|
|
7410
7503
|
}
|
|
7411
7504
|
}
|
|
7412
|
-
)), /* @__PURE__ */
|
|
7505
|
+
)), /* @__PURE__ */ React88.createElement(Stack67, { gap: "xs" }, /* @__PURE__ */ React88.createElement(Text42, { size: "sm", fw: 600 }, "Description"), /* @__PURE__ */ React88.createElement(
|
|
7413
7506
|
Textarea19,
|
|
7414
7507
|
{
|
|
7415
7508
|
placeholder: "Describe what this API request does",
|
|
@@ -7421,7 +7514,7 @@ var GeneralTab4 = ({
|
|
|
7421
7514
|
onDescriptionChange(newDescription);
|
|
7422
7515
|
}
|
|
7423
7516
|
}
|
|
7424
|
-
)), /* @__PURE__ */
|
|
7517
|
+
)), /* @__PURE__ */ React88.createElement(Divider5, { variant: "dashed" }), /* @__PURE__ */ React88.createElement(Stack67, { gap: "xs" }, /* @__PURE__ */ React88.createElement(Text42, { size: "sm", fw: 600 }, "HTTP Method"), /* @__PURE__ */ React88.createElement(
|
|
7425
7518
|
Select10,
|
|
7426
7519
|
{
|
|
7427
7520
|
value: localMethod,
|
|
@@ -7438,7 +7531,7 @@ var GeneralTab4 = ({
|
|
|
7438
7531
|
{ value: "PATCH", label: "PATCH" }
|
|
7439
7532
|
]
|
|
7440
7533
|
}
|
|
7441
|
-
)), /* @__PURE__ */
|
|
7534
|
+
)), /* @__PURE__ */ React88.createElement(Stack67, { gap: "xs" }, /* @__PURE__ */ React88.createElement(Text42, { size: "sm", fw: 600 }, "Endpoint URL"), /* @__PURE__ */ React88.createElement(
|
|
7442
7535
|
TextInput34,
|
|
7443
7536
|
{
|
|
7444
7537
|
placeholder: "https://api.example.com/endpoint",
|
|
@@ -7449,7 +7542,7 @@ var GeneralTab4 = ({
|
|
|
7449
7542
|
onEndpointChange(newEndpoint);
|
|
7450
7543
|
}
|
|
7451
7544
|
}
|
|
7452
|
-
)), /* @__PURE__ */
|
|
7545
|
+
)), /* @__PURE__ */ React88.createElement(Divider5, { variant: "dashed" }), /* @__PURE__ */ React88.createElement(Stack67, { gap: "xs" }, /* @__PURE__ */ React88.createElement(Group23, { justify: "space-between" }, /* @__PURE__ */ React88.createElement(Text42, { size: "sm", fw: 600 }, "Request Headers"), /* @__PURE__ */ React88.createElement(Button17, { size: "xs", variant: "light", leftSection: /* @__PURE__ */ React88.createElement(IconPlus, { size: 14 }), onClick: handleAddHeader }, "Add Header")), /* @__PURE__ */ React88.createElement(Text42, { size: "xs" }, "Add custom headers to your API request (e.g., Authorization, Content-Type)"), localHeaders.length > 0 && /* @__PURE__ */ React88.createElement(Stack67, { gap: "xs" }, localHeaders.map((header, index) => /* @__PURE__ */ React88.createElement(Paper8, { key: index, p: "xs" }, /* @__PURE__ */ React88.createElement(Group23, { gap: "xs", align: "flex-start" }, /* @__PURE__ */ React88.createElement(
|
|
7453
7546
|
TextInput34,
|
|
7454
7547
|
{
|
|
7455
7548
|
placeholder: "Header key (e.g., Authorization)",
|
|
@@ -7457,7 +7550,7 @@ var GeneralTab4 = ({
|
|
|
7457
7550
|
onChange: (event) => handleHeaderChange(index, "key", event.currentTarget.value),
|
|
7458
7551
|
style: { flex: 1 }
|
|
7459
7552
|
}
|
|
7460
|
-
), /* @__PURE__ */
|
|
7553
|
+
), /* @__PURE__ */ React88.createElement(
|
|
7461
7554
|
TextInput34,
|
|
7462
7555
|
{
|
|
7463
7556
|
placeholder: "Header value (e.g., Bearer token123)",
|
|
@@ -7465,7 +7558,7 @@ var GeneralTab4 = ({
|
|
|
7465
7558
|
onChange: (event) => handleHeaderChange(index, "value", event.currentTarget.value),
|
|
7466
7559
|
style: { flex: 1 }
|
|
7467
7560
|
}
|
|
7468
|
-
), /* @__PURE__ */
|
|
7561
|
+
), /* @__PURE__ */ React88.createElement(ActionIcon10, { color: "red", variant: "subtle", onClick: () => handleRemoveHeader(index) }, /* @__PURE__ */ React88.createElement(IconTrash, { size: 16 }))))))), /* @__PURE__ */ React88.createElement(Divider5, { variant: "dashed" }), /* @__PURE__ */ React88.createElement(Stack67, { gap: "xs" }, /* @__PURE__ */ React88.createElement(Group23, { justify: "space-between" }, /* @__PURE__ */ React88.createElement(Text42, { size: "sm", fw: 600 }, "Request Body (JSON)"), /* @__PURE__ */ React88.createElement(Button17, { size: "xs", variant: "light", leftSection: /* @__PURE__ */ React88.createElement(IconPlus, { size: 14 }), onClick: handleAddBodyField }, "Add Field")), /* @__PURE__ */ React88.createElement(Text42, { size: "xs" }, "Build your JSON request body as key-value pairs"), localBody.length > 0 && /* @__PURE__ */ React88.createElement(Stack67, { gap: "xs" }, localBody.map((field, index) => /* @__PURE__ */ React88.createElement(Paper8, { key: index, p: "xs" }, /* @__PURE__ */ React88.createElement(Group23, { gap: "xs", align: "flex-start" }, /* @__PURE__ */ React88.createElement(
|
|
7469
7562
|
TextInput34,
|
|
7470
7563
|
{
|
|
7471
7564
|
placeholder: "Field key (e.g., name)",
|
|
@@ -7473,7 +7566,7 @@ var GeneralTab4 = ({
|
|
|
7473
7566
|
onChange: (event) => handleBodyFieldChange(index, "key", event.currentTarget.value),
|
|
7474
7567
|
style: { flex: 1 }
|
|
7475
7568
|
}
|
|
7476
|
-
), /* @__PURE__ */
|
|
7569
|
+
), /* @__PURE__ */ React88.createElement(
|
|
7477
7570
|
TextInput34,
|
|
7478
7571
|
{
|
|
7479
7572
|
placeholder: "Field value (e.g., John Doe)",
|
|
@@ -7481,13 +7574,13 @@ var GeneralTab4 = ({
|
|
|
7481
7574
|
onChange: (event) => handleBodyFieldChange(index, "value", event.currentTarget.value),
|
|
7482
7575
|
style: { flex: 1 }
|
|
7483
7576
|
}
|
|
7484
|
-
), /* @__PURE__ */
|
|
7577
|
+
), /* @__PURE__ */ React88.createElement(ActionIcon10, { color: "red", variant: "subtle", onClick: () => handleRemoveBodyField(index) }, /* @__PURE__ */ React88.createElement(IconTrash, { size: 16 }))))))));
|
|
7485
7578
|
};
|
|
7486
7579
|
|
|
7487
7580
|
// src/mantine/blocks/apiRequest/template/TemplateConfig.tsx
|
|
7488
7581
|
var TemplateConfig4 = ({ editor, block }) => {
|
|
7489
7582
|
const { closePanel } = usePanelStore();
|
|
7490
|
-
const updateProp =
|
|
7583
|
+
const updateProp = useCallback16(
|
|
7491
7584
|
(key, value) => {
|
|
7492
7585
|
editor.updateBlock(block, {
|
|
7493
7586
|
props: {
|
|
@@ -7498,19 +7591,19 @@ var TemplateConfig4 = ({ editor, block }) => {
|
|
|
7498
7591
|
},
|
|
7499
7592
|
[editor, block]
|
|
7500
7593
|
);
|
|
7501
|
-
const handleHeadersChange =
|
|
7594
|
+
const handleHeadersChange = useCallback16(
|
|
7502
7595
|
(headers) => {
|
|
7503
7596
|
updateProp("headers", JSON.stringify(headers));
|
|
7504
7597
|
},
|
|
7505
7598
|
[updateProp]
|
|
7506
7599
|
);
|
|
7507
|
-
const handleBodyChange =
|
|
7600
|
+
const handleBodyChange = useCallback16(
|
|
7508
7601
|
(body) => {
|
|
7509
7602
|
updateProp("body", JSON.stringify(body));
|
|
7510
7603
|
},
|
|
7511
7604
|
[updateProp]
|
|
7512
7605
|
);
|
|
7513
|
-
return /* @__PURE__ */
|
|
7606
|
+
return /* @__PURE__ */ React89.createElement(
|
|
7514
7607
|
Paper9,
|
|
7515
7608
|
{
|
|
7516
7609
|
p: "md",
|
|
@@ -7521,7 +7614,7 @@ var TemplateConfig4 = ({ editor, block }) => {
|
|
|
7521
7614
|
flexDirection: "column"
|
|
7522
7615
|
}
|
|
7523
7616
|
},
|
|
7524
|
-
/* @__PURE__ */
|
|
7617
|
+
/* @__PURE__ */ React89.createElement(
|
|
7525
7618
|
"div",
|
|
7526
7619
|
{
|
|
7527
7620
|
style: {
|
|
@@ -7531,17 +7624,17 @@ var TemplateConfig4 = ({ editor, block }) => {
|
|
|
7531
7624
|
marginBottom: "1rem"
|
|
7532
7625
|
}
|
|
7533
7626
|
},
|
|
7534
|
-
/* @__PURE__ */
|
|
7535
|
-
/* @__PURE__ */
|
|
7627
|
+
/* @__PURE__ */ React89.createElement(Title7, { order: 3 }, "API Request Settings"),
|
|
7628
|
+
/* @__PURE__ */ React89.createElement(CloseButton6, { onClick: closePanel })
|
|
7536
7629
|
),
|
|
7537
|
-
/* @__PURE__ */
|
|
7630
|
+
/* @__PURE__ */ React89.createElement(
|
|
7538
7631
|
ReusablePanel,
|
|
7539
7632
|
{
|
|
7540
7633
|
extraTabs: [
|
|
7541
7634
|
{
|
|
7542
7635
|
label: "General",
|
|
7543
7636
|
value: "general",
|
|
7544
|
-
content: /* @__PURE__ */
|
|
7637
|
+
content: /* @__PURE__ */ React89.createElement(
|
|
7545
7638
|
GeneralTab4,
|
|
7546
7639
|
{
|
|
7547
7640
|
title: block.props.title || "",
|
|
@@ -7579,11 +7672,11 @@ var TemplateConfig4 = ({ editor, block }) => {
|
|
|
7579
7672
|
};
|
|
7580
7673
|
|
|
7581
7674
|
// src/mantine/blocks/apiRequest/template/TemplateView.tsx
|
|
7582
|
-
import { Card as Card19, Group as Group24, Stack as Stack68, Text as Text43, ActionIcon as
|
|
7675
|
+
import { Card as Card19, Group as Group24, Stack as Stack68, Text as Text43, ActionIcon as ActionIcon11, Badge as Badge10 } from "@mantine/core";
|
|
7583
7676
|
var API_REQUEST_TEMPLATE_PANEL_ID = "api-request-template-panel";
|
|
7584
7677
|
var ApiRequestTemplateView = ({ editor, block }) => {
|
|
7585
7678
|
const panelId = `${API_REQUEST_TEMPLATE_PANEL_ID}-${block.id}`;
|
|
7586
|
-
const panelContent =
|
|
7679
|
+
const panelContent = useMemo13(() => /* @__PURE__ */ React90.createElement(TemplateConfig4, { editor, block }), [editor, block]);
|
|
7587
7680
|
const { open } = usePanel(panelId, panelContent);
|
|
7588
7681
|
const method = block.props.method || "GET";
|
|
7589
7682
|
const endpoint = block.props.endpoint || "https://api.example.com/endpoint";
|
|
@@ -7603,13 +7696,13 @@ var ApiRequestTemplateView = ({ editor, block }) => {
|
|
|
7603
7696
|
return "gray";
|
|
7604
7697
|
}
|
|
7605
7698
|
};
|
|
7606
|
-
return /* @__PURE__ */
|
|
7699
|
+
return /* @__PURE__ */ React90.createElement(Card19, { withBorder: true, padding: "md", radius: "md", style: { width: "100%", cursor: "pointer", position: "relative" }, onClick: open }, /* @__PURE__ */ React90.createElement(Badge10, { size: "xs", variant: "light", color: "gray", style: { position: "absolute", top: 8, right: 8 } }, "Template"), /* @__PURE__ */ React90.createElement(Group24, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React90.createElement(Group24, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React90.createElement(ActionIcon11, { variant: "light", color: "violet", size: "lg", radius: "xl", style: { flexShrink: 0 } }, getIcon(block.props.icon, 18, 1.5, "square-check")), /* @__PURE__ */ React90.createElement(Stack68, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React90.createElement(Group24, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React90.createElement(Badge10, { size: "sm", variant: "filled", color: getMethodColor(method) }, method), /* @__PURE__ */ React90.createElement(Text43, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "API Request")), /* @__PURE__ */ React90.createElement(Text43, { size: "xs", c: "dimmed", contentEditable: false, lineClamp: 1 }, endpoint), block.props.description && /* @__PURE__ */ React90.createElement(Text43, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description)))));
|
|
7607
7700
|
};
|
|
7608
7701
|
|
|
7609
7702
|
// src/mantine/blocks/apiRequest/flow/FlowView.tsx
|
|
7610
|
-
import
|
|
7611
|
-
import { Card as Card20, Group as Group25, Stack as Stack69, Text as Text44, ActionIcon as
|
|
7612
|
-
import { IconSend, IconChevronDown, IconChevronUp } from "@tabler/icons-react";
|
|
7703
|
+
import React91, { useState as useState23 } from "react";
|
|
7704
|
+
import { Card as Card20, Group as Group25, Stack as Stack69, Text as Text44, ActionIcon as ActionIcon12, Tooltip as Tooltip4, Button as Button18, Badge as Badge11, Collapse as Collapse2, Code, Loader as Loader4, Alert as Alert9 } from "@mantine/core";
|
|
7705
|
+
import { IconSend, IconChevronDown as IconChevronDown2, IconChevronUp as IconChevronUp2 } from "@tabler/icons-react";
|
|
7613
7706
|
var ApiRequestFlowView = ({ editor, block, isDisabled }) => {
|
|
7614
7707
|
const disabled = isDisabled?.isDisabled === "disable";
|
|
7615
7708
|
const [isLoading, setIsLoading] = useState23(false);
|
|
@@ -7726,20 +7819,20 @@ var ApiRequestFlowView = ({ editor, block, isDisabled }) => {
|
|
|
7726
7819
|
setIsLoading(false);
|
|
7727
7820
|
}
|
|
7728
7821
|
};
|
|
7729
|
-
const executeButton = /* @__PURE__ */
|
|
7822
|
+
const executeButton = /* @__PURE__ */ React91.createElement(
|
|
7730
7823
|
Button18,
|
|
7731
7824
|
{
|
|
7732
7825
|
size: "sm",
|
|
7733
7826
|
variant: "light",
|
|
7734
7827
|
color: getMethodColor(method),
|
|
7735
|
-
leftSection: isLoading ? /* @__PURE__ */
|
|
7828
|
+
leftSection: isLoading ? /* @__PURE__ */ React91.createElement(Loader4, { size: 14 }) : /* @__PURE__ */ React91.createElement(IconSend, { size: 14 }),
|
|
7736
7829
|
onClick: handleExecuteRequest,
|
|
7737
7830
|
disabled: disabled || isLoading || !endpoint,
|
|
7738
7831
|
style: { flexShrink: 0 }
|
|
7739
7832
|
},
|
|
7740
7833
|
isLoading ? "Sending..." : "Execute"
|
|
7741
7834
|
);
|
|
7742
|
-
return /* @__PURE__ */
|
|
7835
|
+
return /* @__PURE__ */ React91.createElement(Card20, { withBorder: true, padding: "md", radius: "md", style: { width: "100%" } }, /* @__PURE__ */ React91.createElement(Stack69, { gap: "md" }, /* @__PURE__ */ React91.createElement(Group25, { wrap: "nowrap", justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React91.createElement(Group25, { wrap: "nowrap", align: "flex-start", style: { flex: 1 } }, /* @__PURE__ */ React91.createElement(ActionIcon12, { variant: "light", color: "violet", size: "lg", radius: "xl", style: { flexShrink: 0 } }, getIcon(block.props.icon, 18, 1.5, "square-check")), /* @__PURE__ */ React91.createElement(Stack69, { gap: "xs", style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React91.createElement(Group25, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React91.createElement(Badge11, { size: "sm", variant: "filled", color: getMethodColor(method) }, method), /* @__PURE__ */ React91.createElement(Text44, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "API Request"), status !== "idle" && /* @__PURE__ */ React91.createElement(Badge11, { size: "xs", variant: "dot", color: getStatusColor(status) }, status)), /* @__PURE__ */ React91.createElement(
|
|
7743
7836
|
Text44,
|
|
7744
7837
|
{
|
|
7745
7838
|
size: "xs",
|
|
@@ -7752,7 +7845,7 @@ var ApiRequestFlowView = ({ editor, block, isDisabled }) => {
|
|
|
7752
7845
|
}
|
|
7753
7846
|
},
|
|
7754
7847
|
endpoint || "No endpoint configured"
|
|
7755
|
-
), block.props.description && /* @__PURE__ */
|
|
7848
|
+
), block.props.description && /* @__PURE__ */ React91.createElement(Text44, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description))), /* @__PURE__ */ React91.createElement(Group25, { gap: "xs", style: { flexShrink: 0 } }, disabled && isDisabled?.message ? /* @__PURE__ */ React91.createElement(Tooltip4, { label: isDisabled.message, position: "left", withArrow: true }, executeButton) : executeButton, /* @__PURE__ */ React91.createElement(ActionIcon12, { variant: "subtle", onClick: () => setShowDetails(!showDetails), disabled: headers.length === 0 && body.length === 0 && !response }, showDetails ? /* @__PURE__ */ React91.createElement(IconChevronUp2, { size: 16 }) : /* @__PURE__ */ React91.createElement(IconChevronDown2, { size: 16 })))), /* @__PURE__ */ React91.createElement(Collapse2, { in: showDetails }, /* @__PURE__ */ React91.createElement(Stack69, { gap: "md" }, headers.length > 0 && /* @__PURE__ */ React91.createElement(Stack69, { gap: "xs" }, /* @__PURE__ */ React91.createElement(Text44, { size: "xs", fw: 600, c: "dimmed" }, "Headers:"), /* @__PURE__ */ React91.createElement(Code, { block: true, style: { fontSize: "11px" } }, JSON.stringify(
|
|
7756
7849
|
headers.reduce(
|
|
7757
7850
|
(acc, h) => {
|
|
7758
7851
|
if (h.key && h.value) acc[h.key] = h.value;
|
|
@@ -7762,7 +7855,7 @@ var ApiRequestFlowView = ({ editor, block, isDisabled }) => {
|
|
|
7762
7855
|
),
|
|
7763
7856
|
null,
|
|
7764
7857
|
2
|
|
7765
|
-
))), method !== "GET" && body.length > 0 && /* @__PURE__ */
|
|
7858
|
+
))), method !== "GET" && body.length > 0 && /* @__PURE__ */ React91.createElement(Stack69, { gap: "xs" }, /* @__PURE__ */ React91.createElement(Text44, { size: "xs", fw: 600, c: "dimmed" }, "Body:"), /* @__PURE__ */ React91.createElement(Code, { block: true, style: { fontSize: "11px" } }, JSON.stringify(
|
|
7766
7859
|
body.reduce(
|
|
7767
7860
|
(acc, b) => {
|
|
7768
7861
|
if (b.key && b.value) acc[b.key] = b.value;
|
|
@@ -7772,7 +7865,7 @@ var ApiRequestFlowView = ({ editor, block, isDisabled }) => {
|
|
|
7772
7865
|
),
|
|
7773
7866
|
null,
|
|
7774
7867
|
2
|
|
7775
|
-
))), response && /* @__PURE__ */
|
|
7868
|
+
))), response && /* @__PURE__ */ React91.createElement(Stack69, { gap: "xs" }, /* @__PURE__ */ React91.createElement(Text44, { size: "xs", fw: 600, c: "dimmed" }, "Response:"), status === "error" ? /* @__PURE__ */ React91.createElement(Alert9, { color: "red", title: "Error", styles: { message: { fontSize: "11px" } } }, /* @__PURE__ */ React91.createElement(Code, { block: true, style: { fontSize: "11px" } }, response)) : /* @__PURE__ */ React91.createElement(Code, { block: true, style: { fontSize: "11px", maxHeight: "300px", overflow: "auto" } }, response))))));
|
|
7776
7869
|
};
|
|
7777
7870
|
|
|
7778
7871
|
// src/mantine/blocks/apiRequest/ApiRequestBlock.tsx
|
|
@@ -7780,7 +7873,7 @@ function ApiRequestBlock({ editor, block }) {
|
|
|
7780
7873
|
const { docType } = useBlocknoteContext();
|
|
7781
7874
|
const { actions } = useBlockConditions(block, editor);
|
|
7782
7875
|
if (docType === "template") {
|
|
7783
|
-
return /* @__PURE__ */
|
|
7876
|
+
return /* @__PURE__ */ React92.createElement(ApiRequestTemplateView, { editor, block });
|
|
7784
7877
|
}
|
|
7785
7878
|
const conditionConfig = parseConditionConfig(block.props.conditions);
|
|
7786
7879
|
const hasVisibility = hasVisibilityConditions(conditionConfig);
|
|
@@ -7792,7 +7885,7 @@ function ApiRequestBlock({ editor, block }) {
|
|
|
7792
7885
|
const hasEnable = hasEnableConditions(conditionConfig);
|
|
7793
7886
|
const enableActionExists = actions.some((a) => a.action === "enable");
|
|
7794
7887
|
const shouldDisable = hasEnable && !enableActionExists;
|
|
7795
|
-
return /* @__PURE__ */
|
|
7888
|
+
return /* @__PURE__ */ React92.createElement(
|
|
7796
7889
|
ApiRequestFlowView,
|
|
7797
7890
|
{
|
|
7798
7891
|
block,
|
|
@@ -7846,36 +7939,36 @@ var ApiRequestBlockSpec = createReactBlockSpec5(
|
|
|
7846
7939
|
{
|
|
7847
7940
|
render: (props) => {
|
|
7848
7941
|
const ixoProps = props;
|
|
7849
|
-
return /* @__PURE__ */
|
|
7942
|
+
return /* @__PURE__ */ React93.createElement(ApiRequestBlock, { ...ixoProps });
|
|
7850
7943
|
}
|
|
7851
7944
|
}
|
|
7852
7945
|
);
|
|
7853
7946
|
|
|
7854
7947
|
// src/mantine/blocks/enumChecklist/EnumChecklistBlock.tsx
|
|
7855
|
-
import
|
|
7948
|
+
import React100, { useState as useState25, useEffect as useEffect16, useMemo as useMemo14, useCallback as useCallback17 } from "react";
|
|
7856
7949
|
import { createReactBlockSpec as createReactBlockSpec6 } from "@blocknote/react";
|
|
7857
|
-
import { Stack as Stack75, Text as Text50, Button as Button23, ActionIcon as
|
|
7950
|
+
import { Stack as Stack75, Text as Text50, Button as Button23, ActionIcon as ActionIcon13, Center as Center3, Flex as Flex19 } from "@mantine/core";
|
|
7858
7951
|
|
|
7859
7952
|
// src/mantine/blocks/enumChecklist/oracle_personalities/index.tsx
|
|
7860
|
-
import
|
|
7953
|
+
import React94 from "react";
|
|
7861
7954
|
import { Box as Box17, Flex as Flex18, Stack as Stack70, Text as Text45, Image as Image13 } from "@mantine/core";
|
|
7862
7955
|
function OraclePersonalitiesEnumList({ selectionMode, isItemChecked, onItemCheck, items }) {
|
|
7863
7956
|
if (!items || items.length === 0) {
|
|
7864
|
-
return /* @__PURE__ */
|
|
7957
|
+
return /* @__PURE__ */ React94.createElement(Text45, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No assets found");
|
|
7865
7958
|
}
|
|
7866
|
-
const rows = items.map(({ id, name, description, voice, icon }) => /* @__PURE__ */
|
|
7867
|
-
return /* @__PURE__ */
|
|
7959
|
+
const rows = items.map(({ id, name, description, voice, icon }) => /* @__PURE__ */ React94.createElement(ListItemContainer, { key: id }, /* @__PURE__ */ React94.createElement(Flex18, { align: "center", gap: "sm" }, /* @__PURE__ */ React94.createElement(Image13, { radius: 16, w: 62, h: 62, src: icon, alt: name }), /* @__PURE__ */ React94.createElement(Stack70, { gap: 0 }, /* @__PURE__ */ React94.createElement(Text45, { size: "sm", fw: 500 }, name || "-"), description !== void 0 && /* @__PURE__ */ React94.createElement(Text45, { size: "sm", c: "dimmed" }, description))), /* @__PURE__ */ React94.createElement(Flex18, { align: "center", gap: "md" }, /* @__PURE__ */ React94.createElement(Stack70, { ta: "right", gap: 0 }, /* @__PURE__ */ React94.createElement(Text45, { size: "sm", fw: 500 }, "Voice"), /* @__PURE__ */ React94.createElement(Text45, { size: "sm", c: "dimmed" }, voice)), selectionMode && /* @__PURE__ */ React94.createElement(ListItemCheckbox, { ariaLabel: `Select oracle ${name}`, checked: isItemChecked?.(id), onCheck: (checked) => onItemCheck?.(id, checked) }))));
|
|
7960
|
+
return /* @__PURE__ */ React94.createElement(Box17, { flex: 1 }, /* @__PURE__ */ React94.createElement(Stack70, null, rows));
|
|
7868
7961
|
}
|
|
7869
7962
|
|
|
7870
7963
|
// src/mantine/blocks/enumChecklist/EnumChecklistConfigModal.tsx
|
|
7871
|
-
import
|
|
7964
|
+
import React99, { useState as useState24 } from "react";
|
|
7872
7965
|
import { Modal, Group as Group29, Box as Box19 } from "@mantine/core";
|
|
7873
7966
|
|
|
7874
7967
|
// src/mantine/blocks/list/modal/ModalNavigation.tsx
|
|
7875
|
-
import
|
|
7968
|
+
import React95 from "react";
|
|
7876
7969
|
import { Stack as Stack71, Button as Button19, Text as Text46 } from "@mantine/core";
|
|
7877
7970
|
var ModalNavigation = ({ steps, activeStep, onStepChange, showUpdateButton = false, onUpdateBlock }) => {
|
|
7878
|
-
return /* @__PURE__ */
|
|
7971
|
+
return /* @__PURE__ */ React95.createElement(Stack71, { gap: "xs", style: { height: "100%" } }, /* @__PURE__ */ React95.createElement(Stack71, { gap: "xs", style: { flex: 1 } }, steps.map((step) => /* @__PURE__ */ React95.createElement(
|
|
7879
7972
|
Button19,
|
|
7880
7973
|
{
|
|
7881
7974
|
key: step.id,
|
|
@@ -7893,12 +7986,12 @@ var ModalNavigation = ({ steps, activeStep, onStepChange, showUpdateButton = fal
|
|
|
7893
7986
|
}
|
|
7894
7987
|
}
|
|
7895
7988
|
},
|
|
7896
|
-
/* @__PURE__ */
|
|
7897
|
-
))), showUpdateButton && /* @__PURE__ */
|
|
7989
|
+
/* @__PURE__ */ React95.createElement(Stack71, { gap: 2, align: "flex-start" }, /* @__PURE__ */ React95.createElement(Text46, { size: "sm", fw: 500 }, step.label), /* @__PURE__ */ React95.createElement(Text46, { size: "xs", opacity: 0.7 }, step.description))
|
|
7990
|
+
))), showUpdateButton && /* @__PURE__ */ React95.createElement(Button19, { variant: "filled", color: "blue", onClick: onUpdateBlock, style: { marginTop: "auto" } }, "Update Block"));
|
|
7898
7991
|
};
|
|
7899
7992
|
|
|
7900
7993
|
// src/mantine/blocks/enumChecklist/EnumChecklistTypeSelection.tsx
|
|
7901
|
-
import
|
|
7994
|
+
import React96 from "react";
|
|
7902
7995
|
import { Stack as Stack72, Card as Card21, Group as Group26, Text as Text47, Box as Box18, Button as Button20 } from "@mantine/core";
|
|
7903
7996
|
|
|
7904
7997
|
// src/mantine/blocks/enumChecklist/oracle_personalities/config.ts
|
|
@@ -8028,7 +8121,7 @@ function getEnumListItems(type) {
|
|
|
8028
8121
|
// src/mantine/blocks/enumChecklist/EnumChecklistTypeSelection.tsx
|
|
8029
8122
|
var EnumChecklistTypeSelection = ({ selectedType, onTypeSelect, onNext }) => {
|
|
8030
8123
|
const enumListsMeta = getEnumListTypesMetadata();
|
|
8031
|
-
return /* @__PURE__ */
|
|
8124
|
+
return /* @__PURE__ */ React96.createElement(Stack72, { gap: "md" }, /* @__PURE__ */ React96.createElement("div", null, /* @__PURE__ */ React96.createElement(Text47, { size: "lg", fw: 600, mb: "xs" }, "Choose List Type"), /* @__PURE__ */ React96.createElement(Text47, { size: "sm", c: "dimmed" }, "Select the type of list you want to create")), /* @__PURE__ */ React96.createElement(Stack72, { gap: "sm" }, enumListsMeta.map((enumChecklistMeta) => /* @__PURE__ */ React96.createElement(
|
|
8032
8125
|
Card21,
|
|
8033
8126
|
{
|
|
8034
8127
|
key: enumChecklistMeta.id,
|
|
@@ -8041,7 +8134,7 @@ var EnumChecklistTypeSelection = ({ selectedType, onTypeSelect, onNext }) => {
|
|
|
8041
8134
|
},
|
|
8042
8135
|
onClick: () => onTypeSelect(enumChecklistMeta.id)
|
|
8043
8136
|
},
|
|
8044
|
-
/* @__PURE__ */
|
|
8137
|
+
/* @__PURE__ */ React96.createElement(Group26, { gap: "md", align: "flex-start" }, /* @__PURE__ */ React96.createElement(
|
|
8045
8138
|
Box18,
|
|
8046
8139
|
{
|
|
8047
8140
|
style: {
|
|
@@ -8057,27 +8150,27 @@ var EnumChecklistTypeSelection = ({ selectedType, onTypeSelect, onNext }) => {
|
|
|
8057
8150
|
}
|
|
8058
8151
|
},
|
|
8059
8152
|
enumChecklistMeta.icon
|
|
8060
|
-
), /* @__PURE__ */
|
|
8061
|
-
))), /* @__PURE__ */
|
|
8153
|
+
), /* @__PURE__ */ React96.createElement(Stack72, { gap: 2, style: { flex: 1 } }, /* @__PURE__ */ React96.createElement(Text47, { size: "md", fw: 600 }, enumChecklistMeta.name), /* @__PURE__ */ React96.createElement(Text47, { size: "sm", c: "dimmed" }, enumChecklistMeta.description)))
|
|
8154
|
+
))), /* @__PURE__ */ React96.createElement(Group26, { justify: "flex-end", mt: "md" }, /* @__PURE__ */ React96.createElement(Button20, { onClick: onNext, disabled: !selectedType }, "Next")));
|
|
8062
8155
|
};
|
|
8063
8156
|
|
|
8064
8157
|
// src/mantine/blocks/enumChecklist/EnumChecklistPreviewStep.tsx
|
|
8065
|
-
import
|
|
8158
|
+
import React97 from "react";
|
|
8066
8159
|
import { Stack as Stack73, Text as Text48, Button as Button21, Group as Group27 } from "@mantine/core";
|
|
8067
8160
|
var EnumChecklistPreviewStep = ({ listType, onAddToBlock, onPrev }) => {
|
|
8068
8161
|
const renderListComponent = () => {
|
|
8069
8162
|
switch (listType) {
|
|
8070
8163
|
case "oracle_personalities":
|
|
8071
|
-
return /* @__PURE__ */
|
|
8164
|
+
return /* @__PURE__ */ React97.createElement(OraclePersonalitiesEnumList, { items: getEnumListItems(listType) });
|
|
8072
8165
|
default:
|
|
8073
8166
|
return null;
|
|
8074
8167
|
}
|
|
8075
8168
|
};
|
|
8076
|
-
return /* @__PURE__ */
|
|
8169
|
+
return /* @__PURE__ */ React97.createElement(Stack73, { gap: "md" }, /* @__PURE__ */ React97.createElement("div", null, /* @__PURE__ */ React97.createElement(Text48, { size: "lg", fw: 600, mb: "xs" }, "Preview ", getEnumListNameByType(listType)), /* @__PURE__ */ React97.createElement(Text48, { size: "sm", c: "dimmed" }, "Preview how your list will look with the current configuration")), /* @__PURE__ */ React97.createElement("div", { style: { maxHeight: "400px", overflow: "auto" } }, renderListComponent()), /* @__PURE__ */ React97.createElement(Group27, { justify: "space-between", mt: "md" }, /* @__PURE__ */ React97.createElement(Button21, { variant: "subtle", onClick: onPrev }, "Previous"), /* @__PURE__ */ React97.createElement(Button21, { onClick: onAddToBlock }, "Add to Block")));
|
|
8077
8170
|
};
|
|
8078
8171
|
|
|
8079
8172
|
// src/mantine/blocks/enumChecklist/EnumChecklistConfigurationStep.tsx
|
|
8080
|
-
import
|
|
8173
|
+
import React98 from "react";
|
|
8081
8174
|
import { Stack as Stack74, TextInput as TextInput35, Text as Text49, Button as Button22, Group as Group28, Switch as Switch4, Select as Select11 } from "@mantine/core";
|
|
8082
8175
|
var EnumChecklistConfigurationStep = ({ enumChecklistType: listType, config, onConfigChange, onPrev, onNext, isValid }) => {
|
|
8083
8176
|
const typeConfig = ENUM_LIST_CONFIG[listType];
|
|
@@ -8085,7 +8178,7 @@ var EnumChecklistConfigurationStep = ({ enumChecklistType: listType, config, onC
|
|
|
8085
8178
|
const renderListConfigField = (field) => {
|
|
8086
8179
|
switch (field.type) {
|
|
8087
8180
|
case "text":
|
|
8088
|
-
return /* @__PURE__ */
|
|
8181
|
+
return /* @__PURE__ */ React98.createElement(
|
|
8089
8182
|
TextInput35,
|
|
8090
8183
|
{
|
|
8091
8184
|
label: field.label,
|
|
@@ -8097,7 +8190,7 @@ var EnumChecklistConfigurationStep = ({ enumChecklistType: listType, config, onC
|
|
|
8097
8190
|
}
|
|
8098
8191
|
);
|
|
8099
8192
|
case "switch":
|
|
8100
|
-
return /* @__PURE__ */
|
|
8193
|
+
return /* @__PURE__ */ React98.createElement(
|
|
8101
8194
|
Switch4,
|
|
8102
8195
|
{
|
|
8103
8196
|
label: field.label,
|
|
@@ -8107,7 +8200,7 @@ var EnumChecklistConfigurationStep = ({ enumChecklistType: listType, config, onC
|
|
|
8107
8200
|
}
|
|
8108
8201
|
);
|
|
8109
8202
|
case "select":
|
|
8110
|
-
return /* @__PURE__ */
|
|
8203
|
+
return /* @__PURE__ */ React98.createElement(
|
|
8111
8204
|
Select11,
|
|
8112
8205
|
{
|
|
8113
8206
|
label: field.label,
|
|
@@ -8120,7 +8213,7 @@ var EnumChecklistConfigurationStep = ({ enumChecklistType: listType, config, onC
|
|
|
8120
8213
|
}
|
|
8121
8214
|
);
|
|
8122
8215
|
default:
|
|
8123
|
-
return /* @__PURE__ */
|
|
8216
|
+
return /* @__PURE__ */ React98.createElement(
|
|
8124
8217
|
TextInput35,
|
|
8125
8218
|
{
|
|
8126
8219
|
label: field.label,
|
|
@@ -8133,7 +8226,7 @@ var EnumChecklistConfigurationStep = ({ enumChecklistType: listType, config, onC
|
|
|
8133
8226
|
);
|
|
8134
8227
|
}
|
|
8135
8228
|
};
|
|
8136
|
-
return /* @__PURE__ */
|
|
8229
|
+
return /* @__PURE__ */ React98.createElement(Stack74, { gap: "md" }, /* @__PURE__ */ React98.createElement("div", null, /* @__PURE__ */ React98.createElement(Text49, { size: "lg", fw: 600, mb: "xs" }, "Configure ", typeConfig.metadata.name), /* @__PURE__ */ React98.createElement(Text49, { size: "sm", c: "dimmed" }, typeConfig.metadata.description)), /* @__PURE__ */ React98.createElement(Stack74, { gap: "sm" }, configFields.map((field) => /* @__PURE__ */ React98.createElement("div", { key: field.key }, renderListConfigField(field)))), /* @__PURE__ */ React98.createElement(Group28, { justify: "space-between", mt: "md" }, /* @__PURE__ */ React98.createElement(Button22, { variant: "subtle", onClick: onPrev }, "Previous"), /* @__PURE__ */ React98.createElement(Button22, { onClick: onNext, disabled: !isValid }, "Next")));
|
|
8137
8230
|
};
|
|
8138
8231
|
|
|
8139
8232
|
// src/mantine/blocks/enumChecklist/EnumChecklistConfigModal.tsx
|
|
@@ -8195,9 +8288,9 @@ var EnumChecklistConfigModal = ({ opened, onClose, onSave, initialConfig }) => {
|
|
|
8195
8288
|
const renderStepContent = () => {
|
|
8196
8289
|
switch (activeStep) {
|
|
8197
8290
|
case "type":
|
|
8198
|
-
return /* @__PURE__ */
|
|
8291
|
+
return /* @__PURE__ */ React99.createElement(EnumChecklistTypeSelection, { selectedType, onTypeSelect: handleTypeSelect, onNext: () => setActiveStep("configure") });
|
|
8199
8292
|
case "configure":
|
|
8200
|
-
return selectedType ? /* @__PURE__ */
|
|
8293
|
+
return selectedType ? /* @__PURE__ */ React99.createElement(
|
|
8201
8294
|
EnumChecklistConfigurationStep,
|
|
8202
8295
|
{
|
|
8203
8296
|
enumChecklistType: selectedType,
|
|
@@ -8209,22 +8302,22 @@ var EnumChecklistConfigModal = ({ opened, onClose, onSave, initialConfig }) => {
|
|
|
8209
8302
|
}
|
|
8210
8303
|
) : null;
|
|
8211
8304
|
case "preview":
|
|
8212
|
-
return selectedType ? /* @__PURE__ */
|
|
8305
|
+
return selectedType ? /* @__PURE__ */ React99.createElement(EnumChecklistPreviewStep, { listType: selectedType, onAddToBlock: handleAddToBlock, onPrev: () => setActiveStep("configure") }) : null;
|
|
8213
8306
|
default:
|
|
8214
8307
|
return null;
|
|
8215
8308
|
}
|
|
8216
8309
|
};
|
|
8217
|
-
return /* @__PURE__ */
|
|
8310
|
+
return /* @__PURE__ */ React99.createElement(Modal, { opened, onClose: handleClose, title: "Configure Enum Checklist Block", size: "xl" }, /* @__PURE__ */ React99.createElement(Group29, { align: "flex-start", gap: "lg", style: { minHeight: "400px" } }, /* @__PURE__ */ React99.createElement(Box19, { style: { width: "200px", flexShrink: 0, height: "400px", display: "flex" } }, /* @__PURE__ */ React99.createElement(ModalNavigation, { steps, activeStep, onStepChange: setActiveStep, showUpdateButton: selectedType !== null, onUpdateBlock: handleAddToBlock })), /* @__PURE__ */ React99.createElement(Box19, { style: { flex: 1 } }, renderStepContent())));
|
|
8218
8311
|
};
|
|
8219
8312
|
|
|
8220
8313
|
// src/mantine/blocks/enumChecklist/EnumChecklistBlock.tsx
|
|
8221
|
-
var IconSettings2 = () => /* @__PURE__ */
|
|
8314
|
+
var IconSettings2 = () => /* @__PURE__ */ React100.createElement("span", null, "\u2699\uFE0F");
|
|
8222
8315
|
var EnumChecklistBlockType = "enumChecklist";
|
|
8223
8316
|
var EnumChecklistBlockContent = ({ block, editor }) => {
|
|
8224
8317
|
const [modalOpened, setModalOpened] = useState25(false);
|
|
8225
8318
|
const { editable } = useBlocknoteContext();
|
|
8226
8319
|
const listType = block.props.listType && block.props.listType !== "" ? block.props.listType : null;
|
|
8227
|
-
const listConfig =
|
|
8320
|
+
const listConfig = useMemo14(() => {
|
|
8228
8321
|
if (block.props.listConfig && block.props.listConfig !== "{}") {
|
|
8229
8322
|
try {
|
|
8230
8323
|
return JSON.parse(block.props.listConfig);
|
|
@@ -8235,7 +8328,7 @@ var EnumChecklistBlockContent = ({ block, editor }) => {
|
|
|
8235
8328
|
}
|
|
8236
8329
|
return {};
|
|
8237
8330
|
}, [block.props.listConfig]);
|
|
8238
|
-
const selectedIds =
|
|
8331
|
+
const selectedIds = useMemo14(() => {
|
|
8239
8332
|
if (block.props.selectedIds && block.props.selectedIds !== "[]") {
|
|
8240
8333
|
try {
|
|
8241
8334
|
return new Set(JSON.parse(block.props.selectedIds));
|
|
@@ -8255,13 +8348,13 @@ var EnumChecklistBlockContent = ({ block, editor }) => {
|
|
|
8255
8348
|
});
|
|
8256
8349
|
}
|
|
8257
8350
|
}, [listConfig?.selection_mode, selectedIds]);
|
|
8258
|
-
const isItemChecked =
|
|
8351
|
+
const isItemChecked = useCallback17(
|
|
8259
8352
|
(id) => {
|
|
8260
8353
|
return selectedIds.has(id);
|
|
8261
8354
|
},
|
|
8262
8355
|
[selectedIds]
|
|
8263
8356
|
);
|
|
8264
|
-
const onItemCheck =
|
|
8357
|
+
const onItemCheck = useCallback17(
|
|
8265
8358
|
(id, checked) => {
|
|
8266
8359
|
const currentSelectedIds = Array.from(selectedIds);
|
|
8267
8360
|
let newSelectedIds;
|
|
@@ -8304,7 +8397,7 @@ var EnumChecklistBlockContent = ({ block, editor }) => {
|
|
|
8304
8397
|
if (!listType) return null;
|
|
8305
8398
|
switch (listType) {
|
|
8306
8399
|
case "oracle_personalities":
|
|
8307
|
-
return /* @__PURE__ */
|
|
8400
|
+
return /* @__PURE__ */ React100.createElement(
|
|
8308
8401
|
OraclePersonalitiesEnumList,
|
|
8309
8402
|
{
|
|
8310
8403
|
items: getEnumListItems(listType),
|
|
@@ -8317,7 +8410,7 @@ var EnumChecklistBlockContent = ({ block, editor }) => {
|
|
|
8317
8410
|
return null;
|
|
8318
8411
|
}
|
|
8319
8412
|
};
|
|
8320
|
-
return /* @__PURE__ */
|
|
8413
|
+
return /* @__PURE__ */ React100.createElement(Stack75, { w: "100%" }, listType && /* @__PURE__ */ React100.createElement(Flex19, { align: "center", justify: "space-between", gap: "xs" }, /* @__PURE__ */ React100.createElement(Text50, null, getEnumListNameByType(listType)), listConfig.listSelectionMode && /* @__PURE__ */ React100.createElement(Text50, { lh: 0.5, c: "dimmed" }, listConfig?.selection_mode === "single" ? "Single Selection" : "Multi Selection"), editable && /* @__PURE__ */ React100.createElement(Flex19, { justify: listType ? "space-between" : "flex-end" }, /* @__PURE__ */ React100.createElement(Flex19, { gap: "xs" }, /* @__PURE__ */ React100.createElement(ActionIcon13, { variant: "subtle", size: "sm", onClick: () => setModalOpened(true) }, /* @__PURE__ */ React100.createElement(IconSettings2, null))))), /* @__PURE__ */ React100.createElement(Flex19, { flex: 1 }, !listType ? /* @__PURE__ */ React100.createElement(Center3, { py: "xl" }, /* @__PURE__ */ React100.createElement(Stack75, { align: "center", gap: "sm" }, /* @__PURE__ */ React100.createElement(Text50, { size: "sm", c: "dimmed", ta: "center" }, "No list type configured"), /* @__PURE__ */ React100.createElement(Button23, { size: "sm", variant: "light", onClick: () => setModalOpened(true) }, "Configure List"))) : /* @__PURE__ */ React100.createElement(Stack75, { gap: "md", flex: 1 }, renderListComponent())), /* @__PURE__ */ React100.createElement(
|
|
8321
8414
|
EnumChecklistConfigModal,
|
|
8322
8415
|
{
|
|
8323
8416
|
opened: modalOpened,
|
|
@@ -8349,27 +8442,27 @@ var EnumChecklistBlock = createReactBlockSpec6(
|
|
|
8349
8442
|
content: "none"
|
|
8350
8443
|
},
|
|
8351
8444
|
{
|
|
8352
|
-
render: (props) => /* @__PURE__ */
|
|
8445
|
+
render: (props) => /* @__PURE__ */ React100.createElement(EnumChecklistBlockContent, { ...props })
|
|
8353
8446
|
}
|
|
8354
8447
|
);
|
|
8355
8448
|
|
|
8356
8449
|
// src/mantine/blocks/notify/NotifyBlockSpec.tsx
|
|
8357
|
-
import
|
|
8450
|
+
import React106 from "react";
|
|
8358
8451
|
import { createReactBlockSpec as createReactBlockSpec7 } from "@blocknote/react";
|
|
8359
8452
|
|
|
8360
8453
|
// src/mantine/blocks/notify/NotifyBlock.tsx
|
|
8361
|
-
import
|
|
8454
|
+
import React105 from "react";
|
|
8362
8455
|
|
|
8363
8456
|
// src/mantine/blocks/notify/template/TemplateView.tsx
|
|
8364
|
-
import
|
|
8457
|
+
import React103, { useMemo as useMemo15 } from "react";
|
|
8365
8458
|
|
|
8366
8459
|
// src/mantine/blocks/notify/template/TemplateConfig.tsx
|
|
8367
|
-
import
|
|
8368
|
-
import { Paper as Paper11, CloseButton as CloseButton7, Title as
|
|
8460
|
+
import React102, { useCallback as useCallback18 } from "react";
|
|
8461
|
+
import { Paper as Paper11, CloseButton as CloseButton7, Title as Title8 } from "@mantine/core";
|
|
8369
8462
|
|
|
8370
8463
|
// src/mantine/blocks/notify/template/GeneralTab.tsx
|
|
8371
|
-
import
|
|
8372
|
-
import { Divider as Divider6, Select as Select12, Stack as Stack76, Text as Text51, TextInput as TextInput36, Textarea as Textarea20, Button as Button24, Group as Group30, ActionIcon as
|
|
8464
|
+
import React101, { useEffect as useEffect17, useState as useState26 } from "react";
|
|
8465
|
+
import { Divider as Divider6, Select as Select12, Stack as Stack76, Text as Text51, TextInput as TextInput36, Textarea as Textarea20, Button as Button24, Group as Group30, ActionIcon as ActionIcon14, Paper as Paper10 } from "@mantine/core";
|
|
8373
8466
|
import { IconTrash as IconTrash2, IconPlus as IconPlus2 } from "@tabler/icons-react";
|
|
8374
8467
|
var GeneralTab5 = ({
|
|
8375
8468
|
title,
|
|
@@ -8442,7 +8535,7 @@ var GeneralTab5 = ({
|
|
|
8442
8535
|
setter(newRecipients);
|
|
8443
8536
|
callback(newRecipients);
|
|
8444
8537
|
};
|
|
8445
|
-
return /* @__PURE__ */
|
|
8538
|
+
return /* @__PURE__ */ React101.createElement(Stack76, { gap: "lg" }, /* @__PURE__ */ React101.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React101.createElement(Text51, { size: "sm", fw: 600 }, "Title"), /* @__PURE__ */ React101.createElement(
|
|
8446
8539
|
TextInput36,
|
|
8447
8540
|
{
|
|
8448
8541
|
placeholder: "e.g. Welcome Email",
|
|
@@ -8453,7 +8546,7 @@ var GeneralTab5 = ({
|
|
|
8453
8546
|
onTitleChange(newTitle);
|
|
8454
8547
|
}
|
|
8455
8548
|
}
|
|
8456
|
-
)), /* @__PURE__ */
|
|
8549
|
+
)), /* @__PURE__ */ React101.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React101.createElement(Text51, { size: "sm", fw: 600 }, "Description"), /* @__PURE__ */ React101.createElement(
|
|
8457
8550
|
Textarea20,
|
|
8458
8551
|
{
|
|
8459
8552
|
placeholder: "Describe what this notification does",
|
|
@@ -8465,7 +8558,7 @@ var GeneralTab5 = ({
|
|
|
8465
8558
|
onDescriptionChange(newDescription);
|
|
8466
8559
|
}
|
|
8467
8560
|
}
|
|
8468
|
-
)), /* @__PURE__ */
|
|
8561
|
+
)), /* @__PURE__ */ React101.createElement(Divider6, { variant: "dashed" }), /* @__PURE__ */ React101.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React101.createElement(Text51, { size: "sm", fw: 600 }, "Channel"), /* @__PURE__ */ React101.createElement(
|
|
8469
8562
|
Select12,
|
|
8470
8563
|
{
|
|
8471
8564
|
value: localChannel,
|
|
@@ -8481,7 +8574,7 @@ var GeneralTab5 = ({
|
|
|
8481
8574
|
{ value: "rcs", label: "RCS (Coming Soon)", disabled: true }
|
|
8482
8575
|
]
|
|
8483
8576
|
}
|
|
8484
|
-
)), /* @__PURE__ */
|
|
8577
|
+
)), /* @__PURE__ */ React101.createElement(Divider6, { variant: "dashed" }), localChannel === "email" && /* @__PURE__ */ React101.createElement(React101.Fragment, null, /* @__PURE__ */ React101.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React101.createElement(Group30, { justify: "space-between" }, /* @__PURE__ */ React101.createElement(Text51, { size: "sm", fw: 600 }, "To (Recipients)"), /* @__PURE__ */ React101.createElement(Button24, { size: "xs", leftSection: /* @__PURE__ */ React101.createElement(IconPlus2, { size: 14 }), onClick: () => handleAddRecipient("to") }, "Add")), localTo.length === 0 && /* @__PURE__ */ React101.createElement(Text51, { size: "xs", c: "dimmed" }, "No recipients added yet"), /* @__PURE__ */ React101.createElement(Stack76, { gap: "xs" }, localTo.map((recipient, index) => /* @__PURE__ */ React101.createElement(Paper10, { key: index, p: "xs", withBorder: true }, /* @__PURE__ */ React101.createElement(Group30, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React101.createElement(TextInput36, { style: { flex: 1 }, placeholder: "email@example.com", value: recipient, onChange: (e) => handleRecipientChange("to", index, e.currentTarget.value) }), /* @__PURE__ */ React101.createElement(ActionIcon14, { color: "red", variant: "light", onClick: () => handleRemoveRecipient("to", index) }, /* @__PURE__ */ React101.createElement(IconTrash2, { size: 16 }))))))), /* @__PURE__ */ React101.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React101.createElement(Group30, { justify: "space-between" }, /* @__PURE__ */ React101.createElement(Text51, { size: "sm", fw: 600 }, "CC (Optional)"), /* @__PURE__ */ React101.createElement(Button24, { size: "xs", leftSection: /* @__PURE__ */ React101.createElement(IconPlus2, { size: 14 }), onClick: () => handleAddRecipient("cc") }, "Add")), localCc.length > 0 && /* @__PURE__ */ React101.createElement(Stack76, { gap: "xs" }, localCc.map((recipient, index) => /* @__PURE__ */ React101.createElement(Paper10, { key: index, p: "xs", withBorder: true }, /* @__PURE__ */ React101.createElement(Group30, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React101.createElement(
|
|
8485
8578
|
TextInput36,
|
|
8486
8579
|
{
|
|
8487
8580
|
style: { flex: 1 },
|
|
@@ -8489,7 +8582,7 @@ var GeneralTab5 = ({
|
|
|
8489
8582
|
value: recipient,
|
|
8490
8583
|
onChange: (e) => handleRecipientChange("cc", index, e.currentTarget.value)
|
|
8491
8584
|
}
|
|
8492
|
-
), /* @__PURE__ */
|
|
8585
|
+
), /* @__PURE__ */ React101.createElement(ActionIcon14, { color: "red", variant: "light", onClick: () => handleRemoveRecipient("cc", index) }, /* @__PURE__ */ React101.createElement(IconTrash2, { size: 16 }))))))), /* @__PURE__ */ React101.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React101.createElement(Group30, { justify: "space-between" }, /* @__PURE__ */ React101.createElement(Text51, { size: "sm", fw: 600 }, "BCC (Optional)"), /* @__PURE__ */ React101.createElement(Button24, { size: "xs", leftSection: /* @__PURE__ */ React101.createElement(IconPlus2, { size: 14 }), onClick: () => handleAddRecipient("bcc") }, "Add")), localBcc.length > 0 && /* @__PURE__ */ React101.createElement(Stack76, { gap: "xs" }, localBcc.map((recipient, index) => /* @__PURE__ */ React101.createElement(Paper10, { key: index, p: "xs", withBorder: true }, /* @__PURE__ */ React101.createElement(Group30, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React101.createElement(
|
|
8493
8586
|
TextInput36,
|
|
8494
8587
|
{
|
|
8495
8588
|
style: { flex: 1 },
|
|
@@ -8497,7 +8590,7 @@ var GeneralTab5 = ({
|
|
|
8497
8590
|
value: recipient,
|
|
8498
8591
|
onChange: (e) => handleRecipientChange("bcc", index, e.currentTarget.value)
|
|
8499
8592
|
}
|
|
8500
|
-
), /* @__PURE__ */
|
|
8593
|
+
), /* @__PURE__ */ React101.createElement(ActionIcon14, { color: "red", variant: "light", onClick: () => handleRemoveRecipient("bcc", index) }, /* @__PURE__ */ React101.createElement(IconTrash2, { size: 16 }))))))), /* @__PURE__ */ React101.createElement(Divider6, { variant: "dashed" }), /* @__PURE__ */ React101.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React101.createElement(Text51, { size: "sm", fw: 600 }, "From (Optional)"), /* @__PURE__ */ React101.createElement(
|
|
8501
8594
|
TextInput36,
|
|
8502
8595
|
{
|
|
8503
8596
|
placeholder: "sender@example.com",
|
|
@@ -8508,7 +8601,7 @@ var GeneralTab5 = ({
|
|
|
8508
8601
|
onFromChange(newFrom);
|
|
8509
8602
|
}
|
|
8510
8603
|
}
|
|
8511
|
-
), /* @__PURE__ */
|
|
8604
|
+
), /* @__PURE__ */ React101.createElement(Text51, { size: "xs", c: "dimmed" }, "Custom sender email address")), /* @__PURE__ */ React101.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React101.createElement(Text51, { size: "sm", fw: 600 }, "Reply-To (Optional)"), /* @__PURE__ */ React101.createElement(
|
|
8512
8605
|
TextInput36,
|
|
8513
8606
|
{
|
|
8514
8607
|
placeholder: "reply@example.com",
|
|
@@ -8519,7 +8612,7 @@ var GeneralTab5 = ({
|
|
|
8519
8612
|
onReplyToChange(newReplyTo);
|
|
8520
8613
|
}
|
|
8521
8614
|
}
|
|
8522
|
-
), /* @__PURE__ */
|
|
8615
|
+
), /* @__PURE__ */ React101.createElement(Text51, { size: "xs", c: "dimmed" }, "Where replies should be sent")), /* @__PURE__ */ React101.createElement(Divider6, { variant: "dashed" }), /* @__PURE__ */ React101.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React101.createElement(Text51, { size: "sm", fw: 600 }, "Subject"), /* @__PURE__ */ React101.createElement(
|
|
8523
8616
|
TextInput36,
|
|
8524
8617
|
{
|
|
8525
8618
|
placeholder: "Email subject line",
|
|
@@ -8530,7 +8623,7 @@ var GeneralTab5 = ({
|
|
|
8530
8623
|
onSubjectChange(newSubject);
|
|
8531
8624
|
}
|
|
8532
8625
|
}
|
|
8533
|
-
)), /* @__PURE__ */
|
|
8626
|
+
)), /* @__PURE__ */ React101.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React101.createElement(Text51, { size: "sm", fw: 600 }, "Body Type"), /* @__PURE__ */ React101.createElement(
|
|
8534
8627
|
Select12,
|
|
8535
8628
|
{
|
|
8536
8629
|
value: localBodyType,
|
|
@@ -8544,7 +8637,7 @@ var GeneralTab5 = ({
|
|
|
8544
8637
|
{ value: "html", label: "HTML" }
|
|
8545
8638
|
]
|
|
8546
8639
|
}
|
|
8547
|
-
)), /* @__PURE__ */
|
|
8640
|
+
)), /* @__PURE__ */ React101.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React101.createElement(Text51, { size: "sm", fw: 600 }, "Body"), /* @__PURE__ */ React101.createElement(
|
|
8548
8641
|
Textarea20,
|
|
8549
8642
|
{
|
|
8550
8643
|
placeholder: localBodyType === "html" ? "<h1>Hello!</h1><p>Welcome to our service.</p>" : "Email body content",
|
|
@@ -8556,13 +8649,13 @@ var GeneralTab5 = ({
|
|
|
8556
8649
|
onBodyChange(newBody);
|
|
8557
8650
|
}
|
|
8558
8651
|
}
|
|
8559
|
-
), /* @__PURE__ */
|
|
8652
|
+
), /* @__PURE__ */ React101.createElement(Text51, { size: "xs", c: "dimmed" }, localBodyType === "html" ? "HTML content for the email body" : "Plain text content for the email body"))));
|
|
8560
8653
|
};
|
|
8561
8654
|
|
|
8562
8655
|
// src/mantine/blocks/notify/template/TemplateConfig.tsx
|
|
8563
8656
|
var TemplateConfig5 = ({ editor, block }) => {
|
|
8564
8657
|
const { closePanel } = usePanelStore();
|
|
8565
|
-
const updateProp =
|
|
8658
|
+
const updateProp = useCallback18(
|
|
8566
8659
|
(key, value) => {
|
|
8567
8660
|
editor.updateBlock(block, {
|
|
8568
8661
|
props: {
|
|
@@ -8573,25 +8666,25 @@ var TemplateConfig5 = ({ editor, block }) => {
|
|
|
8573
8666
|
},
|
|
8574
8667
|
[editor, block]
|
|
8575
8668
|
);
|
|
8576
|
-
const handleToChange =
|
|
8669
|
+
const handleToChange = useCallback18(
|
|
8577
8670
|
(to) => {
|
|
8578
8671
|
updateProp("to", JSON.stringify(to));
|
|
8579
8672
|
},
|
|
8580
8673
|
[updateProp]
|
|
8581
8674
|
);
|
|
8582
|
-
const handleCcChange =
|
|
8675
|
+
const handleCcChange = useCallback18(
|
|
8583
8676
|
(cc) => {
|
|
8584
8677
|
updateProp("cc", JSON.stringify(cc));
|
|
8585
8678
|
},
|
|
8586
8679
|
[updateProp]
|
|
8587
8680
|
);
|
|
8588
|
-
const handleBccChange =
|
|
8681
|
+
const handleBccChange = useCallback18(
|
|
8589
8682
|
(bcc) => {
|
|
8590
8683
|
updateProp("bcc", JSON.stringify(bcc));
|
|
8591
8684
|
},
|
|
8592
8685
|
[updateProp]
|
|
8593
8686
|
);
|
|
8594
|
-
return /* @__PURE__ */
|
|
8687
|
+
return /* @__PURE__ */ React102.createElement(
|
|
8595
8688
|
Paper11,
|
|
8596
8689
|
{
|
|
8597
8690
|
p: "md",
|
|
@@ -8602,7 +8695,7 @@ var TemplateConfig5 = ({ editor, block }) => {
|
|
|
8602
8695
|
flexDirection: "column"
|
|
8603
8696
|
}
|
|
8604
8697
|
},
|
|
8605
|
-
/* @__PURE__ */
|
|
8698
|
+
/* @__PURE__ */ React102.createElement(
|
|
8606
8699
|
"div",
|
|
8607
8700
|
{
|
|
8608
8701
|
style: {
|
|
@@ -8612,17 +8705,17 @@ var TemplateConfig5 = ({ editor, block }) => {
|
|
|
8612
8705
|
marginBottom: "1rem"
|
|
8613
8706
|
}
|
|
8614
8707
|
},
|
|
8615
|
-
/* @__PURE__ */
|
|
8616
|
-
/* @__PURE__ */
|
|
8708
|
+
/* @__PURE__ */ React102.createElement(Title8, { order: 3 }, "Notification Settings"),
|
|
8709
|
+
/* @__PURE__ */ React102.createElement(CloseButton7, { onClick: closePanel })
|
|
8617
8710
|
),
|
|
8618
|
-
/* @__PURE__ */
|
|
8711
|
+
/* @__PURE__ */ React102.createElement(
|
|
8619
8712
|
ReusablePanel,
|
|
8620
8713
|
{
|
|
8621
8714
|
extraTabs: [
|
|
8622
8715
|
{
|
|
8623
8716
|
label: "General",
|
|
8624
8717
|
value: "general",
|
|
8625
|
-
content: /* @__PURE__ */
|
|
8718
|
+
content: /* @__PURE__ */ React102.createElement(
|
|
8626
8719
|
GeneralTab5,
|
|
8627
8720
|
{
|
|
8628
8721
|
title: block.props.title || "",
|
|
@@ -8676,11 +8769,11 @@ var TemplateConfig5 = ({ editor, block }) => {
|
|
|
8676
8769
|
};
|
|
8677
8770
|
|
|
8678
8771
|
// src/mantine/blocks/notify/template/TemplateView.tsx
|
|
8679
|
-
import { Card as Card22, Group as Group31, Stack as Stack77, Text as Text52, ActionIcon as
|
|
8772
|
+
import { Card as Card22, Group as Group31, Stack as Stack77, Text as Text52, ActionIcon as ActionIcon15, Badge as Badge12 } from "@mantine/core";
|
|
8680
8773
|
var NOTIFY_TEMPLATE_PANEL_ID = "notify-template-panel";
|
|
8681
8774
|
var NotifyTemplateView = ({ editor, block }) => {
|
|
8682
8775
|
const panelId = `${NOTIFY_TEMPLATE_PANEL_ID}-${block.id}`;
|
|
8683
|
-
const panelContent =
|
|
8776
|
+
const panelContent = useMemo15(() => /* @__PURE__ */ React103.createElement(TemplateConfig5, { editor, block }), [editor, block]);
|
|
8684
8777
|
const { open } = usePanel(panelId, panelContent);
|
|
8685
8778
|
const channel = block.props.channel || "email";
|
|
8686
8779
|
const to = (() => {
|
|
@@ -8705,13 +8798,13 @@ var NotifyTemplateView = ({ editor, block }) => {
|
|
|
8705
8798
|
return "gray";
|
|
8706
8799
|
}
|
|
8707
8800
|
};
|
|
8708
|
-
return /* @__PURE__ */
|
|
8801
|
+
return /* @__PURE__ */ React103.createElement(Card22, { withBorder: true, padding: "md", radius: "md", style: { width: "100%", cursor: "pointer", position: "relative" }, onClick: open }, /* @__PURE__ */ React103.createElement(Badge12, { size: "xs", variant: "light", color: "gray", style: { position: "absolute", top: 8, right: 8 } }, "Template"), /* @__PURE__ */ React103.createElement(Group31, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React103.createElement(Group31, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React103.createElement(ActionIcon15, { variant: "light", color: getChannelColor(channel), size: "lg", radius: "xl", style: { flexShrink: 0 } }, getIcon(block.props.icon, 18, 1.5, "bell")), /* @__PURE__ */ React103.createElement(Stack77, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React103.createElement(Group31, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React103.createElement(Badge12, { size: "sm", variant: "filled", color: getChannelColor(channel) }, channel.toUpperCase()), /* @__PURE__ */ React103.createElement(Text52, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Notification")), /* @__PURE__ */ React103.createElement(Text52, { size: "xs", c: "dimmed", contentEditable: false, lineClamp: 1 }, to.length > 0 ? `To: ${to.join(", ")}` : "Click to configure recipients"), block.props.description && /* @__PURE__ */ React103.createElement(Text52, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description)))));
|
|
8709
8802
|
};
|
|
8710
8803
|
|
|
8711
8804
|
// src/mantine/blocks/notify/flow/FlowView.tsx
|
|
8712
|
-
import
|
|
8713
|
-
import { Card as Card23, Group as Group32, Stack as Stack78, Text as Text53, ActionIcon as
|
|
8714
|
-
import { IconSend as IconSend2, IconChevronDown as
|
|
8805
|
+
import React104, { useState as useState27 } from "react";
|
|
8806
|
+
import { Card as Card23, Group as Group32, Stack as Stack78, Text as Text53, ActionIcon as ActionIcon16, Tooltip as Tooltip5, Button as Button25, Badge as Badge13, Collapse as Collapse3, Alert as Alert10, Loader as Loader5, Code as Code2 } from "@mantine/core";
|
|
8807
|
+
import { IconSend as IconSend2, IconChevronDown as IconChevronDown3, IconChevronUp as IconChevronUp3, IconCheck, IconX } from "@tabler/icons-react";
|
|
8715
8808
|
var NotifyFlowView = ({ editor, block, isDisabled }) => {
|
|
8716
8809
|
const disabled = isDisabled?.isDisabled === "disable";
|
|
8717
8810
|
const [isLoading, setIsLoading] = useState27(false);
|
|
@@ -8816,20 +8909,20 @@ var NotifyFlowView = ({ editor, block, isDisabled }) => {
|
|
|
8816
8909
|
}
|
|
8817
8910
|
};
|
|
8818
8911
|
const canSend = !disabled && !isLoading && handlers && to.length > 0 && (channel === "email" ? block.props.subject && block.props.body : true);
|
|
8819
|
-
const sendButton = /* @__PURE__ */
|
|
8912
|
+
const sendButton = /* @__PURE__ */ React104.createElement(
|
|
8820
8913
|
Button25,
|
|
8821
8914
|
{
|
|
8822
8915
|
size: "sm",
|
|
8823
8916
|
variant: "light",
|
|
8824
8917
|
color: getChannelColor(channel),
|
|
8825
|
-
leftSection: isLoading ? /* @__PURE__ */
|
|
8918
|
+
leftSection: isLoading ? /* @__PURE__ */ React104.createElement(Loader5, { size: 14 }) : status === "sent" ? /* @__PURE__ */ React104.createElement(IconCheck, { size: 14 }) : /* @__PURE__ */ React104.createElement(IconSend2, { size: 14 }),
|
|
8826
8919
|
onClick: handleSendNotification,
|
|
8827
8920
|
disabled: !canSend,
|
|
8828
8921
|
style: { flexShrink: 0 }
|
|
8829
8922
|
},
|
|
8830
8923
|
isLoading ? "Sending..." : status === "sent" ? "Sent" : "Send"
|
|
8831
8924
|
);
|
|
8832
|
-
return /* @__PURE__ */
|
|
8925
|
+
return /* @__PURE__ */ React104.createElement(Card23, { withBorder: true, padding: "md", radius: "md", style: { width: "100%" } }, /* @__PURE__ */ React104.createElement(Stack78, { gap: "md" }, /* @__PURE__ */ React104.createElement(Group32, { wrap: "nowrap", justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React104.createElement(Group32, { wrap: "nowrap", align: "flex-start", style: { flex: 1 } }, /* @__PURE__ */ React104.createElement(ActionIcon16, { variant: "light", color: getChannelColor(channel), size: "lg", radius: "xl", style: { flexShrink: 0 } }, getIcon(block.props.icon, 18, 1.5, "bell")), /* @__PURE__ */ React104.createElement(Stack78, { gap: "xs", style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React104.createElement(Group32, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React104.createElement(Badge13, { size: "sm", variant: "filled", color: getChannelColor(channel) }, channel.toUpperCase()), /* @__PURE__ */ React104.createElement(Text53, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Notification"), status !== "idle" && /* @__PURE__ */ React104.createElement(Badge13, { size: "xs", variant: "dot", color: getStatusColor(status) }, status)), /* @__PURE__ */ React104.createElement(Text53, { size: "xs", c: "dimmed", contentEditable: false, lineClamp: 1 }, to.length > 0 ? `To: ${to.slice(0, 2).join(", ")}${to.length > 2 ? ` +${to.length - 2} more` : ""}` : "No recipients"), block.props.description && /* @__PURE__ */ React104.createElement(Text53, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description))), /* @__PURE__ */ React104.createElement(Group32, { gap: "xs", style: { flexShrink: 0 } }, disabled && isDisabled?.message ? /* @__PURE__ */ React104.createElement(Tooltip5, { label: isDisabled.message, position: "left", withArrow: true }, sendButton) : sendButton, /* @__PURE__ */ React104.createElement(ActionIcon16, { variant: "subtle", onClick: () => setShowDetails(!showDetails) }, showDetails ? /* @__PURE__ */ React104.createElement(IconChevronUp3, { size: 16 }) : /* @__PURE__ */ React104.createElement(IconChevronDown3, { size: 16 })))), status === "failed" && block.props.errorMessage && /* @__PURE__ */ React104.createElement(Alert10, { color: "red", icon: /* @__PURE__ */ React104.createElement(IconX, { size: 16 }), title: "Failed to send", styles: { message: { fontSize: "12px" } } }, block.props.errorMessage), status === "sent" && block.props.messageId && /* @__PURE__ */ React104.createElement(Alert10, { color: "green", icon: /* @__PURE__ */ React104.createElement(IconCheck, { size: 16 }), title: "Sent successfully", styles: { message: { fontSize: "12px" } } }, "Message ID: ", block.props.messageId, block.props.sentAt && /* @__PURE__ */ React104.createElement(React104.Fragment, null, /* @__PURE__ */ React104.createElement("br", null), "Sent at: ", new Date(block.props.sentAt).toLocaleString())), /* @__PURE__ */ React104.createElement(Collapse3, { in: showDetails }, /* @__PURE__ */ React104.createElement(Stack78, { gap: "md" }, channel === "email" && /* @__PURE__ */ React104.createElement(React104.Fragment, null, /* @__PURE__ */ React104.createElement(Stack78, { gap: "xs" }, /* @__PURE__ */ React104.createElement(Text53, { size: "xs", fw: 600, c: "dimmed" }, "Recipients:"), /* @__PURE__ */ React104.createElement(Code2, { block: true, style: { fontSize: "11px" } }, JSON.stringify(
|
|
8833
8926
|
{
|
|
8834
8927
|
to: to.filter((e) => e.trim() !== ""),
|
|
8835
8928
|
...cc.length > 0 && { cc: cc.filter((e) => e.trim() !== "") },
|
|
@@ -8837,7 +8930,7 @@ var NotifyFlowView = ({ editor, block, isDisabled }) => {
|
|
|
8837
8930
|
},
|
|
8838
8931
|
null,
|
|
8839
8932
|
2
|
|
8840
|
-
))), block.props.subject && /* @__PURE__ */
|
|
8933
|
+
))), block.props.subject && /* @__PURE__ */ React104.createElement(Stack78, { gap: "xs" }, /* @__PURE__ */ React104.createElement(Text53, { size: "xs", fw: 600, c: "dimmed" }, "Subject:"), /* @__PURE__ */ React104.createElement(Text53, { size: "xs" }, block.props.subject)), block.props.body && /* @__PURE__ */ React104.createElement(Stack78, { gap: "xs" }, /* @__PURE__ */ React104.createElement(Text53, { size: "xs", fw: 600, c: "dimmed" }, "Body (", block.props.bodyType || "text", "):"), /* @__PURE__ */ React104.createElement(Code2, { block: true, style: { fontSize: "11px", maxHeight: "200px", overflow: "auto" } }, block.props.body)), (block.props.from || block.props.replyTo) && /* @__PURE__ */ React104.createElement(Stack78, { gap: "xs" }, /* @__PURE__ */ React104.createElement(Text53, { size: "xs", fw: 600, c: "dimmed" }, "Additional:"), /* @__PURE__ */ React104.createElement(Code2, { block: true, style: { fontSize: "11px" } }, JSON.stringify(
|
|
8841
8934
|
{
|
|
8842
8935
|
...block.props.from && { from: block.props.from },
|
|
8843
8936
|
...block.props.replyTo && { replyTo: block.props.replyTo }
|
|
@@ -8852,7 +8945,7 @@ function NotifyBlock({ editor, block }) {
|
|
|
8852
8945
|
const { editable } = useBlocknoteContext();
|
|
8853
8946
|
const { actions } = useBlockConditions(block, editor);
|
|
8854
8947
|
if (editable) {
|
|
8855
|
-
return /* @__PURE__ */
|
|
8948
|
+
return /* @__PURE__ */ React105.createElement(NotifyTemplateView, { editor, block });
|
|
8856
8949
|
}
|
|
8857
8950
|
const conditionConfig = parseConditionConfig(block.props.conditions);
|
|
8858
8951
|
const hasVisibility = hasVisibilityConditions(conditionConfig);
|
|
@@ -8864,7 +8957,7 @@ function NotifyBlock({ editor, block }) {
|
|
|
8864
8957
|
const hasEnable = hasEnableConditions(conditionConfig);
|
|
8865
8958
|
const enableActionExists = actions.some((a) => a.action === "enable");
|
|
8866
8959
|
const shouldDisable = hasEnable && !enableActionExists;
|
|
8867
|
-
return /* @__PURE__ */
|
|
8960
|
+
return /* @__PURE__ */ React105.createElement(NotifyFlowView, { block, editor, isDisabled: shouldDisable ? { isDisabled: "disable", message: "Notification disabled by conditions" } : void 0 });
|
|
8868
8961
|
}
|
|
8869
8962
|
|
|
8870
8963
|
// src/mantine/blocks/notify/NotifyBlockSpec.tsx
|
|
@@ -8908,11 +9001,20 @@ var NotifyBlockSpec = createReactBlockSpec7(
|
|
|
8908
9001
|
{
|
|
8909
9002
|
render: (props) => {
|
|
8910
9003
|
const ixoProps = props;
|
|
8911
|
-
return /* @__PURE__ */
|
|
9004
|
+
return /* @__PURE__ */ React106.createElement(NotifyBlock, { ...ixoProps });
|
|
8912
9005
|
}
|
|
8913
9006
|
}
|
|
8914
9007
|
);
|
|
8915
9008
|
|
|
9009
|
+
// src/mantine/blocks/list/ui/ListBlocksToolbar.tsx
|
|
9010
|
+
import React107 from "react";
|
|
9011
|
+
import { ActionIcon as ActionIcon17, Group as Group33, Tooltip as Tooltip6 } from "@mantine/core";
|
|
9012
|
+
import { IconChevronUp as IconChevronUp4, IconChevronDown as IconChevronDown4 } from "@tabler/icons-react";
|
|
9013
|
+
var ListBlocksToolbar = () => {
|
|
9014
|
+
const { broadcastCollapse } = useListBlocksUI();
|
|
9015
|
+
return /* @__PURE__ */ React107.createElement(Group33, { gap: "xs" }, /* @__PURE__ */ React107.createElement(Tooltip6, { label: "Collapse all lists", withArrow: true }, /* @__PURE__ */ React107.createElement(ActionIcon17, { c: "dimmed", variant: "subtle", size: "sm", "aria-label": "Collapse all lists", onClick: () => broadcastCollapse("collapse") }, /* @__PURE__ */ React107.createElement(IconChevronUp4, { size: 18 }))), /* @__PURE__ */ React107.createElement(Tooltip6, { label: "Expand all lists", withArrow: true }, /* @__PURE__ */ React107.createElement(ActionIcon17, { c: "dimmed", variant: "subtle", size: "sm", "aria-label": "Expand all lists", onClick: () => broadcastCollapse("expand") }, /* @__PURE__ */ React107.createElement(IconChevronDown4, { size: 18 }))));
|
|
9016
|
+
};
|
|
9017
|
+
|
|
8916
9018
|
// src/mantine/blocks/registry/blockRegistry.ts
|
|
8917
9019
|
var BlockRegistry = class {
|
|
8918
9020
|
constructor() {
|
|
@@ -9039,10 +9141,10 @@ blockRegistry.register({
|
|
|
9039
9141
|
});
|
|
9040
9142
|
|
|
9041
9143
|
// src/mantine/blocks/hooks/useBlockDependencies.ts
|
|
9042
|
-
import { useMemo as
|
|
9144
|
+
import { useMemo as useMemo16, useEffect as useEffect18, useState as useState28, useCallback as useCallback19 } from "react";
|
|
9043
9145
|
|
|
9044
9146
|
// src/mantine/blocks/hooks/useDependsOn.ts
|
|
9045
|
-
import { useMemo as
|
|
9147
|
+
import { useMemo as useMemo17 } from "react";
|
|
9046
9148
|
|
|
9047
9149
|
// src/mantine/blocks/index.ts
|
|
9048
9150
|
var blockSpecs = {
|
|
@@ -9361,15 +9463,15 @@ import { useCreateBlockNote as useCreateBlockNote2 } from "@blocknote/react";
|
|
|
9361
9463
|
import { BlockNoteSchema as BlockNoteSchema2, defaultBlockSpecs as defaultBlockSpecs2, defaultInlineContentSpecs as defaultInlineContentSpecs2, defaultStyleSpecs as defaultStyleSpecs2 } from "@blocknote/core";
|
|
9362
9464
|
|
|
9363
9465
|
// src/core/hooks/useMatrixProvider.ts
|
|
9364
|
-
import { useEffect as useEffect19, useState as useState29, useRef as
|
|
9466
|
+
import { useEffect as useEffect19, useState as useState29, useRef as useRef4, useCallback as useCallback20, useMemo as useMemo18 } from "react";
|
|
9365
9467
|
import { MatrixProvider } from "@ixo/matrix-crdt";
|
|
9366
9468
|
function useMatrixProvider({ matrixClient, roomId, yDoc }) {
|
|
9367
9469
|
const [matrixProvider, setProvider] = useState29(null);
|
|
9368
9470
|
const [status, setStatus] = useState29("disconnected");
|
|
9369
|
-
const isMountedRef =
|
|
9370
|
-
const providerRef =
|
|
9371
|
-
const retryTimeoutRef =
|
|
9372
|
-
const providerOptions =
|
|
9471
|
+
const isMountedRef = useRef4(true);
|
|
9472
|
+
const providerRef = useRef4(null);
|
|
9473
|
+
const retryTimeoutRef = useRef4(null);
|
|
9474
|
+
const providerOptions = useMemo18(
|
|
9373
9475
|
() => ({
|
|
9374
9476
|
translator: {
|
|
9375
9477
|
updateEventType: "matrix-crdt.doc_update",
|
|
@@ -9382,22 +9484,22 @@ function useMatrixProvider({ matrixClient, roomId, yDoc }) {
|
|
|
9382
9484
|
}),
|
|
9383
9485
|
[]
|
|
9384
9486
|
);
|
|
9385
|
-
const handleDocumentAvailable =
|
|
9487
|
+
const handleDocumentAvailable = useCallback20(() => {
|
|
9386
9488
|
if (isMountedRef.current) {
|
|
9387
9489
|
setStatus("connected");
|
|
9388
9490
|
}
|
|
9389
9491
|
}, []);
|
|
9390
|
-
const handleDocumentUnavailable =
|
|
9492
|
+
const handleDocumentUnavailable = useCallback20(() => {
|
|
9391
9493
|
if (isMountedRef.current) {
|
|
9392
9494
|
setStatus("failed");
|
|
9393
9495
|
}
|
|
9394
9496
|
}, []);
|
|
9395
|
-
const handleCanWriteChanged =
|
|
9497
|
+
const handleCanWriteChanged = useCallback20(() => {
|
|
9396
9498
|
if (isMountedRef.current && providerRef.current) {
|
|
9397
9499
|
setStatus(providerRef.current.canWrite ? "connected" : "failed");
|
|
9398
9500
|
}
|
|
9399
9501
|
}, []);
|
|
9400
|
-
const initProvider =
|
|
9502
|
+
const initProvider = useCallback20(async () => {
|
|
9401
9503
|
if (!isMountedRef.current) return;
|
|
9402
9504
|
if (retryTimeoutRef.current) {
|
|
9403
9505
|
clearTimeout(retryTimeoutRef.current);
|
|
@@ -9457,17 +9559,17 @@ function useMatrixProvider({ matrixClient, roomId, yDoc }) {
|
|
|
9457
9559
|
}
|
|
9458
9560
|
|
|
9459
9561
|
// src/mantine/hooks/useCollaborativeYDoc.ts
|
|
9460
|
-
import { useMemo as
|
|
9562
|
+
import { useMemo as useMemo19 } from "react";
|
|
9461
9563
|
import * as Y from "yjs";
|
|
9462
9564
|
function useCollaborativeYDoc(_options) {
|
|
9463
|
-
return
|
|
9565
|
+
return useMemo19(() => {
|
|
9464
9566
|
const doc = new Y.Doc();
|
|
9465
9567
|
return doc;
|
|
9466
9568
|
}, []);
|
|
9467
9569
|
}
|
|
9468
9570
|
|
|
9469
9571
|
// src/mantine/hooks/useCollaborativeIxoEditor.ts
|
|
9470
|
-
import { useMemo as
|
|
9572
|
+
import { useMemo as useMemo20, useEffect as useEffect20 } from "react";
|
|
9471
9573
|
function useCreateCollaborativeIxoEditor(options) {
|
|
9472
9574
|
const yDoc = useCollaborativeYDoc(options);
|
|
9473
9575
|
const {
|
|
@@ -9485,7 +9587,7 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
9485
9587
|
matrixClient,
|
|
9486
9588
|
permissions = { write: false }
|
|
9487
9589
|
} = options || {};
|
|
9488
|
-
const memoizedUser =
|
|
9590
|
+
const memoizedUser = useMemo20(
|
|
9489
9591
|
() => ({
|
|
9490
9592
|
id: user?.id || "",
|
|
9491
9593
|
name: user?.name || "",
|
|
@@ -9500,7 +9602,7 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
9500
9602
|
matrixClient,
|
|
9501
9603
|
roomId: options.roomId
|
|
9502
9604
|
});
|
|
9503
|
-
const defaultUploadFile =
|
|
9605
|
+
const defaultUploadFile = useMemo20(
|
|
9504
9606
|
() => uploadFile || (async (file) => {
|
|
9505
9607
|
return new Promise((resolve, reject) => {
|
|
9506
9608
|
const reader = new FileReader();
|
|
@@ -9514,7 +9616,7 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
9514
9616
|
}),
|
|
9515
9617
|
[uploadFile]
|
|
9516
9618
|
);
|
|
9517
|
-
const schema =
|
|
9619
|
+
const schema = useMemo20(
|
|
9518
9620
|
() => BlockNoteSchema2.create({
|
|
9519
9621
|
blockSpecs: {
|
|
9520
9622
|
...defaultBlockSpecs2,
|
|
@@ -9529,11 +9631,11 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
9529
9631
|
}),
|
|
9530
9632
|
[]
|
|
9531
9633
|
);
|
|
9532
|
-
const root =
|
|
9533
|
-
const documentFragment =
|
|
9534
|
-
const flowArray =
|
|
9535
|
-
const userFragment =
|
|
9536
|
-
const collaborationConfig =
|
|
9634
|
+
const root = useMemo20(() => yDoc.getMap("root"), [yDoc]);
|
|
9635
|
+
const documentFragment = useMemo20(() => yDoc.getXmlFragment("document"), [yDoc]);
|
|
9636
|
+
const flowArray = useMemo20(() => yDoc.getArray("flow"), [yDoc]);
|
|
9637
|
+
const userFragment = useMemo20(() => yDoc.getMap(memoizedUser.id), [yDoc, memoizedUser.id]);
|
|
9638
|
+
const collaborationConfig = useMemo20(
|
|
9537
9639
|
() => ({
|
|
9538
9640
|
provider: matrixProvider,
|
|
9539
9641
|
fragment: documentFragment,
|
|
@@ -9545,7 +9647,7 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
9545
9647
|
}),
|
|
9546
9648
|
[matrixProvider, documentFragment, memoizedUser.name, memoizedUser.color]
|
|
9547
9649
|
);
|
|
9548
|
-
const ixoConfig =
|
|
9650
|
+
const ixoConfig = useMemo20(
|
|
9549
9651
|
() => ({
|
|
9550
9652
|
theme,
|
|
9551
9653
|
editable,
|
|
@@ -9564,7 +9666,7 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
9564
9666
|
uploadFile: defaultUploadFile,
|
|
9565
9667
|
collaboration: collaborationConfig
|
|
9566
9668
|
});
|
|
9567
|
-
const titleText =
|
|
9669
|
+
const titleText = useMemo20(() => yDoc.getText("title"), [yDoc]);
|
|
9568
9670
|
let ixoEditor;
|
|
9569
9671
|
if (editor) {
|
|
9570
9672
|
ixoEditor = editor;
|
|
@@ -9665,19 +9767,19 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
9665
9767
|
}
|
|
9666
9768
|
|
|
9667
9769
|
// src/mantine/IxoEditor.tsx
|
|
9668
|
-
import
|
|
9770
|
+
import React109 from "react";
|
|
9669
9771
|
import { getDefaultReactSlashMenuItems, SuggestionMenuController } from "@blocknote/react";
|
|
9670
9772
|
import { BlockNoteView } from "@blocknote/mantine";
|
|
9671
9773
|
import { filterSuggestionItems } from "@blocknote/core";
|
|
9672
|
-
import { MantineProvider } from "@mantine/core";
|
|
9774
|
+
import { Flex as Flex20, MantineProvider, Text as Text54 } from "@mantine/core";
|
|
9673
9775
|
|
|
9674
9776
|
// src/mantine/components/PanelContent.tsx
|
|
9675
|
-
import
|
|
9777
|
+
import React108 from "react";
|
|
9676
9778
|
function PanelContent() {
|
|
9677
9779
|
const { activePanel, registeredPanels } = usePanelStore();
|
|
9678
9780
|
const isOpen = activePanel !== null;
|
|
9679
9781
|
const content = activePanel ? registeredPanels.get(activePanel) : null;
|
|
9680
|
-
return /* @__PURE__ */
|
|
9782
|
+
return /* @__PURE__ */ React108.createElement(
|
|
9681
9783
|
"div",
|
|
9682
9784
|
{
|
|
9683
9785
|
style: {
|
|
@@ -9701,7 +9803,7 @@ function IxoEditorContent({
|
|
|
9701
9803
|
onSelectionChange,
|
|
9702
9804
|
children
|
|
9703
9805
|
}) {
|
|
9704
|
-
return /* @__PURE__ */
|
|
9806
|
+
return /* @__PURE__ */ React109.createElement("div", { style: { display: "flex", height: "100%" } }, /* @__PURE__ */ React109.createElement("div", { className: `ixo-editor ixo-editor--theme-${config.theme} ${className}`, style: { flex: 1 } }, /* @__PURE__ */ React109.createElement(
|
|
9705
9807
|
BlockNoteView,
|
|
9706
9808
|
{
|
|
9707
9809
|
editor,
|
|
@@ -9716,7 +9818,7 @@ function IxoEditorContent({
|
|
|
9716
9818
|
onChange,
|
|
9717
9819
|
onSelectionChange
|
|
9718
9820
|
},
|
|
9719
|
-
config.slashMenu && /* @__PURE__ */
|
|
9821
|
+
config.slashMenu && /* @__PURE__ */ React109.createElement(
|
|
9720
9822
|
SuggestionMenuController,
|
|
9721
9823
|
{
|
|
9722
9824
|
triggerCharacter: "/",
|
|
@@ -9728,7 +9830,7 @@ function IxoEditorContent({
|
|
|
9728
9830
|
}
|
|
9729
9831
|
),
|
|
9730
9832
|
children
|
|
9731
|
-
)), /* @__PURE__ */
|
|
9833
|
+
)), /* @__PURE__ */ React109.createElement(PanelContent, null));
|
|
9732
9834
|
}
|
|
9733
9835
|
function IxoEditor({
|
|
9734
9836
|
editor,
|
|
@@ -9754,9 +9856,9 @@ function IxoEditor({
|
|
|
9754
9856
|
tableHandles: true
|
|
9755
9857
|
};
|
|
9756
9858
|
const isEditable = editable;
|
|
9757
|
-
const editorContent = /* @__PURE__ */
|
|
9859
|
+
const editorContent = /* @__PURE__ */ React109.createElement(BlocknoteProvider, { editor, handlers, blockRequirements, editable: isEditable }, /* @__PURE__ */ React109.createElement(ListBlocksUIProvider, null, /* @__PURE__ */ React109.createElement(Flex20, { pr: 25, justify: "flex-end", align: "center", gap: "xs" }, /* @__PURE__ */ React109.createElement(Text54, { size: "xs", c: "dimmed", tt: "uppercase" }, "Global actions"), /* @__PURE__ */ React109.createElement(ListBlocksToolbar, null)), /* @__PURE__ */ React109.createElement(IxoEditorContent, { editor, config, isEditable, className, onChange, onSelectionChange }, children)));
|
|
9758
9860
|
if (mantineTheme) {
|
|
9759
|
-
return /* @__PURE__ */
|
|
9861
|
+
return /* @__PURE__ */ React109.createElement(MantineProvider, { theme: mantineTheme }, editorContent);
|
|
9760
9862
|
}
|
|
9761
9863
|
return editorContent;
|
|
9762
9864
|
}
|
|
@@ -9840,4 +9942,4 @@ export {
|
|
|
9840
9942
|
ixoGraphQLClient,
|
|
9841
9943
|
getEntity
|
|
9842
9944
|
};
|
|
9843
|
-
//# sourceMappingURL=chunk-
|
|
9945
|
+
//# sourceMappingURL=chunk-BIYUE2UP.mjs.map
|