@ixo/editor 1.14.0 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2204,7 +2204,7 @@ var ListTemplateView = ({ editor, block }) => {
|
|
|
2204
2204
|
|
|
2205
2205
|
// src/mantine/blocks/list/flow/FlowView.tsx
|
|
2206
2206
|
import React39, { useState as useState6, useEffect as useEffect6, useMemo as useMemo8, useCallback as useCallback9 } from "react";
|
|
2207
|
-
import { Group as Group7, Stack as Stack26, Text as Text26, ActionIcon as
|
|
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
|
|
@@ -2582,7 +2582,7 @@ function filterListItems(items, filterOption) {
|
|
|
2582
2582
|
}
|
|
2583
2583
|
|
|
2584
2584
|
// src/mantine/blocks/list/flow/FlowView.tsx
|
|
2585
|
-
import { IconArrowDown as IconArrowDown2, IconArrowRight as IconArrowRight2, IconArrowUp as IconArrowUp2 } from "@tabler/icons-react";
|
|
2585
|
+
import { IconArrowDown as IconArrowDown2, IconArrowRight as IconArrowRight2, IconArrowUp as IconArrowUp2, IconChevronDown, IconChevronUp, IconRefresh, IconSettings, IconAlertCircle } from "@tabler/icons-react";
|
|
2586
2586
|
|
|
2587
2587
|
// src/mantine/blocks/list/ListPagination.tsx
|
|
2588
2588
|
import React33 from "react";
|
|
@@ -2834,16 +2834,72 @@ 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/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
|
+
|
|
2837
2894
|
// src/mantine/blocks/list/flow/FlowView.tsx
|
|
2838
|
-
|
|
2839
|
-
var IconSettings = () => /* @__PURE__ */ React39.createElement("span", null, "\u2699\uFE0F");
|
|
2840
|
-
var IconAlertCircle = () => /* @__PURE__ */ React39.createElement("span", null, "\u26A0\uFE0F");
|
|
2895
|
+
import { useDisclosure } from "@mantine/hooks";
|
|
2841
2896
|
var LIST_FLOW_PANEL_ID = "list-flow-panel";
|
|
2842
2897
|
var LIST_SELECTION_FLOW_PANEL_ID = "list-selection-flow-panel";
|
|
2843
2898
|
var ListFlowView = ({ block, editor }) => {
|
|
2844
2899
|
const { editable } = useBlocknoteContext();
|
|
2845
2900
|
const [data, setData] = useState6(null);
|
|
2846
2901
|
const [loading, setLoading] = useState6(false);
|
|
2902
|
+
const [opened, { toggle }] = useDisclosure(true);
|
|
2847
2903
|
const [error, setError] = useState6(null);
|
|
2848
2904
|
const [showErrorDetails, setShowErrorDetails] = useState6(false);
|
|
2849
2905
|
const [page, setPage] = useState6(1);
|
|
@@ -3134,7 +3190,7 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
3134
3190
|
if (!listType) {
|
|
3135
3191
|
return /* @__PURE__ */ React39.createElement(Center2, { py: "xl" }, /* @__PURE__ */ React39.createElement(Text26, { size: "sm", c: "dimmed" }, "List not configured"));
|
|
3136
3192
|
}
|
|
3137
|
-
return /* @__PURE__ */ React39.createElement(Stack26, {
|
|
3193
|
+
return /* @__PURE__ */ React39.createElement(Stack26, { w: "100%" }, /* @__PURE__ */ React39.createElement(Flex17, { px: 5, align: "center", justify: "space-between" }, /* @__PURE__ */ React39.createElement(Title4, { order: 4 }, getListNameByType(listType)), /* @__PURE__ */ React39.createElement(ActionIcon5, { variant: "subtle", size: "sm", onClick: toggle, "aria-label": opened ? "Collapse" : "Expand", title: opened ? "Collapse" : "Expand" }, opened ? /* @__PURE__ */ React39.createElement(IconChevronUp, { size: 18 }) : /* @__PURE__ */ React39.createElement(IconChevronDown, { size: 18 }))), /* @__PURE__ */ React39.createElement(Collapse, { pb: 5, px: 5, in: opened }, /* @__PURE__ */ React39.createElement(Stack26, { mih: totalPages !== 1 ? 500 : void 0, w: "100%" }, /* @__PURE__ */ React39.createElement(Flex17, { align: "center", gap: "xs" }, listSortConfig?.key && /* @__PURE__ */ React39.createElement(Flex17, { align: "center" }, /* @__PURE__ */ React39.createElement(Text26, { size: "xs", c: "dimmed" }, listSortConfig.key?.replace(/([A-Z])/g, " $1").replace(
|
|
3138
3194
|
/^./,
|
|
3139
3195
|
(str) => str.toUpperCase()
|
|
3140
3196
|
), " "), /* @__PURE__ */ React39.createElement(Text26, { lh: 0.5, c: "dimmed" }, listSortConfig.direction === "asc" && /* @__PURE__ */ React39.createElement(IconArrowUp2, { size: 18 }), listSortConfig.direction === "desc" && /* @__PURE__ */ React39.createElement(IconArrowDown2, { size: 18 }))), selectionMode && /* @__PURE__ */ React39.createElement(Text26, { lh: 0.5, c: "dimmed" }, selectionMode === "single" ? "Single Selection" : "Multi Selection")), /* @__PURE__ */ React39.createElement(Flex17, { justify: "space-between" }, /* @__PURE__ */ React39.createElement(Flex17, { gap: "xs", align: "center" }, /* @__PURE__ */ React39.createElement(FilterTab, { key: "All", label: "All", isActive: !listFilterConfig?.key, onClick: () => handleFilterChange(null) }), Array.isArray(listFilterConfigOptions) && listFilterConfigOptions.length > 0 && listFilterConfigOptions.map(({ key, label, type }) => /* @__PURE__ */ React39.createElement(
|
|
@@ -3145,16 +3201,17 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
3145
3201
|
isActive: listFilterConfig?.key === key && listFilterConfig?.value === type,
|
|
3146
3202
|
onClick: () => handleFilterChange({ key, value: type })
|
|
3147
3203
|
}
|
|
3148
|
-
))), /* @__PURE__ */ React39.createElement(Flex17, { gap: "xs" }, /* @__PURE__ */ React39.createElement(
|
|
3204
|
+
))), /* @__PURE__ */ React39.createElement(Flex17, { gap: "xs" }, /* @__PURE__ */ React39.createElement(ActionIcon5, { variant: "subtle", size: "sm", onClick: fetchData, loading }, /* @__PURE__ */ React39.createElement(IconRefresh, { size: 18 })), editable && /* @__PURE__ */ React39.createElement(ActionIcon5, { variant: "subtle", size: "sm", onClick: openPanel }, /* @__PURE__ */ React39.createElement(IconSettings, { size: 18 })), selectedIds.size > 0 && /* @__PURE__ */ React39.createElement(ActionIcon5, { variant: "subtle", size: "sm", onClick: openSelectionPanel }, /* @__PURE__ */ React39.createElement(IconArrowRight2, null)), listConfig && listSortConfigOptions && listSortConfigOptions?.length > 0 && /* @__PURE__ */ React39.createElement(
|
|
3149
3205
|
ListActionsMenu,
|
|
3150
3206
|
{
|
|
3151
3207
|
onSelectActionClick: (mode) => setSelectionMode(mode),
|
|
3152
3208
|
selectionMode,
|
|
3153
3209
|
options: listSortConfigOptions,
|
|
3154
3210
|
value: listSortConfig,
|
|
3155
|
-
onChange: (sortOption) => handleSortChange(sortOption)
|
|
3211
|
+
onChange: (sortOption) => handleSortChange(sortOption),
|
|
3212
|
+
onDownloadCsv: data?.items ? () => downloadArrayAsCsv(data.items) : void 0
|
|
3156
3213
|
}
|
|
3157
|
-
))), /* @__PURE__ */ React39.createElement(Flex17, { flex: 1 }, loading ? /* @__PURE__ */ React39.createElement(Center2, { py: "xl", w: "100%" }, /* @__PURE__ */ React39.createElement(Loader2, { size: "md", mx: "auto" })) : error ? /* @__PURE__ */ React39.createElement(Alert4, { color: "red", title: "Failed to load data", icon: /* @__PURE__ */ React39.createElement(IconAlertCircle,
|
|
3214
|
+
))), /* @__PURE__ */ React39.createElement(Flex17, { flex: 1 }, loading ? /* @__PURE__ */ React39.createElement(Center2, { py: "xl", w: "100%" }, /* @__PURE__ */ React39.createElement(Loader2, { size: "md", mx: "auto" })) : error ? /* @__PURE__ */ React39.createElement(Alert4, { color: "red", title: "Failed to load data", icon: /* @__PURE__ */ React39.createElement(IconAlertCircle, { size: 18 }) }, /* @__PURE__ */ React39.createElement(Stack26, { gap: "xs" }, /* @__PURE__ */ React39.createElement(Text26, { size: "sm" }, showErrorDetails ? error : "Unable to fetch list data"), /* @__PURE__ */ React39.createElement(Group7, { gap: "xs" }, /* @__PURE__ */ React39.createElement(Button5, { size: "xs", variant: "subtle", onClick: fetchData }, "Retry"), /* @__PURE__ */ React39.createElement(Button5, { size: "xs", variant: "subtle", onClick: () => setShowErrorDetails(!showErrorDetails) }, showErrorDetails ? "Hide" : "Show", " Details")))) : /* @__PURE__ */ React39.createElement(Stack26, { flex: 1 }, /* @__PURE__ */ React39.createElement(Stack26, { gap: "md" }, renderListComponent(), /* @__PURE__ */ React39.createElement(
|
|
3158
3215
|
ListPagination,
|
|
3159
3216
|
{
|
|
3160
3217
|
page,
|
|
@@ -3163,7 +3220,7 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
3163
3220
|
},
|
|
3164
3221
|
totalPages
|
|
3165
3222
|
}
|
|
3166
|
-
))));
|
|
3223
|
+
)))))));
|
|
3167
3224
|
};
|
|
3168
3225
|
|
|
3169
3226
|
// src/mantine/blocks/list/ListBlock.tsx
|
|
@@ -3337,7 +3394,7 @@ import React79, { useMemo as useMemo10 } from "react";
|
|
|
3337
3394
|
|
|
3338
3395
|
// src/mantine/blocks/proposal/template/TemplateConfig.tsx
|
|
3339
3396
|
import React78, { useCallback as useCallback12 } from "react";
|
|
3340
|
-
import { Paper as Paper6, CloseButton as CloseButton4, Title as
|
|
3397
|
+
import { Paper as Paper6, CloseButton as CloseButton4, Title as Title5 } from "@mantine/core";
|
|
3341
3398
|
|
|
3342
3399
|
// src/mantine/blocks/proposal/template/GeneralTab.tsx
|
|
3343
3400
|
import React43, { useEffect as useEffect8, useState as useState8 } from "react";
|
|
@@ -3425,7 +3482,7 @@ import { Card as Card13, Stack as Stack60 } from "@mantine/core";
|
|
|
3425
3482
|
|
|
3426
3483
|
// src/mantine/blocks/proposal/actions-components/ActionsCard.tsx
|
|
3427
3484
|
import React44 from "react";
|
|
3428
|
-
import { Card as Card6, Group as Group8, Text as Text28, Badge as Badge5, Stack as Stack28, ActionIcon as
|
|
3485
|
+
import { Card as Card6, Group as Group8, Text as Text28, Badge as Badge5, Stack as Stack28, ActionIcon as ActionIcon6, ScrollArea } from "@mantine/core";
|
|
3429
3486
|
var getActionSummary = (action) => {
|
|
3430
3487
|
switch (action.type) {
|
|
3431
3488
|
case "Spend":
|
|
@@ -3497,7 +3554,7 @@ var ActionsCard = ({ actions, isSelected, onClick, onEditAction, onRemoveAction,
|
|
|
3497
3554
|
},
|
|
3498
3555
|
action.type
|
|
3499
3556
|
), /* @__PURE__ */ React44.createElement(Text28, { size: "sm", style: { color: "#adb5bd" } }, getActionSummary(action))), !disabled && /* @__PURE__ */ React44.createElement(Group8, { gap: 4 }, /* @__PURE__ */ React44.createElement(
|
|
3500
|
-
|
|
3557
|
+
ActionIcon6,
|
|
3501
3558
|
{
|
|
3502
3559
|
size: "sm",
|
|
3503
3560
|
variant: "subtle",
|
|
@@ -3510,7 +3567,7 @@ var ActionsCard = ({ actions, isSelected, onClick, onEditAction, onRemoveAction,
|
|
|
3510
3567
|
},
|
|
3511
3568
|
"\u270F\uFE0F"
|
|
3512
3569
|
), /* @__PURE__ */ React44.createElement(
|
|
3513
|
-
|
|
3570
|
+
ActionIcon6,
|
|
3514
3571
|
{
|
|
3515
3572
|
size: "sm",
|
|
3516
3573
|
variant: "subtle",
|
|
@@ -3600,7 +3657,7 @@ var SpendActionForm = ({ data, onChange }) => {
|
|
|
3600
3657
|
|
|
3601
3658
|
// src/mantine/blocks/proposal/actions-components/UpdateMembersActionForm.tsx
|
|
3602
3659
|
import React46, { useState as useState9 } from "react";
|
|
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
|
|
3660
|
+
import { Stack as Stack30, TextInput as TextInput7, NumberInput as NumberInput2, Button as Button6, Group as Group9, Text as Text29, Card as Card7, Badge as Badge6, ActionIcon as ActionIcon7, Divider as Divider3, ScrollArea as ScrollArea2 } from "@mantine/core";
|
|
3604
3661
|
var UpdateMembersActionForm = ({ data, onChange }) => {
|
|
3605
3662
|
const [newMember, setNewMember] = useState9({ addr: "", weight: 1 });
|
|
3606
3663
|
const [newRemoveAddress, setNewRemoveAddress] = useState9("");
|
|
@@ -3665,7 +3722,7 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
|
|
|
3665
3722
|
},
|
|
3666
3723
|
"Weight: ",
|
|
3667
3724
|
member.weight
|
|
3668
|
-
)), /* @__PURE__ */ React46.createElement(
|
|
3725
|
+
)), /* @__PURE__ */ React46.createElement(ActionIcon7, { size: "sm", variant: "subtle", onClick: () => handleRemoveMember(index), style: { color: "#ff6b6b" } }, "\u{1F5D1}\uFE0F"))
|
|
3669
3726
|
)))), /* @__PURE__ */ React46.createElement(Group9, { grow: true }, /* @__PURE__ */ React46.createElement(TextInput7, { placeholder: "Member address", value: newMember.addr, onChange: (e) => setNewMember({ ...newMember, addr: e.currentTarget.value }), styles: inputStyles29 }), /* @__PURE__ */ React46.createElement(
|
|
3670
3727
|
NumberInput2,
|
|
3671
3728
|
{
|
|
@@ -3699,7 +3756,7 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
|
|
|
3699
3756
|
borderColor: "#333"
|
|
3700
3757
|
}
|
|
3701
3758
|
},
|
|
3702
|
-
/* @__PURE__ */ React46.createElement(Group9, { justify: "space-between" }, /* @__PURE__ */ React46.createElement(Text29, { size: "sm", style: { color: "#adb5bd" } }, item.addr.slice(0, 30), "..."), /* @__PURE__ */ React46.createElement(
|
|
3759
|
+
/* @__PURE__ */ React46.createElement(Group9, { justify: "space-between" }, /* @__PURE__ */ React46.createElement(Text29, { size: "sm", style: { color: "#adb5bd" } }, item.addr.slice(0, 30), "..."), /* @__PURE__ */ React46.createElement(ActionIcon7, { size: "sm", variant: "subtle", onClick: () => handleRemoveRemoveAddress(index), style: { color: "#ff6b6b" } }, "\u{1F5D1}\uFE0F"))
|
|
3703
3760
|
)))), /* @__PURE__ */ React46.createElement(Group9, { grow: true }, /* @__PURE__ */ React46.createElement(TextInput7, { placeholder: "Address to remove", value: newRemoveAddress, onChange: (e) => setNewRemoveAddress(e.currentTarget.value), styles: inputStyles29 }), /* @__PURE__ */ React46.createElement(
|
|
3704
3761
|
Button6,
|
|
3705
3762
|
{
|
|
@@ -6356,7 +6413,7 @@ var TemplateConfig3 = ({ editor, block }) => {
|
|
|
6356
6413
|
marginBottom: "1rem"
|
|
6357
6414
|
}
|
|
6358
6415
|
},
|
|
6359
|
-
/* @__PURE__ */ React78.createElement(
|
|
6416
|
+
/* @__PURE__ */ React78.createElement(Title5, { order: 3 }, "Proposal Settings"),
|
|
6360
6417
|
/* @__PURE__ */ React78.createElement(CloseButton4, { onClick: closePanel })
|
|
6361
6418
|
),
|
|
6362
6419
|
/* @__PURE__ */ React78.createElement(
|
|
@@ -6406,13 +6463,13 @@ var TemplateConfig3 = ({ editor, block }) => {
|
|
|
6406
6463
|
};
|
|
6407
6464
|
|
|
6408
6465
|
// src/mantine/blocks/proposal/template/TemplateView.tsx
|
|
6409
|
-
import { Card as Card14, Group as Group20, Stack as Stack62, Text as Text37, ActionIcon as
|
|
6466
|
+
import { Card as Card14, Group as Group20, Stack as Stack62, Text as Text37, ActionIcon as ActionIcon8 } from "@mantine/core";
|
|
6410
6467
|
var PROPOSAL_TEMPLATE_PANEL_ID = "proposal-template-panel";
|
|
6411
6468
|
var ProposalTemplateView = ({ editor, block }) => {
|
|
6412
6469
|
const panelId = `${PROPOSAL_TEMPLATE_PANEL_ID}-${block.id}`;
|
|
6413
6470
|
const panelContent = useMemo10(() => /* @__PURE__ */ React79.createElement(TemplateConfig3, { editor, block }), [editor, block]);
|
|
6414
6471
|
const { open } = usePanel(panelId, panelContent);
|
|
6415
|
-
return /* @__PURE__ */ React79.createElement(Card14, { withBorder: true, padding: "md", radius: "md", style: { width: "100%", cursor: "pointer" }, onClick: open }, /* @__PURE__ */ React79.createElement(Group20, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React79.createElement(Group20, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React79.createElement(
|
|
6472
|
+
return /* @__PURE__ */ React79.createElement(Card14, { withBorder: true, padding: "md", radius: "md", style: { width: "100%", cursor: "pointer" }, onClick: open }, /* @__PURE__ */ React79.createElement(Group20, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React79.createElement(Group20, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React79.createElement(ActionIcon8, { variant: "light", color: "blue", size: "lg", radius: "xl", style: { flexShrink: 0 } }, getIcon(block.props.icon, 18, 1.5, "file-text")), /* @__PURE__ */ React79.createElement(Stack62, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React79.createElement(Text37, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Proposal Title"), /* @__PURE__ */ React79.createElement(Text37, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description || "Proposal description"))), /* @__PURE__ */ React79.createElement(Text37, { size: "xs", c: "dimmed", contentEditable: false }, block.props.status || "draft")));
|
|
6416
6473
|
};
|
|
6417
6474
|
|
|
6418
6475
|
// src/mantine/blocks/proposal/flow/FlowView.tsx
|
|
@@ -6420,7 +6477,7 @@ import React84, { useMemo as useMemo11 } from "react";
|
|
|
6420
6477
|
|
|
6421
6478
|
// src/mantine/blocks/proposal/components/OnChainProposalCard.tsx
|
|
6422
6479
|
import React80 from "react";
|
|
6423
|
-
import { Card as Card15, Group as Group21, Stack as Stack63, Text as Text38, Skeleton, Badge as Badge9, Button as Button13, ActionIcon as
|
|
6480
|
+
import { Card as Card15, Group as Group21, Stack as Stack63, Text as Text38, Skeleton, Badge as Badge9, Button as Button13, ActionIcon as ActionIcon9 } from "@mantine/core";
|
|
6424
6481
|
var statusColor = {
|
|
6425
6482
|
open: "#4dabf7",
|
|
6426
6483
|
passed: "#51cf66",
|
|
@@ -6464,7 +6521,7 @@ var OnChainProposalCard = ({
|
|
|
6464
6521
|
},
|
|
6465
6522
|
isFetching && /* @__PURE__ */ React80.createElement(Stack63, null, /* @__PURE__ */ React80.createElement(Skeleton, { height: 20, width: "70%" }), /* @__PURE__ */ React80.createElement(Skeleton, { height: 16 }), /* @__PURE__ */ React80.createElement(Skeleton, { height: 16, width: "40%" })),
|
|
6466
6523
|
error && /* @__PURE__ */ React80.createElement(Text38, { size: "sm", c: "red" }, typeof error === "string" ? error : error.message || "An error occurred while loading the proposal."),
|
|
6467
|
-
!isFetching && /* @__PURE__ */ React80.createElement(Group21, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React80.createElement(Group21, { align: "flex-start", gap: "md", style: { flex: 1 } }, /* @__PURE__ */ React80.createElement(
|
|
6524
|
+
!isFetching && /* @__PURE__ */ React80.createElement(Group21, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React80.createElement(Group21, { align: "flex-start", gap: "md", style: { flex: 1 } }, /* @__PURE__ */ React80.createElement(ActionIcon9, { variant: "light", color: "blue", size: "xl", radius: "xl", style: { flexShrink: 0 } }, getIcon(icon, 24, 1.5, "file-text")), /* @__PURE__ */ React80.createElement(Stack63, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React80.createElement(Group21, { gap: "xs" }, /* @__PURE__ */ React80.createElement(Text38, { size: "md", fw: 600 }, title || "Proposal"), /* @__PURE__ */ React80.createElement(Badge9, { color: statusColor[status], variant: "filled", size: "sm", radius: "sm" }, status.replace(/_/g, " ").toUpperCase())), /* @__PURE__ */ React80.createElement(Text38, { size: "sm", c: "dimmed" }, getDisplayDescription(description)))), /* @__PURE__ */ React80.createElement(Group21, { gap: "xs" }, voteEnabled && onVote && status === "open" && /* @__PURE__ */ React80.createElement(
|
|
6468
6525
|
Button13,
|
|
6469
6526
|
{
|
|
6470
6527
|
size: "sm",
|
|
@@ -6497,7 +6554,7 @@ var OnChainProposalCard = ({
|
|
|
6497
6554
|
|
|
6498
6555
|
// src/mantine/blocks/proposal/flow/FlowConfig.tsx
|
|
6499
6556
|
import React83, { useCallback as useCallback14, useState as useState21 } from "react";
|
|
6500
|
-
import { Paper as Paper7, CloseButton as CloseButton5, Title as
|
|
6557
|
+
import { Paper as Paper7, CloseButton as CloseButton5, Title as Title6, Stack as Stack66, TextInput as TextInput33, Textarea as Textarea18, Button as Button16, Text as Text41, Card as Card18 } from "@mantine/core";
|
|
6501
6558
|
|
|
6502
6559
|
// src/mantine/blocks/proposal/flow/useFlowBusinessLogic.ts
|
|
6503
6560
|
import { useEffect as useEffect12, useState as useState17 } from "react";
|
|
@@ -7207,7 +7264,7 @@ var FlowConfig = ({ editor, block }) => {
|
|
|
7207
7264
|
marginBottom: "1rem"
|
|
7208
7265
|
}
|
|
7209
7266
|
},
|
|
7210
|
-
/* @__PURE__ */ React83.createElement(
|
|
7267
|
+
/* @__PURE__ */ React83.createElement(Title6, { order: 3 }, "Proposal Settings"),
|
|
7211
7268
|
/* @__PURE__ */ React83.createElement(CloseButton5, { onClick: closePanel })
|
|
7212
7269
|
),
|
|
7213
7270
|
/* @__PURE__ */ React83.createElement(ReusablePanel, { extraTabs, context: { editor, block } })
|
|
@@ -7334,11 +7391,11 @@ import React89, { useMemo as useMemo12 } from "react";
|
|
|
7334
7391
|
|
|
7335
7392
|
// src/mantine/blocks/apiRequest/template/TemplateConfig.tsx
|
|
7336
7393
|
import React88, { useCallback as useCallback15 } from "react";
|
|
7337
|
-
import { Paper as Paper9, CloseButton as CloseButton6, Title as
|
|
7394
|
+
import { Paper as Paper9, CloseButton as CloseButton6, Title as Title7 } from "@mantine/core";
|
|
7338
7395
|
|
|
7339
7396
|
// src/mantine/blocks/apiRequest/template/GeneralTab.tsx
|
|
7340
7397
|
import React87, { useEffect as useEffect15, useState as useState22 } from "react";
|
|
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
|
|
7398
|
+
import { Divider as Divider5, Select as Select10, Stack as Stack67, Text as Text42, TextInput as TextInput34, Textarea as Textarea19, Button as Button17, Group as Group23, ActionIcon as ActionIcon10, Paper as Paper8 } from "@mantine/core";
|
|
7342
7399
|
import { IconTrash, IconPlus } from "@tabler/icons-react";
|
|
7343
7400
|
var GeneralTab4 = ({
|
|
7344
7401
|
title,
|
|
@@ -7465,7 +7522,7 @@ var GeneralTab4 = ({
|
|
|
7465
7522
|
onChange: (event) => handleHeaderChange(index, "value", event.currentTarget.value),
|
|
7466
7523
|
style: { flex: 1 }
|
|
7467
7524
|
}
|
|
7468
|
-
), /* @__PURE__ */ React87.createElement(
|
|
7525
|
+
), /* @__PURE__ */ React87.createElement(ActionIcon10, { color: "red", variant: "subtle", onClick: () => handleRemoveHeader(index) }, /* @__PURE__ */ React87.createElement(IconTrash, { size: 16 }))))))), /* @__PURE__ */ React87.createElement(Divider5, { variant: "dashed" }), /* @__PURE__ */ React87.createElement(Stack67, { gap: "xs" }, /* @__PURE__ */ React87.createElement(Group23, { justify: "space-between" }, /* @__PURE__ */ React87.createElement(Text42, { size: "sm", fw: 600 }, "Request Body (JSON)"), /* @__PURE__ */ React87.createElement(Button17, { size: "xs", variant: "light", leftSection: /* @__PURE__ */ React87.createElement(IconPlus, { size: 14 }), onClick: handleAddBodyField }, "Add Field")), /* @__PURE__ */ React87.createElement(Text42, { size: "xs" }, "Build your JSON request body as key-value pairs"), localBody.length > 0 && /* @__PURE__ */ React87.createElement(Stack67, { gap: "xs" }, localBody.map((field, index) => /* @__PURE__ */ React87.createElement(Paper8, { key: index, p: "xs" }, /* @__PURE__ */ React87.createElement(Group23, { gap: "xs", align: "flex-start" }, /* @__PURE__ */ React87.createElement(
|
|
7469
7526
|
TextInput34,
|
|
7470
7527
|
{
|
|
7471
7528
|
placeholder: "Field key (e.g., name)",
|
|
@@ -7481,7 +7538,7 @@ var GeneralTab4 = ({
|
|
|
7481
7538
|
onChange: (event) => handleBodyFieldChange(index, "value", event.currentTarget.value),
|
|
7482
7539
|
style: { flex: 1 }
|
|
7483
7540
|
}
|
|
7484
|
-
), /* @__PURE__ */ React87.createElement(
|
|
7541
|
+
), /* @__PURE__ */ React87.createElement(ActionIcon10, { color: "red", variant: "subtle", onClick: () => handleRemoveBodyField(index) }, /* @__PURE__ */ React87.createElement(IconTrash, { size: 16 }))))))));
|
|
7485
7542
|
};
|
|
7486
7543
|
|
|
7487
7544
|
// src/mantine/blocks/apiRequest/template/TemplateConfig.tsx
|
|
@@ -7531,7 +7588,7 @@ var TemplateConfig4 = ({ editor, block }) => {
|
|
|
7531
7588
|
marginBottom: "1rem"
|
|
7532
7589
|
}
|
|
7533
7590
|
},
|
|
7534
|
-
/* @__PURE__ */ React88.createElement(
|
|
7591
|
+
/* @__PURE__ */ React88.createElement(Title7, { order: 3 }, "API Request Settings"),
|
|
7535
7592
|
/* @__PURE__ */ React88.createElement(CloseButton6, { onClick: closePanel })
|
|
7536
7593
|
),
|
|
7537
7594
|
/* @__PURE__ */ React88.createElement(
|
|
@@ -7579,7 +7636,7 @@ var TemplateConfig4 = ({ editor, block }) => {
|
|
|
7579
7636
|
};
|
|
7580
7637
|
|
|
7581
7638
|
// src/mantine/blocks/apiRequest/template/TemplateView.tsx
|
|
7582
|
-
import { Card as Card19, Group as Group24, Stack as Stack68, Text as Text43, ActionIcon as
|
|
7639
|
+
import { Card as Card19, Group as Group24, Stack as Stack68, Text as Text43, ActionIcon as ActionIcon11, Badge as Badge10 } from "@mantine/core";
|
|
7583
7640
|
var API_REQUEST_TEMPLATE_PANEL_ID = "api-request-template-panel";
|
|
7584
7641
|
var ApiRequestTemplateView = ({ editor, block }) => {
|
|
7585
7642
|
const panelId = `${API_REQUEST_TEMPLATE_PANEL_ID}-${block.id}`;
|
|
@@ -7603,13 +7660,13 @@ var ApiRequestTemplateView = ({ editor, block }) => {
|
|
|
7603
7660
|
return "gray";
|
|
7604
7661
|
}
|
|
7605
7662
|
};
|
|
7606
|
-
return /* @__PURE__ */ React89.createElement(Card19, { withBorder: true, padding: "md", radius: "md", style: { width: "100%", cursor: "pointer", position: "relative" }, onClick: open }, /* @__PURE__ */ React89.createElement(Badge10, { size: "xs", variant: "light", color: "gray", style: { position: "absolute", top: 8, right: 8 } }, "Template"), /* @__PURE__ */ React89.createElement(Group24, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React89.createElement(Group24, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React89.createElement(
|
|
7663
|
+
return /* @__PURE__ */ React89.createElement(Card19, { withBorder: true, padding: "md", radius: "md", style: { width: "100%", cursor: "pointer", position: "relative" }, onClick: open }, /* @__PURE__ */ React89.createElement(Badge10, { size: "xs", variant: "light", color: "gray", style: { position: "absolute", top: 8, right: 8 } }, "Template"), /* @__PURE__ */ React89.createElement(Group24, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React89.createElement(Group24, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React89.createElement(ActionIcon11, { variant: "light", color: "violet", size: "lg", radius: "xl", style: { flexShrink: 0 } }, getIcon(block.props.icon, 18, 1.5, "square-check")), /* @__PURE__ */ React89.createElement(Stack68, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React89.createElement(Group24, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React89.createElement(Badge10, { size: "sm", variant: "filled", color: getMethodColor(method) }, method), /* @__PURE__ */ React89.createElement(Text43, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "API Request")), /* @__PURE__ */ React89.createElement(Text43, { size: "xs", c: "dimmed", contentEditable: false, lineClamp: 1 }, endpoint), block.props.description && /* @__PURE__ */ React89.createElement(Text43, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description)))));
|
|
7607
7664
|
};
|
|
7608
7665
|
|
|
7609
7666
|
// src/mantine/blocks/apiRequest/flow/FlowView.tsx
|
|
7610
7667
|
import React90, { useState as useState23 } from "react";
|
|
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";
|
|
7668
|
+
import { Card as Card20, Group as Group25, Stack as Stack69, Text as Text44, ActionIcon as ActionIcon12, Tooltip as Tooltip4, Button as Button18, Badge as Badge11, Collapse as Collapse2, Code, Loader as Loader4, Alert as Alert9 } from "@mantine/core";
|
|
7669
|
+
import { IconSend, IconChevronDown as IconChevronDown2, IconChevronUp as IconChevronUp2 } from "@tabler/icons-react";
|
|
7613
7670
|
var ApiRequestFlowView = ({ editor, block, isDisabled }) => {
|
|
7614
7671
|
const disabled = isDisabled?.isDisabled === "disable";
|
|
7615
7672
|
const [isLoading, setIsLoading] = useState23(false);
|
|
@@ -7739,7 +7796,7 @@ var ApiRequestFlowView = ({ editor, block, isDisabled }) => {
|
|
|
7739
7796
|
},
|
|
7740
7797
|
isLoading ? "Sending..." : "Execute"
|
|
7741
7798
|
);
|
|
7742
|
-
return /* @__PURE__ */ React90.createElement(Card20, { withBorder: true, padding: "md", radius: "md", style: { width: "100%" } }, /* @__PURE__ */ React90.createElement(Stack69, { gap: "md" }, /* @__PURE__ */ React90.createElement(Group25, { wrap: "nowrap", justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React90.createElement(Group25, { wrap: "nowrap", align: "flex-start", style: { flex: 1 } }, /* @__PURE__ */ React90.createElement(
|
|
7799
|
+
return /* @__PURE__ */ React90.createElement(Card20, { withBorder: true, padding: "md", radius: "md", style: { width: "100%" } }, /* @__PURE__ */ React90.createElement(Stack69, { gap: "md" }, /* @__PURE__ */ React90.createElement(Group25, { wrap: "nowrap", justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React90.createElement(Group25, { wrap: "nowrap", align: "flex-start", style: { flex: 1 } }, /* @__PURE__ */ React90.createElement(ActionIcon12, { variant: "light", color: "violet", size: "lg", radius: "xl", style: { flexShrink: 0 } }, getIcon(block.props.icon, 18, 1.5, "square-check")), /* @__PURE__ */ React90.createElement(Stack69, { gap: "xs", style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React90.createElement(Group25, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React90.createElement(Badge11, { size: "sm", variant: "filled", color: getMethodColor(method) }, method), /* @__PURE__ */ React90.createElement(Text44, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "API Request"), status !== "idle" && /* @__PURE__ */ React90.createElement(Badge11, { size: "xs", variant: "dot", color: getStatusColor(status) }, status)), /* @__PURE__ */ React90.createElement(
|
|
7743
7800
|
Text44,
|
|
7744
7801
|
{
|
|
7745
7802
|
size: "xs",
|
|
@@ -7752,7 +7809,7 @@ var ApiRequestFlowView = ({ editor, block, isDisabled }) => {
|
|
|
7752
7809
|
}
|
|
7753
7810
|
},
|
|
7754
7811
|
endpoint || "No endpoint configured"
|
|
7755
|
-
), block.props.description && /* @__PURE__ */ React90.createElement(Text44, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description))), /* @__PURE__ */ React90.createElement(Group25, { gap: "xs", style: { flexShrink: 0 } }, disabled && isDisabled?.message ? /* @__PURE__ */ React90.createElement(Tooltip4, { label: isDisabled.message, position: "left", withArrow: true }, executeButton) : executeButton, /* @__PURE__ */ React90.createElement(
|
|
7812
|
+
), block.props.description && /* @__PURE__ */ React90.createElement(Text44, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description))), /* @__PURE__ */ React90.createElement(Group25, { gap: "xs", style: { flexShrink: 0 } }, disabled && isDisabled?.message ? /* @__PURE__ */ React90.createElement(Tooltip4, { label: isDisabled.message, position: "left", withArrow: true }, executeButton) : executeButton, /* @__PURE__ */ React90.createElement(ActionIcon12, { variant: "subtle", onClick: () => setShowDetails(!showDetails), disabled: headers.length === 0 && body.length === 0 && !response }, showDetails ? /* @__PURE__ */ React90.createElement(IconChevronUp2, { size: 16 }) : /* @__PURE__ */ React90.createElement(IconChevronDown2, { size: 16 })))), /* @__PURE__ */ React90.createElement(Collapse2, { in: showDetails }, /* @__PURE__ */ React90.createElement(Stack69, { gap: "md" }, headers.length > 0 && /* @__PURE__ */ React90.createElement(Stack69, { gap: "xs" }, /* @__PURE__ */ React90.createElement(Text44, { size: "xs", fw: 600, c: "dimmed" }, "Headers:"), /* @__PURE__ */ React90.createElement(Code, { block: true, style: { fontSize: "11px" } }, JSON.stringify(
|
|
7756
7813
|
headers.reduce(
|
|
7757
7814
|
(acc, h) => {
|
|
7758
7815
|
if (h.key && h.value) acc[h.key] = h.value;
|
|
@@ -7854,7 +7911,7 @@ var ApiRequestBlockSpec = createReactBlockSpec5(
|
|
|
7854
7911
|
// src/mantine/blocks/enumChecklist/EnumChecklistBlock.tsx
|
|
7855
7912
|
import React99, { useState as useState25, useEffect as useEffect16, useMemo as useMemo13, useCallback as useCallback16 } from "react";
|
|
7856
7913
|
import { createReactBlockSpec as createReactBlockSpec6 } from "@blocknote/react";
|
|
7857
|
-
import { Stack as Stack75, Text as Text50, Button as Button23, ActionIcon as
|
|
7914
|
+
import { Stack as Stack75, Text as Text50, Button as Button23, ActionIcon as ActionIcon13, Center as Center3, Flex as Flex19 } from "@mantine/core";
|
|
7858
7915
|
|
|
7859
7916
|
// src/mantine/blocks/enumChecklist/oracle_personalities/index.tsx
|
|
7860
7917
|
import React93 from "react";
|
|
@@ -8317,7 +8374,7 @@ var EnumChecklistBlockContent = ({ block, editor }) => {
|
|
|
8317
8374
|
return null;
|
|
8318
8375
|
}
|
|
8319
8376
|
};
|
|
8320
|
-
return /* @__PURE__ */ React99.createElement(Stack75, { w: "100%" }, listType && /* @__PURE__ */ React99.createElement(Flex19, { align: "center", justify: "space-between", gap: "xs" }, /* @__PURE__ */ React99.createElement(Text50, null, getEnumListNameByType(listType)), listConfig.listSelectionMode && /* @__PURE__ */ React99.createElement(Text50, { lh: 0.5, c: "dimmed" }, listConfig?.selection_mode === "single" ? "Single Selection" : "Multi Selection"), editable && /* @__PURE__ */ React99.createElement(Flex19, { justify: listType ? "space-between" : "flex-end" }, /* @__PURE__ */ React99.createElement(Flex19, { gap: "xs" }, /* @__PURE__ */ React99.createElement(
|
|
8377
|
+
return /* @__PURE__ */ React99.createElement(Stack75, { w: "100%" }, listType && /* @__PURE__ */ React99.createElement(Flex19, { align: "center", justify: "space-between", gap: "xs" }, /* @__PURE__ */ React99.createElement(Text50, null, getEnumListNameByType(listType)), listConfig.listSelectionMode && /* @__PURE__ */ React99.createElement(Text50, { lh: 0.5, c: "dimmed" }, listConfig?.selection_mode === "single" ? "Single Selection" : "Multi Selection"), editable && /* @__PURE__ */ React99.createElement(Flex19, { justify: listType ? "space-between" : "flex-end" }, /* @__PURE__ */ React99.createElement(Flex19, { gap: "xs" }, /* @__PURE__ */ React99.createElement(ActionIcon13, { variant: "subtle", size: "sm", onClick: () => setModalOpened(true) }, /* @__PURE__ */ React99.createElement(IconSettings2, null))))), /* @__PURE__ */ React99.createElement(Flex19, { flex: 1 }, !listType ? /* @__PURE__ */ React99.createElement(Center3, { py: "xl" }, /* @__PURE__ */ React99.createElement(Stack75, { align: "center", gap: "sm" }, /* @__PURE__ */ React99.createElement(Text50, { size: "sm", c: "dimmed", ta: "center" }, "No list type configured"), /* @__PURE__ */ React99.createElement(Button23, { size: "sm", variant: "light", onClick: () => setModalOpened(true) }, "Configure List"))) : /* @__PURE__ */ React99.createElement(Stack75, { gap: "md", flex: 1 }, renderListComponent())), /* @__PURE__ */ React99.createElement(
|
|
8321
8378
|
EnumChecklistConfigModal,
|
|
8322
8379
|
{
|
|
8323
8380
|
opened: modalOpened,
|
|
@@ -8365,11 +8422,11 @@ import React102, { useMemo as useMemo14 } from "react";
|
|
|
8365
8422
|
|
|
8366
8423
|
// src/mantine/blocks/notify/template/TemplateConfig.tsx
|
|
8367
8424
|
import React101, { useCallback as useCallback17 } from "react";
|
|
8368
|
-
import { Paper as Paper11, CloseButton as CloseButton7, Title as
|
|
8425
|
+
import { Paper as Paper11, CloseButton as CloseButton7, Title as Title8 } from "@mantine/core";
|
|
8369
8426
|
|
|
8370
8427
|
// src/mantine/blocks/notify/template/GeneralTab.tsx
|
|
8371
8428
|
import React100, { useEffect as useEffect17, useState as useState26 } from "react";
|
|
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
|
|
8429
|
+
import { Divider as Divider6, Select as Select12, Stack as Stack76, Text as Text51, TextInput as TextInput36, Textarea as Textarea20, Button as Button24, Group as Group30, ActionIcon as ActionIcon14, Paper as Paper10 } from "@mantine/core";
|
|
8373
8430
|
import { IconTrash as IconTrash2, IconPlus as IconPlus2 } from "@tabler/icons-react";
|
|
8374
8431
|
var GeneralTab5 = ({
|
|
8375
8432
|
title,
|
|
@@ -8481,7 +8538,7 @@ var GeneralTab5 = ({
|
|
|
8481
8538
|
{ value: "rcs", label: "RCS (Coming Soon)", disabled: true }
|
|
8482
8539
|
]
|
|
8483
8540
|
}
|
|
8484
|
-
)), /* @__PURE__ */ React100.createElement(Divider6, { variant: "dashed" }), localChannel === "email" && /* @__PURE__ */ React100.createElement(React100.Fragment, null, /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React100.createElement(Group30, { justify: "space-between" }, /* @__PURE__ */ React100.createElement(Text51, { size: "sm", fw: 600 }, "To (Recipients)"), /* @__PURE__ */ React100.createElement(Button24, { size: "xs", leftSection: /* @__PURE__ */ React100.createElement(IconPlus2, { size: 14 }), onClick: () => handleAddRecipient("to") }, "Add")), localTo.length === 0 && /* @__PURE__ */ React100.createElement(Text51, { size: "xs", c: "dimmed" }, "No recipients added yet"), /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, localTo.map((recipient, index) => /* @__PURE__ */ React100.createElement(Paper10, { key: index, p: "xs", withBorder: true }, /* @__PURE__ */ React100.createElement(Group30, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React100.createElement(TextInput36, { style: { flex: 1 }, placeholder: "email@example.com", value: recipient, onChange: (e) => handleRecipientChange("to", index, e.currentTarget.value) }), /* @__PURE__ */ React100.createElement(
|
|
8541
|
+
)), /* @__PURE__ */ React100.createElement(Divider6, { variant: "dashed" }), localChannel === "email" && /* @__PURE__ */ React100.createElement(React100.Fragment, null, /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React100.createElement(Group30, { justify: "space-between" }, /* @__PURE__ */ React100.createElement(Text51, { size: "sm", fw: 600 }, "To (Recipients)"), /* @__PURE__ */ React100.createElement(Button24, { size: "xs", leftSection: /* @__PURE__ */ React100.createElement(IconPlus2, { size: 14 }), onClick: () => handleAddRecipient("to") }, "Add")), localTo.length === 0 && /* @__PURE__ */ React100.createElement(Text51, { size: "xs", c: "dimmed" }, "No recipients added yet"), /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, localTo.map((recipient, index) => /* @__PURE__ */ React100.createElement(Paper10, { key: index, p: "xs", withBorder: true }, /* @__PURE__ */ React100.createElement(Group30, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React100.createElement(TextInput36, { style: { flex: 1 }, placeholder: "email@example.com", value: recipient, onChange: (e) => handleRecipientChange("to", index, e.currentTarget.value) }), /* @__PURE__ */ React100.createElement(ActionIcon14, { color: "red", variant: "light", onClick: () => handleRemoveRecipient("to", index) }, /* @__PURE__ */ React100.createElement(IconTrash2, { size: 16 }))))))), /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React100.createElement(Group30, { justify: "space-between" }, /* @__PURE__ */ React100.createElement(Text51, { size: "sm", fw: 600 }, "CC (Optional)"), /* @__PURE__ */ React100.createElement(Button24, { size: "xs", leftSection: /* @__PURE__ */ React100.createElement(IconPlus2, { size: 14 }), onClick: () => handleAddRecipient("cc") }, "Add")), localCc.length > 0 && /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, localCc.map((recipient, index) => /* @__PURE__ */ React100.createElement(Paper10, { key: index, p: "xs", withBorder: true }, /* @__PURE__ */ React100.createElement(Group30, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React100.createElement(
|
|
8485
8542
|
TextInput36,
|
|
8486
8543
|
{
|
|
8487
8544
|
style: { flex: 1 },
|
|
@@ -8489,7 +8546,7 @@ var GeneralTab5 = ({
|
|
|
8489
8546
|
value: recipient,
|
|
8490
8547
|
onChange: (e) => handleRecipientChange("cc", index, e.currentTarget.value)
|
|
8491
8548
|
}
|
|
8492
|
-
), /* @__PURE__ */ React100.createElement(
|
|
8549
|
+
), /* @__PURE__ */ React100.createElement(ActionIcon14, { color: "red", variant: "light", onClick: () => handleRemoveRecipient("cc", index) }, /* @__PURE__ */ React100.createElement(IconTrash2, { size: 16 }))))))), /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React100.createElement(Group30, { justify: "space-between" }, /* @__PURE__ */ React100.createElement(Text51, { size: "sm", fw: 600 }, "BCC (Optional)"), /* @__PURE__ */ React100.createElement(Button24, { size: "xs", leftSection: /* @__PURE__ */ React100.createElement(IconPlus2, { size: 14 }), onClick: () => handleAddRecipient("bcc") }, "Add")), localBcc.length > 0 && /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, localBcc.map((recipient, index) => /* @__PURE__ */ React100.createElement(Paper10, { key: index, p: "xs", withBorder: true }, /* @__PURE__ */ React100.createElement(Group30, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React100.createElement(
|
|
8493
8550
|
TextInput36,
|
|
8494
8551
|
{
|
|
8495
8552
|
style: { flex: 1 },
|
|
@@ -8497,7 +8554,7 @@ var GeneralTab5 = ({
|
|
|
8497
8554
|
value: recipient,
|
|
8498
8555
|
onChange: (e) => handleRecipientChange("bcc", index, e.currentTarget.value)
|
|
8499
8556
|
}
|
|
8500
|
-
), /* @__PURE__ */ React100.createElement(
|
|
8557
|
+
), /* @__PURE__ */ React100.createElement(ActionIcon14, { color: "red", variant: "light", onClick: () => handleRemoveRecipient("bcc", index) }, /* @__PURE__ */ React100.createElement(IconTrash2, { size: 16 }))))))), /* @__PURE__ */ React100.createElement(Divider6, { variant: "dashed" }), /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React100.createElement(Text51, { size: "sm", fw: 600 }, "From (Optional)"), /* @__PURE__ */ React100.createElement(
|
|
8501
8558
|
TextInput36,
|
|
8502
8559
|
{
|
|
8503
8560
|
placeholder: "sender@example.com",
|
|
@@ -8612,7 +8669,7 @@ var TemplateConfig5 = ({ editor, block }) => {
|
|
|
8612
8669
|
marginBottom: "1rem"
|
|
8613
8670
|
}
|
|
8614
8671
|
},
|
|
8615
|
-
/* @__PURE__ */ React101.createElement(
|
|
8672
|
+
/* @__PURE__ */ React101.createElement(Title8, { order: 3 }, "Notification Settings"),
|
|
8616
8673
|
/* @__PURE__ */ React101.createElement(CloseButton7, { onClick: closePanel })
|
|
8617
8674
|
),
|
|
8618
8675
|
/* @__PURE__ */ React101.createElement(
|
|
@@ -8676,7 +8733,7 @@ var TemplateConfig5 = ({ editor, block }) => {
|
|
|
8676
8733
|
};
|
|
8677
8734
|
|
|
8678
8735
|
// src/mantine/blocks/notify/template/TemplateView.tsx
|
|
8679
|
-
import { Card as Card22, Group as Group31, Stack as Stack77, Text as Text52, ActionIcon as
|
|
8736
|
+
import { Card as Card22, Group as Group31, Stack as Stack77, Text as Text52, ActionIcon as ActionIcon15, Badge as Badge12 } from "@mantine/core";
|
|
8680
8737
|
var NOTIFY_TEMPLATE_PANEL_ID = "notify-template-panel";
|
|
8681
8738
|
var NotifyTemplateView = ({ editor, block }) => {
|
|
8682
8739
|
const panelId = `${NOTIFY_TEMPLATE_PANEL_ID}-${block.id}`;
|
|
@@ -8705,13 +8762,13 @@ var NotifyTemplateView = ({ editor, block }) => {
|
|
|
8705
8762
|
return "gray";
|
|
8706
8763
|
}
|
|
8707
8764
|
};
|
|
8708
|
-
return /* @__PURE__ */ React102.createElement(Card22, { withBorder: true, padding: "md", radius: "md", style: { width: "100%", cursor: "pointer", position: "relative" }, onClick: open }, /* @__PURE__ */ React102.createElement(Badge12, { size: "xs", variant: "light", color: "gray", style: { position: "absolute", top: 8, right: 8 } }, "Template"), /* @__PURE__ */ React102.createElement(Group31, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React102.createElement(Group31, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React102.createElement(
|
|
8765
|
+
return /* @__PURE__ */ React102.createElement(Card22, { withBorder: true, padding: "md", radius: "md", style: { width: "100%", cursor: "pointer", position: "relative" }, onClick: open }, /* @__PURE__ */ React102.createElement(Badge12, { size: "xs", variant: "light", color: "gray", style: { position: "absolute", top: 8, right: 8 } }, "Template"), /* @__PURE__ */ React102.createElement(Group31, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React102.createElement(Group31, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React102.createElement(ActionIcon15, { variant: "light", color: getChannelColor(channel), size: "lg", radius: "xl", style: { flexShrink: 0 } }, getIcon(block.props.icon, 18, 1.5, "bell")), /* @__PURE__ */ React102.createElement(Stack77, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React102.createElement(Group31, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React102.createElement(Badge12, { size: "sm", variant: "filled", color: getChannelColor(channel) }, channel.toUpperCase()), /* @__PURE__ */ React102.createElement(Text52, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Notification")), /* @__PURE__ */ React102.createElement(Text52, { size: "xs", c: "dimmed", contentEditable: false, lineClamp: 1 }, to.length > 0 ? `To: ${to.join(", ")}` : "Click to configure recipients"), block.props.description && /* @__PURE__ */ React102.createElement(Text52, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description)))));
|
|
8709
8766
|
};
|
|
8710
8767
|
|
|
8711
8768
|
// src/mantine/blocks/notify/flow/FlowView.tsx
|
|
8712
8769
|
import React103, { useState as useState27 } from "react";
|
|
8713
|
-
import { Card as Card23, Group as Group32, Stack as Stack78, Text as Text53, ActionIcon as
|
|
8714
|
-
import { IconSend as IconSend2, IconChevronDown as
|
|
8770
|
+
import { Card as Card23, Group as Group32, Stack as Stack78, Text as Text53, ActionIcon as ActionIcon16, Tooltip as Tooltip5, Button as Button25, Badge as Badge13, Collapse as Collapse3, Alert as Alert10, Loader as Loader5, Code as Code2 } from "@mantine/core";
|
|
8771
|
+
import { IconSend as IconSend2, IconChevronDown as IconChevronDown3, IconChevronUp as IconChevronUp3, IconCheck, IconX } from "@tabler/icons-react";
|
|
8715
8772
|
var NotifyFlowView = ({ editor, block, isDisabled }) => {
|
|
8716
8773
|
const disabled = isDisabled?.isDisabled === "disable";
|
|
8717
8774
|
const [isLoading, setIsLoading] = useState27(false);
|
|
@@ -8829,7 +8886,7 @@ var NotifyFlowView = ({ editor, block, isDisabled }) => {
|
|
|
8829
8886
|
},
|
|
8830
8887
|
isLoading ? "Sending..." : status === "sent" ? "Sent" : "Send"
|
|
8831
8888
|
);
|
|
8832
|
-
return /* @__PURE__ */ React103.createElement(Card23, { withBorder: true, padding: "md", radius: "md", style: { width: "100%" } }, /* @__PURE__ */ React103.createElement(Stack78, { gap: "md" }, /* @__PURE__ */ React103.createElement(Group32, { wrap: "nowrap", justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React103.createElement(Group32, { wrap: "nowrap", align: "flex-start", style: { flex: 1 } }, /* @__PURE__ */ React103.createElement(
|
|
8889
|
+
return /* @__PURE__ */ React103.createElement(Card23, { withBorder: true, padding: "md", radius: "md", style: { width: "100%" } }, /* @__PURE__ */ React103.createElement(Stack78, { gap: "md" }, /* @__PURE__ */ React103.createElement(Group32, { wrap: "nowrap", justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React103.createElement(Group32, { wrap: "nowrap", align: "flex-start", style: { flex: 1 } }, /* @__PURE__ */ React103.createElement(ActionIcon16, { variant: "light", color: getChannelColor(channel), size: "lg", radius: "xl", style: { flexShrink: 0 } }, getIcon(block.props.icon, 18, 1.5, "bell")), /* @__PURE__ */ React103.createElement(Stack78, { gap: "xs", style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React103.createElement(Group32, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React103.createElement(Badge13, { size: "sm", variant: "filled", color: getChannelColor(channel) }, channel.toUpperCase()), /* @__PURE__ */ React103.createElement(Text53, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Notification"), status !== "idle" && /* @__PURE__ */ React103.createElement(Badge13, { size: "xs", variant: "dot", color: getStatusColor(status) }, status)), /* @__PURE__ */ React103.createElement(Text53, { size: "xs", c: "dimmed", contentEditable: false, lineClamp: 1 }, to.length > 0 ? `To: ${to.slice(0, 2).join(", ")}${to.length > 2 ? ` +${to.length - 2} more` : ""}` : "No recipients"), block.props.description && /* @__PURE__ */ React103.createElement(Text53, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description))), /* @__PURE__ */ React103.createElement(Group32, { gap: "xs", style: { flexShrink: 0 } }, disabled && isDisabled?.message ? /* @__PURE__ */ React103.createElement(Tooltip5, { label: isDisabled.message, position: "left", withArrow: true }, sendButton) : sendButton, /* @__PURE__ */ React103.createElement(ActionIcon16, { variant: "subtle", onClick: () => setShowDetails(!showDetails) }, showDetails ? /* @__PURE__ */ React103.createElement(IconChevronUp3, { size: 16 }) : /* @__PURE__ */ React103.createElement(IconChevronDown3, { size: 16 })))), status === "failed" && block.props.errorMessage && /* @__PURE__ */ React103.createElement(Alert10, { color: "red", icon: /* @__PURE__ */ React103.createElement(IconX, { size: 16 }), title: "Failed to send", styles: { message: { fontSize: "12px" } } }, block.props.errorMessage), status === "sent" && block.props.messageId && /* @__PURE__ */ React103.createElement(Alert10, { color: "green", icon: /* @__PURE__ */ React103.createElement(IconCheck, { size: 16 }), title: "Sent successfully", styles: { message: { fontSize: "12px" } } }, "Message ID: ", block.props.messageId, block.props.sentAt && /* @__PURE__ */ React103.createElement(React103.Fragment, null, /* @__PURE__ */ React103.createElement("br", null), "Sent at: ", new Date(block.props.sentAt).toLocaleString())), /* @__PURE__ */ React103.createElement(Collapse3, { in: showDetails }, /* @__PURE__ */ React103.createElement(Stack78, { gap: "md" }, channel === "email" && /* @__PURE__ */ React103.createElement(React103.Fragment, null, /* @__PURE__ */ React103.createElement(Stack78, { gap: "xs" }, /* @__PURE__ */ React103.createElement(Text53, { size: "xs", fw: 600, c: "dimmed" }, "Recipients:"), /* @__PURE__ */ React103.createElement(Code2, { block: true, style: { fontSize: "11px" } }, JSON.stringify(
|
|
8833
8890
|
{
|
|
8834
8891
|
to: to.filter((e) => e.trim() !== ""),
|
|
8835
8892
|
...cc.length > 0 && { cc: cc.filter((e) => e.trim() !== "") },
|
|
@@ -9840,4 +9897,4 @@ export {
|
|
|
9840
9897
|
ixoGraphQLClient,
|
|
9841
9898
|
getEntity
|
|
9842
9899
|
};
|
|
9843
|
-
//# sourceMappingURL=chunk-
|
|
9900
|
+
//# sourceMappingURL=chunk-HNGZPIVW.mjs.map
|