@ixo/editor 2.16.3 → 2.18.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.
- package/dist/{chunk-3A47Y7LN.mjs → chunk-7ROKCOSH.mjs} +676 -527
- package/dist/chunk-7ROKCOSH.mjs.map +1 -0
- package/dist/{graphql-client-CcYJP87w.d.ts → graphql-client-DAeBZWtu.d.ts} +0 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/mantine/index.d.ts +13 -4
- package/dist/mantine/index.mjs +3 -1
- package/package.json +1 -1
- package/dist/chunk-3A47Y7LN.mjs.map +0 -1
|
@@ -888,10 +888,12 @@ function ConditionRow({ condition, availableBlocks, onUpdate, onDelete }) {
|
|
|
888
888
|
}
|
|
889
889
|
|
|
890
890
|
// src/mantine/components/Base/BaseButton.tsx
|
|
891
|
-
import { Button as Button2 } from "@mantine/core";
|
|
891
|
+
import { Button as Button2, Box } from "@mantine/core";
|
|
892
|
+
import { useHover } from "@mantine/hooks";
|
|
892
893
|
import React8 from "react";
|
|
893
894
|
function BaseButton({ disabled, onClick, ...props }) {
|
|
894
|
-
|
|
895
|
+
const { hovered, ref } = useHover();
|
|
896
|
+
return /* @__PURE__ */ React8.createElement(Box, { ref, style: { display: "inline-block" } }, /* @__PURE__ */ React8.createElement(
|
|
895
897
|
Button2,
|
|
896
898
|
{
|
|
897
899
|
onClick,
|
|
@@ -906,20 +908,17 @@ function BaseButton({ disabled, onClick, ...props }) {
|
|
|
906
908
|
opacity: disabled ? 0.6 : 1,
|
|
907
909
|
cursor: disabled ? "default" : "pointer",
|
|
908
910
|
pointerEvents: disabled ? "none" : "auto",
|
|
909
|
-
transition: "opacity 0.15s"
|
|
911
|
+
transition: "opacity 0.15s, background-color 0.15s",
|
|
912
|
+
backgroundColor: hovered && !disabled ? "white" : void 0
|
|
910
913
|
},
|
|
911
914
|
styles: {
|
|
912
915
|
root: {
|
|
913
|
-
color: "#fff"
|
|
914
|
-
"&:hover": {
|
|
915
|
-
backgroundColor: disabled ? void 0 : "white"
|
|
916
|
-
},
|
|
917
|
-
transition: "background-color 0.15s"
|
|
916
|
+
color: "#fff"
|
|
918
917
|
}
|
|
919
918
|
},
|
|
920
919
|
...props
|
|
921
920
|
}
|
|
922
|
-
);
|
|
921
|
+
));
|
|
923
922
|
}
|
|
924
923
|
|
|
925
924
|
// src/mantine/components/ConditionsTab.tsx
|
|
@@ -1213,7 +1212,7 @@ var GeneralTab = ({
|
|
|
1213
1212
|
};
|
|
1214
1213
|
|
|
1215
1214
|
// src/mantine/components/Layouts/BaseRightPanelLayout.tsx
|
|
1216
|
-
import { Box, Center, CloseButton, Flex, Paper, Title } from "@mantine/core";
|
|
1215
|
+
import { Box as Box2, Center, CloseButton, Flex, Paper, Title } from "@mantine/core";
|
|
1217
1216
|
import { IconSettings } from "@tabler/icons-react";
|
|
1218
1217
|
import React14 from "react";
|
|
1219
1218
|
function BaseRightPanelLayout({ title, isTemplate = true, captionContent, onClose, children }) {
|
|
@@ -1247,7 +1246,7 @@ function BaseRightPanelLayout({ title, isTemplate = true, captionContent, onClos
|
|
|
1247
1246
|
/* @__PURE__ */ React14.createElement(Title, { px: 40, mb: "md", order: 3 }, title),
|
|
1248
1247
|
captionContent,
|
|
1249
1248
|
/* @__PURE__ */ React14.createElement(
|
|
1250
|
-
|
|
1249
|
+
Box2,
|
|
1251
1250
|
{
|
|
1252
1251
|
px: 40,
|
|
1253
1252
|
style: {
|
|
@@ -1717,7 +1716,7 @@ import React22, { useCallback as useCallback9 } from "react";
|
|
|
1717
1716
|
|
|
1718
1717
|
// src/mantine/blocks/list/template/GeneralTab.tsx
|
|
1719
1718
|
import React21, { useState as useState6 } from "react";
|
|
1720
|
-
import { Stack as Stack9, Card as Card2, Group as Group4, Text as Text6, Box as
|
|
1719
|
+
import { Stack as Stack9, Card as Card2, Group as Group4, Text as Text6, Box as Box3, Button as Button3, Switch as Switch3, Accordion } from "@mantine/core";
|
|
1721
1720
|
|
|
1722
1721
|
// src/mantine/blocks/list/linked_resources/config.ts
|
|
1723
1722
|
var linkedResourcesMetadata = {
|
|
@@ -2616,7 +2615,7 @@ var GeneralTab2 = ({ initialConfig, onSave }) => {
|
|
|
2616
2615
|
onClick: () => handleTypeSelect(listType.id)
|
|
2617
2616
|
},
|
|
2618
2617
|
/* @__PURE__ */ React21.createElement(Group4, { gap: "md", align: "flex-start" }, /* @__PURE__ */ React21.createElement(
|
|
2619
|
-
|
|
2618
|
+
Box3,
|
|
2620
2619
|
{
|
|
2621
2620
|
style: {
|
|
2622
2621
|
width: 48,
|
|
@@ -2729,11 +2728,11 @@ var ListTemplateView = ({ editor, block }) => {
|
|
|
2729
2728
|
|
|
2730
2729
|
// src/mantine/blocks/list/flow/ListFlowView.tsx
|
|
2731
2730
|
import React48, { useState as useState10, useEffect as useEffect7, useMemo as useMemo8, useCallback as useCallback10 } from "react";
|
|
2732
|
-
import { Stack as Stack30, Text as Text29, ActionIcon as ActionIcon2, Loader as Loader2, Center as Center4, Flex as
|
|
2731
|
+
import { Stack as Stack30, Text as Text29, ActionIcon as ActionIcon2, Loader as Loader2, Center as Center4, Flex as Flex20, Title as Title3, Collapse as Collapse2, Tooltip as Tooltip5 } from "@mantine/core";
|
|
2733
2732
|
|
|
2734
2733
|
// src/mantine/blocks/list/linked_resources/ResourcesList.tsx
|
|
2735
2734
|
import React26 from "react";
|
|
2736
|
-
import { Stack as Stack11, Text as Text8, Box as
|
|
2735
|
+
import { Stack as Stack11, Text as Text8, Box as Box4, Flex as Flex3 } from "@mantine/core";
|
|
2737
2736
|
import { IconPdf, IconFileTypeHtml, IconJson, IconPhoto, IconFileText as IconFileText2, IconFile } from "@tabler/icons-react";
|
|
2738
2737
|
|
|
2739
2738
|
// src/mantine/blocks/list/ListItemContainer.tsx
|
|
@@ -2821,7 +2820,7 @@ var ResourcesList = ({ items, isMultiSelect, isItemChecked, onItemCheck, config:
|
|
|
2821
2820
|
const title = item.description || item.id || `Resource ${index + 1}`;
|
|
2822
2821
|
const isChecked = isItemChecked?.(item.id);
|
|
2823
2822
|
return /* @__PURE__ */ React26.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.id, !isChecked), key: item.id || index, isChecked: !!isChecked }, /* @__PURE__ */ React26.createElement(Flex3, { align: "center", gap: "sm" }, /* @__PURE__ */ React26.createElement(
|
|
2824
|
-
|
|
2823
|
+
Box4,
|
|
2825
2824
|
{
|
|
2826
2825
|
style: {
|
|
2827
2826
|
width: 32,
|
|
@@ -2845,12 +2844,12 @@ var ResourcesList = ({ items, isMultiSelect, isItemChecked, onItemCheck, config:
|
|
|
2845
2844
|
}
|
|
2846
2845
|
)));
|
|
2847
2846
|
});
|
|
2848
|
-
return /* @__PURE__ */ React26.createElement(
|
|
2847
|
+
return /* @__PURE__ */ React26.createElement(Box4, { flex: 1 }, /* @__PURE__ */ React26.createElement(Stack11, null, rows));
|
|
2849
2848
|
};
|
|
2850
2849
|
|
|
2851
2850
|
// src/mantine/blocks/list/assets/AssetsList.tsx
|
|
2852
2851
|
import React27 from "react";
|
|
2853
|
-
import { Text as Text9, Box as
|
|
2852
|
+
import { Text as Text9, Box as Box5, Stack as Stack12, Flex as Flex4, Image } from "@mantine/core";
|
|
2854
2853
|
|
|
2855
2854
|
// src/core/lib/formatters.ts
|
|
2856
2855
|
var formatNumber = (value) => typeof value === "number" ? value.toLocaleString() : "-";
|
|
@@ -2872,12 +2871,12 @@ var AssetsList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
|
2872
2871
|
const isChecked = isItemChecked?.(asset.did);
|
|
2873
2872
|
return /* @__PURE__ */ React27.createElement(ListItemContainer, { onClick: () => onItemCheck?.(asset.did, !isChecked), key: asset.did, isChecked: !!isChecked }, /* @__PURE__ */ React27.createElement(Flex4, { align: "center", gap: "sm" }, /* @__PURE__ */ React27.createElement(Image, { radius: 16, w: 32, h: 32, src: asset.icon }), /* @__PURE__ */ React27.createElement(Stack12, { gap: 0 }, /* @__PURE__ */ React27.createElement(Text9, { size: "sm" }, asset.name || "-", " ", asset.alsoKnownAs || "-"), /* @__PURE__ */ React27.createElement(Text9, { size: "sm", c: "dimmed" }, asset.issuer || "-"))), /* @__PURE__ */ React27.createElement(Flex4, { align: "center", gap: "md" }, /* @__PURE__ */ React27.createElement(Stack12, { ta: "right", gap: 0 }, /* @__PURE__ */ React27.createElement(Text9, { size: "sm" }, asset.currency || "", formatNumber(asset.price)), /* @__PURE__ */ React27.createElement(Text9, { size: "sm", c: "dimmed" }, asset.owned ? "Owned" : "Not Owned")), isMultiSelect && /* @__PURE__ */ React27.createElement(ListItemCheckbox, { ariaLabel: `Select asset ${asset.did}`, checked: isItemChecked?.(asset.did), onCheck: (checked) => onItemCheck?.(asset.did, checked) })));
|
|
2874
2873
|
});
|
|
2875
|
-
return /* @__PURE__ */ React27.createElement(
|
|
2874
|
+
return /* @__PURE__ */ React27.createElement(Box5, { flex: 1 }, /* @__PURE__ */ React27.createElement(Stack12, null, rows));
|
|
2876
2875
|
};
|
|
2877
2876
|
|
|
2878
2877
|
// src/mantine/blocks/list/transactions/TransactionsList.tsx
|
|
2879
2878
|
import React28 from "react";
|
|
2880
|
-
import { Text as Text10, Badge, Tooltip as Tooltip3, Box as
|
|
2879
|
+
import { Text as Text10, Badge, Tooltip as Tooltip3, Box as Box6, Flex as Flex5, Stack as Stack13 } from "@mantine/core";
|
|
2881
2880
|
var formatTime = (timeStr) => {
|
|
2882
2881
|
try {
|
|
2883
2882
|
const date = new Date(timeStr);
|
|
@@ -2905,12 +2904,12 @@ var TransactionsList = ({ items, isMultiSelect, isItemChecked, onItemCheck, conf
|
|
|
2905
2904
|
}
|
|
2906
2905
|
)));
|
|
2907
2906
|
});
|
|
2908
|
-
return /* @__PURE__ */ React28.createElement(
|
|
2907
|
+
return /* @__PURE__ */ React28.createElement(Box6, { flex: 1 }, /* @__PURE__ */ React28.createElement(Stack13, null, rows));
|
|
2909
2908
|
};
|
|
2910
2909
|
|
|
2911
2910
|
// src/mantine/blocks/list/collections/CollectionsList.tsx
|
|
2912
2911
|
import React29 from "react";
|
|
2913
|
-
import { Text as Text11, Box as
|
|
2912
|
+
import { Text as Text11, Box as Box7, Image as Image2, Stack as Stack14, Flex as Flex6 } from "@mantine/core";
|
|
2914
2913
|
var CollectionsList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
2915
2914
|
if (!items || items.length === 0) {
|
|
2916
2915
|
return /* @__PURE__ */ React29.createElement(Text11, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No collections found");
|
|
@@ -2919,12 +2918,12 @@ var CollectionsList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) =>
|
|
|
2919
2918
|
const isChecked = isItemChecked?.(item.did);
|
|
2920
2919
|
return /* @__PURE__ */ React29.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.did, !isChecked), key: item.did, isChecked: !!isChecked }, /* @__PURE__ */ React29.createElement(Flex6, { align: "center", gap: "sm" }, /* @__PURE__ */ React29.createElement(Image2, { radius: 16, w: 32, h: 32, src: item.icon }), /* @__PURE__ */ React29.createElement(Stack14, { gap: 0 }, /* @__PURE__ */ React29.createElement(Text11, { size: "sm" }, item.name), /* @__PURE__ */ React29.createElement(Text11, { size: "sm", c: "dimmed" }, item.brand))), /* @__PURE__ */ React29.createElement(Flex6, { align: "center", gap: "md" }, /* @__PURE__ */ React29.createElement(Stack14, { ta: "right", gap: 0 }, /* @__PURE__ */ React29.createElement(Text11, { size: "sm" }, item.totalAssets, " Assets"), /* @__PURE__ */ React29.createElement(Text11, { size: "sm", c: "dimmed" }, item.currency, item.price)), isMultiSelect && /* @__PURE__ */ React29.createElement(ListItemCheckbox, { ariaLabel: `Select collection ${item.did}`, checked: isItemChecked?.(item.did), onCheck: (checked) => onItemCheck?.(item.did, checked) })));
|
|
2921
2920
|
});
|
|
2922
|
-
return /* @__PURE__ */ React29.createElement(
|
|
2921
|
+
return /* @__PURE__ */ React29.createElement(Box7, { flex: 1 }, /* @__PURE__ */ React29.createElement(Stack14, null, rows));
|
|
2923
2922
|
};
|
|
2924
2923
|
|
|
2925
2924
|
// src/mantine/blocks/list/balances/BalancesList.tsx
|
|
2926
2925
|
import React30 from "react";
|
|
2927
|
-
import { Text as Text12, Box as
|
|
2926
|
+
import { Text as Text12, Box as Box8, Stack as Stack15, Flex as Flex7, Avatar, Group as Group6 } from "@mantine/core";
|
|
2928
2927
|
|
|
2929
2928
|
// src/core/utils/numbers.ts
|
|
2930
2929
|
var numberFormatter = (num, digits) => {
|
|
@@ -2961,12 +2960,12 @@ var BalancesList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
|
2961
2960
|
const isChecked = isItemChecked?.(item.denom);
|
|
2962
2961
|
return /* @__PURE__ */ React30.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.denom, !isChecked), key: item.denom, isChecked: !!isChecked }, /* @__PURE__ */ React30.createElement(Group6, { gap: 12 }, /* @__PURE__ */ React30.createElement(Avatar, { src: item.tokenImage, size: 40, radius: "xl" }), /* @__PURE__ */ React30.createElement(Stack15, { gap: 4 }, /* @__PURE__ */ React30.createElement(Text12, { size: "sm", fw: 500 }, item.tokenName), item.chainCount > 1 && /* @__PURE__ */ React30.createElement(Group6, { gap: 4 }, /* @__PURE__ */ React30.createElement(Text12, { size: "xs", c: "dimmed" }, item.chainCount, " chains"), /* @__PURE__ */ React30.createElement(Group6, { gap: -4 }, /* @__PURE__ */ React30.createElement(Avatar, { size: 16, radius: "xl", bg: "dimmed" }), /* @__PURE__ */ React30.createElement(Avatar, { size: 16, radius: "xl", bg: "dimmed", ml: -4 }), item.chainCount > 2 && /* @__PURE__ */ React30.createElement(Avatar, { size: 16, radius: "xl", bg: "dimmed", ml: -4 }))))), /* @__PURE__ */ React30.createElement(Flex7, { align: "center", gap: "md" }, /* @__PURE__ */ React30.createElement(Stack15, { gap: 4, align: "flex-end" }, /* @__PURE__ */ React30.createElement(Text12, { size: "sm", fw: 500 }, renderNumber(item.amount)), /* @__PURE__ */ React30.createElement(Text12, { size: "xs", c: "dimmed" }, "$", renderNumber(item.usdAmount))), isMultiSelect && /* @__PURE__ */ React30.createElement(ListItemCheckbox, { ariaLabel: `Select balance ${item.denom}`, checked: isItemChecked?.(item.denom), onCheck: (checked) => onItemCheck?.(item.denom, checked) })));
|
|
2963
2962
|
});
|
|
2964
|
-
return /* @__PURE__ */ React30.createElement(
|
|
2963
|
+
return /* @__PURE__ */ React30.createElement(Box8, { flex: 1 }, /* @__PURE__ */ React30.createElement(Stack15, null, rows));
|
|
2965
2964
|
};
|
|
2966
2965
|
|
|
2967
2966
|
// src/mantine/blocks/list/investments/InvestmentsList.tsx
|
|
2968
2967
|
import React31 from "react";
|
|
2969
|
-
import { Text as Text13, Box as
|
|
2968
|
+
import { Text as Text13, Box as Box9, Image as Image3, Stack as Stack16, Flex as Flex8, Progress } from "@mantine/core";
|
|
2970
2969
|
var InvestmentsList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
2971
2970
|
if (!items || items.length === 0) {
|
|
2972
2971
|
return /* @__PURE__ */ React31.createElement(Text13, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No investments found");
|
|
@@ -2975,12 +2974,12 @@ var InvestmentsList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) =>
|
|
|
2975
2974
|
const isChecked = isItemChecked?.(item.did);
|
|
2976
2975
|
return /* @__PURE__ */ React31.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.did, !isChecked), key: item.did, isChecked: !!isChecked }, /* @__PURE__ */ React31.createElement(Flex8, { align: "center", gap: "sm" }, /* @__PURE__ */ React31.createElement(Image3, { radius: 16, w: 32, h: 32, src: item.icon }), /* @__PURE__ */ React31.createElement(Stack16, { gap: 0 }, /* @__PURE__ */ React31.createElement(Text13, { size: "sm" }, item.name || "-"), /* @__PURE__ */ React31.createElement(Text13, { size: "sm", c: "dimmed" }, item.brand || "-"))), /* @__PURE__ */ React31.createElement(Flex8, { align: "center", gap: "md" }, /* @__PURE__ */ React31.createElement(Stack16, { ta: "right", gap: 0 }, /* @__PURE__ */ React31.createElement(Flex8, { gap: "5px" }, /* @__PURE__ */ React31.createElement(Text13, { size: "sm" }, item.currency + formatNumber(item.currentAmount)), /* @__PURE__ */ React31.createElement(Text13, { size: "sm", c: "dimmed" }, "/ ", item.currency + formatNumber(item.maxAmount))), /* @__PURE__ */ React31.createElement(Text13, { size: "xs", c: "dimmed" }, /* @__PURE__ */ React31.createElement(Progress, { color: "rgb(0, 255, 157)", radius: "xl", size: "lg", value: item.currentAmount * 100 / item.maxAmount }))), isMultiSelect && /* @__PURE__ */ React31.createElement(ListItemCheckbox, { ariaLabel: `Select investment ${item.did}`, checked: isItemChecked?.(item.did), onCheck: (checked) => onItemCheck?.(item.did, checked) })));
|
|
2977
2976
|
});
|
|
2978
|
-
return /* @__PURE__ */ React31.createElement(
|
|
2977
|
+
return /* @__PURE__ */ React31.createElement(Box9, { flex: 1 }, /* @__PURE__ */ React31.createElement(Stack16, null, rows));
|
|
2979
2978
|
};
|
|
2980
2979
|
|
|
2981
2980
|
// src/mantine/blocks/list/oracles/OraclesList.tsx
|
|
2982
2981
|
import React32 from "react";
|
|
2983
|
-
import { Text as Text14, Box as
|
|
2982
|
+
import { Text as Text14, Box as Box10, Image as Image4, Stack as Stack17, Flex as Flex9 } from "@mantine/core";
|
|
2984
2983
|
var OraclesList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
2985
2984
|
if (!items || items.length === 0) {
|
|
2986
2985
|
return /* @__PURE__ */ React32.createElement(Text14, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No oracles found");
|
|
@@ -2989,12 +2988,12 @@ var OraclesList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
|
2989
2988
|
const isChecked = isItemChecked?.(item.did);
|
|
2990
2989
|
return /* @__PURE__ */ React32.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.did, !isChecked), key: item.did, isChecked: !!isChecked }, /* @__PURE__ */ React32.createElement(Flex9, { align: "center", gap: "sm" }, /* @__PURE__ */ React32.createElement(Image4, { radius: 16, w: 32, h: 32, src: item.icon }), /* @__PURE__ */ React32.createElement(Stack17, { gap: 0 }, /* @__PURE__ */ React32.createElement(Text14, { size: "sm" }, item.name || "-"), /* @__PURE__ */ React32.createElement(Text14, { size: "sm", c: "dimmed" }, item.brand || "-"))), /* @__PURE__ */ React32.createElement(Flex9, { align: "center", gap: "md" }, /* @__PURE__ */ React32.createElement(Stack17, { ta: "right", gap: 0 }, /* @__PURE__ */ React32.createElement(Text14, { size: "sm" }, item.currency || "-"), /* @__PURE__ */ React32.createElement(Text14, { size: "xs", c: "dimmed" }, item.minPoints, " - ", item.maxPoints, " pts"), /* @__PURE__ */ React32.createElement(Text14, { size: "xs", c: "dimmed" }, item.flowsAmount, " Flows")), isMultiSelect && /* @__PURE__ */ React32.createElement(ListItemCheckbox, { ariaLabel: `Select oracle ${item.did}`, checked: isItemChecked?.(item.did), onCheck: (checked) => onItemCheck?.(item.did, checked) })));
|
|
2991
2990
|
});
|
|
2992
|
-
return /* @__PURE__ */ React32.createElement(
|
|
2991
|
+
return /* @__PURE__ */ React32.createElement(Box10, { flex: 1 }, /* @__PURE__ */ React32.createElement(Stack17, null, rows));
|
|
2993
2992
|
};
|
|
2994
2993
|
|
|
2995
2994
|
// src/mantine/blocks/list/pods/PODsList.tsx
|
|
2996
2995
|
import React33 from "react";
|
|
2997
|
-
import { Text as Text15, Box as
|
|
2996
|
+
import { Text as Text15, Box as Box11, Image as Image5, Stack as Stack18, Flex as Flex10 } from "@mantine/core";
|
|
2998
2997
|
var PodsList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
2999
2998
|
if (!items || items.length === 0) {
|
|
3000
2999
|
return /* @__PURE__ */ React33.createElement(Text15, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No PODs found");
|
|
@@ -3003,12 +3002,12 @@ var PodsList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
|
3003
3002
|
const isChecked = isItemChecked?.(item.did);
|
|
3004
3003
|
return /* @__PURE__ */ React33.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.did, !isChecked), key: item.did, isChecked: !!isChecked }, /* @__PURE__ */ React33.createElement(Flex10, { align: "center", gap: "sm" }, /* @__PURE__ */ React33.createElement(Image5, { radius: 16, w: 32, h: 32, src: item.icon }), /* @__PURE__ */ React33.createElement(Stack18, { gap: 0 }, /* @__PURE__ */ React33.createElement(Text15, { size: "sm" }, item.name || "-"), /* @__PURE__ */ React33.createElement(Text15, { size: "sm", c: "dimmed" }, item.startDate, " \u2192 ", item.endDate))), /* @__PURE__ */ React33.createElement(Flex10, { align: "center", gap: "md" }, /* @__PURE__ */ React33.createElement(Stack18, { ta: "right", gap: 0 }, /* @__PURE__ */ React33.createElement(Text15, { size: "sm" }, item.members, " Members"), /* @__PURE__ */ React33.createElement(Text15, { size: "sm", c: "dimmed" }, item.totalProposals, " Proposals")), isMultiSelect && /* @__PURE__ */ React33.createElement(ListItemCheckbox, { ariaLabel: `Select POD ${item.did}`, checked: isItemChecked?.(item.did), onCheck: (checked) => onItemCheck?.(item.did, checked) })));
|
|
3005
3004
|
});
|
|
3006
|
-
return /* @__PURE__ */ React33.createElement(
|
|
3005
|
+
return /* @__PURE__ */ React33.createElement(Box11, { flex: 1 }, /* @__PURE__ */ React33.createElement(Stack18, null, rows));
|
|
3007
3006
|
};
|
|
3008
3007
|
|
|
3009
3008
|
// src/mantine/blocks/list/proposals/ProposalsList.tsx
|
|
3010
3009
|
import React34 from "react";
|
|
3011
|
-
import { Text as Text16, Box as
|
|
3010
|
+
import { Text as Text16, Box as Box12, Image as Image6, Stack as Stack19, Flex as Flex11, Badge as Badge2 } from "@mantine/core";
|
|
3012
3011
|
var ProposalsList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
3013
3012
|
if (!items || items.length === 0) {
|
|
3014
3013
|
return /* @__PURE__ */ React34.createElement(Text16, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No proposals found");
|
|
@@ -3017,12 +3016,12 @@ var ProposalsList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
|
3017
3016
|
const isChecked = isItemChecked?.(item.did);
|
|
3018
3017
|
return /* @__PURE__ */ React34.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.did, !isChecked), key: item.did, isChecked: !!isChecked }, /* @__PURE__ */ React34.createElement(Flex11, { align: "center", gap: "sm" }, /* @__PURE__ */ React34.createElement(Image6, { radius: 16, w: 32, h: 32, src: item.icon }), /* @__PURE__ */ React34.createElement(Stack19, { gap: 0 }, /* @__PURE__ */ React34.createElement(Text16, { size: "sm" }, item.name || "-"), /* @__PURE__ */ React34.createElement(Text16, { size: "xs", c: "dimmed" }, item.description || "-"))), /* @__PURE__ */ React34.createElement(Flex11, { align: "center", gap: "md" }, /* @__PURE__ */ React34.createElement(Stack19, { ta: "right", align: "end", gap: 0 }, /* @__PURE__ */ React34.createElement(Badge2, { size: "sm", variant: "light", color: "blue", style: { fontFamily: "monospace", fontSize: "10px" } }, item.status), /* @__PURE__ */ React34.createElement(Text16, { size: "sm", c: "dimmed" }, item.isVotedOn ? "Voted" : "Not voted")), isMultiSelect && /* @__PURE__ */ React34.createElement(ListItemCheckbox, { ariaLabel: `Select proposal ${item.did}`, checked: isItemChecked?.(item.did), onCheck: (checked) => onItemCheck?.(item.did, checked) })));
|
|
3019
3018
|
});
|
|
3020
|
-
return /* @__PURE__ */ React34.createElement(
|
|
3019
|
+
return /* @__PURE__ */ React34.createElement(Box12, { flex: 1 }, /* @__PURE__ */ React34.createElement(Stack19, null, rows));
|
|
3021
3020
|
};
|
|
3022
3021
|
|
|
3023
3022
|
// src/mantine/blocks/list/requests/RequestsList.tsx
|
|
3024
3023
|
import React35 from "react";
|
|
3025
|
-
import { Text as Text17, Box as
|
|
3024
|
+
import { Text as Text17, Box as Box13, Image as Image7, Stack as Stack20, Flex as Flex12 } from "@mantine/core";
|
|
3026
3025
|
var RequestsList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
3027
3026
|
if (!items || items.length === 0) {
|
|
3028
3027
|
return /* @__PURE__ */ React35.createElement(Text17, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No requests found");
|
|
@@ -3031,12 +3030,12 @@ var RequestsList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
|
3031
3030
|
const isChecked = isItemChecked?.(item.did);
|
|
3032
3031
|
return /* @__PURE__ */ React35.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.did, !isChecked), key: item.did, isChecked: !!isChecked }, /* @__PURE__ */ React35.createElement(Flex12, { align: "center", gap: "sm" }, /* @__PURE__ */ React35.createElement(Image7, { radius: 16, w: 32, h: 32, src: item.icon }), /* @__PURE__ */ React35.createElement(Stack20, { gap: 0 }, /* @__PURE__ */ React35.createElement(Text17, { size: "sm" }, item.name || "-"), /* @__PURE__ */ React35.createElement(Text17, { size: "sm", c: "dimmed" }, item.brand || "-"))), /* @__PURE__ */ React35.createElement(Flex12, { align: "center", gap: "md" }, /* @__PURE__ */ React35.createElement(Stack20, { ta: "right", gap: 0 }, /* @__PURE__ */ React35.createElement(Text17, { size: "sm", c: "dimmed" }, item.currency || "", item.budget ?? "-"), /* @__PURE__ */ React35.createElement(Text17, { size: "xs", c: "dimmed" }, item.totalApplications ?? 0, " Applications")), isMultiSelect && /* @__PURE__ */ React35.createElement(ListItemCheckbox, { ariaLabel: `Select request ${item.did}`, checked: isItemChecked?.(item.did), onCheck: (checked) => onItemCheck?.(item.did, checked) })));
|
|
3033
3032
|
});
|
|
3034
|
-
return /* @__PURE__ */ React35.createElement(
|
|
3033
|
+
return /* @__PURE__ */ React35.createElement(Box13, { flex: 1 }, /* @__PURE__ */ React35.createElement(Stack20, null, rows));
|
|
3035
3034
|
};
|
|
3036
3035
|
|
|
3037
3036
|
// src/mantine/blocks/list/members/MembersList.tsx
|
|
3038
3037
|
import React36 from "react";
|
|
3039
|
-
import { Text as Text18, Box as
|
|
3038
|
+
import { Text as Text18, Box as Box14, Image as Image8, Stack as Stack21, Flex as Flex13 } from "@mantine/core";
|
|
3040
3039
|
var MembersList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
3041
3040
|
if (!items || items.length === 0) {
|
|
3042
3041
|
return /* @__PURE__ */ React36.createElement(Text18, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No members found");
|
|
@@ -3045,12 +3044,12 @@ var MembersList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
|
3045
3044
|
const isChecked = isItemChecked?.(item.did);
|
|
3046
3045
|
return /* @__PURE__ */ React36.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.did, !isChecked), key: item.did, isChecked: !!isChecked }, /* @__PURE__ */ React36.createElement(Flex13, { align: "center", gap: "sm" }, /* @__PURE__ */ React36.createElement(Image8, { radius: 16, w: 32, h: 32, src: item.icon }), /* @__PURE__ */ React36.createElement(Stack21, { gap: 0 }, /* @__PURE__ */ React36.createElement(Text18, { size: "sm" }, item.username || "-"), /* @__PURE__ */ React36.createElement(Text18, { size: "xs", c: "dimmed" }, item.address || "-"))), /* @__PURE__ */ React36.createElement(Flex13, { align: "center", gap: "md" }, /* @__PURE__ */ React36.createElement(Stack21, { ta: "right", gap: 0 }, /* @__PURE__ */ React36.createElement(Text18, { size: "sm" }, item.percentage), /* @__PURE__ */ React36.createElement(Text18, { size: "sm", c: "dimmed" }, item.role)), isMultiSelect && /* @__PURE__ */ React36.createElement(ListItemCheckbox, { ariaLabel: `Select member ${item.did}`, checked: isItemChecked?.(item.did), onCheck: (checked) => onItemCheck?.(item.did, checked) })));
|
|
3047
3046
|
});
|
|
3048
|
-
return /* @__PURE__ */ React36.createElement(
|
|
3047
|
+
return /* @__PURE__ */ React36.createElement(Box14, { flex: 1 }, /* @__PURE__ */ React36.createElement(Stack21, null, rows));
|
|
3049
3048
|
};
|
|
3050
3049
|
|
|
3051
3050
|
// src/mantine/blocks/list/validators/ValidatorsList.tsx
|
|
3052
3051
|
import React37 from "react";
|
|
3053
|
-
import { Text as Text19, Box as
|
|
3052
|
+
import { Text as Text19, Box as Box15, Image as Image9, Stack as Stack22, Flex as Flex14 } from "@mantine/core";
|
|
3054
3053
|
|
|
3055
3054
|
// src/core/lib/validators.ts
|
|
3056
3055
|
var getDelegatedTokensFromValidator = (validator) => Number(validator?.amount ?? 0);
|
|
@@ -3065,12 +3064,12 @@ var ValidatorsList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
|
3065
3064
|
const isChecked = isItemChecked?.(item.did);
|
|
3066
3065
|
return /* @__PURE__ */ React37.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.did, !isChecked), key: item.did, isChecked: !!isChecked }, /* @__PURE__ */ React37.createElement(Flex14, { align: "center", gap: "sm" }, /* @__PURE__ */ React37.createElement(Image9, { radius: 16, w: 32, h: 32, src: item.icon }), /* @__PURE__ */ React37.createElement(Stack22, { gap: 0 }, /* @__PURE__ */ React37.createElement(Text19, { size: "sm" }, item.name || "-"), /* @__PURE__ */ React37.createElement(Text19, { size: "xs", c: "dimmed" }, item.description || "-"))), /* @__PURE__ */ React37.createElement(Flex14, { align: "center", gap: "md" }, /* @__PURE__ */ React37.createElement(Stack22, { ta: "right", gap: 0 }, /* @__PURE__ */ React37.createElement(Text19, { size: "sm" }, numberFormatter(getDisplayDelegatedTokensFromValidator(item), 2), " ", item.currency), /* @__PURE__ */ React37.createElement(Text19, { size: "sm", c: "dimmed" }, item.commission, "% fee"), /* @__PURE__ */ React37.createElement(Text19, { size: "xs", c: "dimmed" }, item.isActive ? "Active" : "Inactive", " \u2022 ", item.isStaked ? "Staked" : "Not staked", " \u2022 ", item.isBonding ? "Bonding" : "Not bonding")), isMultiSelect && /* @__PURE__ */ React37.createElement(ListItemCheckbox, { ariaLabel: `Select validator ${item.did}`, checked: isItemChecked?.(item.did), onCheck: (checked) => onItemCheck?.(item.did, checked) })));
|
|
3067
3066
|
});
|
|
3068
|
-
return /* @__PURE__ */ React37.createElement(
|
|
3067
|
+
return /* @__PURE__ */ React37.createElement(Box15, { flex: 1 }, /* @__PURE__ */ React37.createElement(Stack22, null, rows));
|
|
3069
3068
|
};
|
|
3070
3069
|
|
|
3071
3070
|
// src/mantine/blocks/list/ListActionsMenu.tsx
|
|
3072
3071
|
import React38, { useState as useState7 } from "react";
|
|
3073
|
-
import { Menu, Text as Text20, ActionIcon, Flex as Flex15, Box as
|
|
3072
|
+
import { Menu, Text as Text20, ActionIcon, Flex as Flex15, Box as Box16, Collapse, Tooltip as Tooltip4 } from "@mantine/core";
|
|
3074
3073
|
import {
|
|
3075
3074
|
IconArrowDown,
|
|
3076
3075
|
IconArrowUp,
|
|
@@ -3087,7 +3086,7 @@ var SortRow = ({ opt, value, onChange }) => {
|
|
|
3087
3086
|
const isDescActive = value?.key === opt.key && value?.direction === "desc";
|
|
3088
3087
|
const isRowActive = isAscActive || isDescActive;
|
|
3089
3088
|
return /* @__PURE__ */ React38.createElement(
|
|
3090
|
-
|
|
3089
|
+
Box16,
|
|
3091
3090
|
{
|
|
3092
3091
|
px: "sm",
|
|
3093
3092
|
py: 6,
|
|
@@ -3286,7 +3285,7 @@ var DEFAULT_PAGE_SIZE = 5;
|
|
|
3286
3285
|
|
|
3287
3286
|
// src/mantine/blocks/list/dao_members/MembersList.tsx
|
|
3288
3287
|
import React41 from "react";
|
|
3289
|
-
import { Text as Text22, Box as
|
|
3288
|
+
import { Text as Text22, Box as Box17, Image as Image10, Stack as Stack23, Flex as Flex16 } from "@mantine/core";
|
|
3290
3289
|
var DaoMembersList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
3291
3290
|
if (!items || items.length === 0) {
|
|
3292
3291
|
return /* @__PURE__ */ React41.createElement(Text22, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No members found");
|
|
@@ -3302,12 +3301,12 @@ var DaoMembersList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
|
3302
3301
|
}
|
|
3303
3302
|
)));
|
|
3304
3303
|
});
|
|
3305
|
-
return /* @__PURE__ */ React41.createElement(
|
|
3304
|
+
return /* @__PURE__ */ React41.createElement(Box17, { flex: 1 }, /* @__PURE__ */ React41.createElement(Stack23, { gap: "xs" }, rows));
|
|
3306
3305
|
};
|
|
3307
3306
|
|
|
3308
3307
|
// src/mantine/blocks/list/deed_subscriptions/DeedSubscriptionsList.tsx
|
|
3309
3308
|
import React42 from "react";
|
|
3310
|
-
import { Text as Text23, Box as
|
|
3309
|
+
import { Text as Text23, Box as Box18, Image as Image11, Stack as Stack24, Flex as Flex17, Badge as Badge3 } from "@mantine/core";
|
|
3311
3310
|
import Jazzicon from "react-jazzicon";
|
|
3312
3311
|
var DeedSubscriptionsList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
3313
3312
|
if (!items || items.length === 0) {
|
|
@@ -3330,55 +3329,55 @@ var DeedSubscriptionsList = ({ items, isMultiSelect, isItemChecked, onItemCheck
|
|
|
3330
3329
|
return /* @__PURE__ */ React42.createElement(ListItemContainer, { onClick: () => {
|
|
3331
3330
|
}, key: itemId, isChecked: false, withIcon: false }, /* @__PURE__ */ React42.createElement(Flex17, { align: "center", gap: "sm" }, item.subscriberImage ? /* @__PURE__ */ React42.createElement(Image11, { radius: 16, w: 32, h: 32, src: item.subscriberImage }) : /* @__PURE__ */ React42.createElement(Jazzicon, { diameter: 32, seed: Array.from(itemId ?? "").reduce((acc, char) => acc + char.charCodeAt(0), 0) }), /* @__PURE__ */ React42.createElement(Stack24, { gap: 0 }, /* @__PURE__ */ React42.createElement(Text23, { size: "sm", fw: 500 }, item.subscriberName || "Unknown Subscriber"), /* @__PURE__ */ React42.createElement(Text23, { size: "xs", c: "dimmed", lineClamp: 1 }, "Subscription"))), /* @__PURE__ */ React42.createElement(Flex17, { align: "center", gap: "md" }, /* @__PURE__ */ React42.createElement(Stack24, { align: "end", ta: "right", gap: 0 }, /* @__PURE__ */ React42.createElement(Badge3, { size: "sm", color: getStatusColor2(item.status), variant: "light" }, item.status), /* @__PURE__ */ React42.createElement(Text23, { size: "xs", c: "dimmed" }, new Date(item.subscriptionDate).toLocaleDateString()))));
|
|
3332
3331
|
});
|
|
3333
|
-
return /* @__PURE__ */ React42.createElement(
|
|
3332
|
+
return /* @__PURE__ */ React42.createElement(Box18, { flex: 1 }, /* @__PURE__ */ React42.createElement(Stack24, { gap: "xs" }, rows));
|
|
3334
3333
|
};
|
|
3335
3334
|
|
|
3336
3335
|
// src/mantine/blocks/list/ListSelectionPanel.tsx
|
|
3337
3336
|
import React44, { useState as useState8, useEffect as useEffect6, useMemo as useMemo7 } from "react";
|
|
3338
|
-
import { Paper as Paper4, CloseButton as CloseButton2, Stack as Stack26, Alert as Alert3, Text as Text25, Loader, Center as Center3 } from "@mantine/core";
|
|
3337
|
+
import { Paper as Paper4, CloseButton as CloseButton2, Stack as Stack26, Alert as Alert3, Text as Text25, Loader, Center as Center3, Space } from "@mantine/core";
|
|
3339
3338
|
|
|
3340
3339
|
// src/mantine/blocks/list/components/SelectionPanelContent.tsx
|
|
3341
3340
|
import React43 from "react";
|
|
3342
|
-
import { Stack as Stack25, Text as Text24, Title as Title2, Divider as Divider2,
|
|
3343
|
-
import { useHover } from "@mantine/hooks";
|
|
3344
|
-
import {
|
|
3345
|
-
var
|
|
3346
|
-
|
|
3347
|
-
};
|
|
3348
|
-
var SelectionPromptItem = ({ prompt, onClick }) => {
|
|
3349
|
-
return /* @__PURE__ */ React43.createElement(React43.Fragment, null, /* @__PURE__ */ React43.createElement(Flex18, { style: { cursor: "pointer" }, onClick: () => onClick(), gap: 10 }, /* @__PURE__ */ React43.createElement(IconArrowRight, { size: 24, color: "white" }), /* @__PURE__ */ React43.createElement(Text24, null, shortStr(prompt.text, 50, 0))), /* @__PURE__ */ React43.createElement(Divider2, { c: "dimmed", h: 1 }));
|
|
3350
|
-
};
|
|
3351
|
-
var SelectionPrompts = ({ prompts }) => {
|
|
3352
|
-
const handlers = useBlocknoteHandlers();
|
|
3353
|
-
if (!prompts || prompts.length === 0) return null;
|
|
3354
|
-
return /* @__PURE__ */ React43.createElement(Stack25, { gap: "xs" }, prompts.map((prompt, index) => /* @__PURE__ */ React43.createElement(SelectionPromptItem, { onClick: () => handlers.askCompanion(prompt.text), key: index, prompt })));
|
|
3355
|
-
};
|
|
3356
|
-
var SelectionActionButton = ({ action, itemId, itemData }) => {
|
|
3357
|
-
const { hovered, ref } = useHover();
|
|
3358
|
-
const handleClick = () => {
|
|
3359
|
-
action.onClick(itemId, itemData);
|
|
3360
|
-
};
|
|
3341
|
+
import { Stack as Stack25, Text as Text24, Title as Title2, Divider as Divider2, Paper as Paper3, Group as Group7 } from "@mantine/core";
|
|
3342
|
+
import { useHover as useHover2 } from "@mantine/hooks";
|
|
3343
|
+
import { IconCornerDownRight, IconTarget } from "@tabler/icons-react";
|
|
3344
|
+
var SelectionItemButton = ({ isLast, onClick, children }) => {
|
|
3345
|
+
const { hovered, ref } = useHover2();
|
|
3361
3346
|
return /* @__PURE__ */ React43.createElement(
|
|
3362
3347
|
Paper3,
|
|
3363
3348
|
{
|
|
3364
3349
|
ref,
|
|
3365
|
-
|
|
3350
|
+
py: "sm",
|
|
3366
3351
|
style: {
|
|
3367
3352
|
cursor: "pointer",
|
|
3353
|
+
borderRadius: 0,
|
|
3368
3354
|
transition: "all 0.2s ease",
|
|
3369
|
-
backgroundColor: hovered ? "var(--mantine-color-dark-5)" : "
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
boxShadow: hovered ? "0 4px 12px rgba(0, 0, 0, 0.15)" : "none"
|
|
3355
|
+
backgroundColor: hovered ? "var(--mantine-color-dark-5)" : "transparent",
|
|
3356
|
+
borderBottom: isLast ? "none" : `1px solid var(--mantine-color-dark-5)`,
|
|
3357
|
+
boxShadow: "none"
|
|
3373
3358
|
},
|
|
3374
|
-
onClick
|
|
3359
|
+
onClick
|
|
3375
3360
|
},
|
|
3376
|
-
|
|
3361
|
+
children
|
|
3377
3362
|
);
|
|
3378
3363
|
};
|
|
3364
|
+
var SelectionPromptItem = ({ prompt, onClick, isLast }) => {
|
|
3365
|
+
return /* @__PURE__ */ React43.createElement(SelectionItemButton, { isLast, onClick }, /* @__PURE__ */ React43.createElement(Group7, { px: "xs", gap: "sm" }, /* @__PURE__ */ React43.createElement(IconCornerDownRight, { size: 24, color: "var(--mantine-color-gray-3)" }), /* @__PURE__ */ React43.createElement(Text24, { fz: 14, fw: 500, c: "white" }, shortStr(prompt.text, 50, 0))));
|
|
3366
|
+
};
|
|
3367
|
+
var SelectionPrompts = ({ prompts }) => {
|
|
3368
|
+
const handlers = useBlocknoteHandlers();
|
|
3369
|
+
if (!prompts || prompts.length === 0) return null;
|
|
3370
|
+
return /* @__PURE__ */ React43.createElement(Stack25, { gap: 0 }, prompts.map((prompt, index) => /* @__PURE__ */ React43.createElement(SelectionPromptItem, { onClick: () => handlers.askCompanion(prompt.text), key: index, prompt, isLast: index === prompts.length - 1 })));
|
|
3371
|
+
};
|
|
3372
|
+
var SelectionActionButton = ({ action, itemId, itemData, isLast }) => {
|
|
3373
|
+
const handleClick = () => {
|
|
3374
|
+
action.onClick(itemId, itemData);
|
|
3375
|
+
};
|
|
3376
|
+
return /* @__PURE__ */ React43.createElement(SelectionItemButton, { isLast, onClick: handleClick }, /* @__PURE__ */ React43.createElement(Group7, { px: "xs", gap: "sm" }, /* @__PURE__ */ React43.createElement(IconTarget, { size: 20, color: "var(--mantine-color-gray-3)" }), /* @__PURE__ */ React43.createElement(Text24, { fz: 14, fw: 500, c: "white" }, action.label)));
|
|
3377
|
+
};
|
|
3379
3378
|
var SelectionActionSectionComponent = ({ section, itemId, itemData }) => {
|
|
3380
3379
|
if (!section.actions || section.actions.length === 0) return null;
|
|
3381
|
-
return /* @__PURE__ */ React43.createElement(Stack25, { gap: "xs" }, /* @__PURE__ */ React43.createElement(Text24, { fw: 500 }, section.title), section.description && /* @__PURE__ */ React43.createElement(Text24, { size: "sm", c: "dimmed" }, section.description), /* @__PURE__ */ React43.createElement(Stack25, { gap:
|
|
3380
|
+
return /* @__PURE__ */ React43.createElement(Stack25, { mb: 18, gap: "xs" }, /* @__PURE__ */ React43.createElement(Text24, { fz: 20, fw: 500 }, section.title), section.description && /* @__PURE__ */ React43.createElement(Text24, { size: "sm", c: "dimmed" }, section.description), /* @__PURE__ */ React43.createElement(Stack25, { gap: 0 }, section.actions.map((action, index) => /* @__PURE__ */ React43.createElement(SelectionActionButton, { key: action.id, action, itemId, itemData, isLast: index === section.actions.length - 1 }))));
|
|
3382
3381
|
};
|
|
3383
3382
|
var SelectionActionSections = ({ sections, itemId, itemData }) => {
|
|
3384
3383
|
if (!sections || sections.length === 0) return null;
|
|
@@ -3463,58 +3462,22 @@ var ListSelectionPanel = ({ selectedIds, listData, listType, onClose }) => {
|
|
|
3463
3462
|
);
|
|
3464
3463
|
}
|
|
3465
3464
|
if (!selectedItemId) {
|
|
3466
|
-
return /* @__PURE__ */ React44.createElement(
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
display: "flex",
|
|
3474
|
-
flexDirection: "column",
|
|
3475
|
-
position: "relative"
|
|
3476
|
-
}
|
|
3477
|
-
},
|
|
3478
|
-
/* @__PURE__ */ React44.createElement(
|
|
3479
|
-
CloseButton2,
|
|
3480
|
-
{
|
|
3481
|
-
onClick: handleClose,
|
|
3482
|
-
style: {
|
|
3483
|
-
position: "absolute",
|
|
3484
|
-
top: "1rem",
|
|
3485
|
-
right: "1rem",
|
|
3486
|
-
zIndex: 1
|
|
3487
|
-
}
|
|
3488
|
-
}
|
|
3489
|
-
),
|
|
3490
|
-
/* @__PURE__ */ React44.createElement(SelectionPanelEmpty, { message: "No item selected" })
|
|
3491
|
-
);
|
|
3465
|
+
return /* @__PURE__ */ React44.createElement(BaseRightPanelLayout, { title: "List selection", onClose: handleClose }, /* @__PURE__ */ React44.createElement(SelectionPanelEmpty, { message: "No item selected" }));
|
|
3466
|
+
}
|
|
3467
|
+
if (loading || !itemData) {
|
|
3468
|
+
return /* @__PURE__ */ React44.createElement(BaseRightPanelLayout, { onClose: handleClose, title: "Loading..." }, /* @__PURE__ */ React44.createElement(Center3, { h: 200 }, /* @__PURE__ */ React44.createElement(Loader, null)));
|
|
3469
|
+
}
|
|
3470
|
+
if (error) {
|
|
3471
|
+
return /* @__PURE__ */ React44.createElement(BaseRightPanelLayout, { onClose: handleClose, title: "Error" }, /* @__PURE__ */ React44.createElement(Alert3, { color: "red", title: "Error" }, /* @__PURE__ */ React44.createElement(Text25, { size: "sm" }, error)));
|
|
3492
3472
|
}
|
|
3493
3473
|
return /* @__PURE__ */ React44.createElement(
|
|
3494
|
-
|
|
3474
|
+
BaseRightPanelLayout,
|
|
3495
3475
|
{
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
height: "100%",
|
|
3500
|
-
display: "flex",
|
|
3501
|
-
flexDirection: "column",
|
|
3502
|
-
position: "relative"
|
|
3503
|
-
}
|
|
3476
|
+
onClose: handleClose,
|
|
3477
|
+
title: panelConfig.title(itemData),
|
|
3478
|
+
captionContent: /* @__PURE__ */ React44.createElement(Text25, { pb: "md", px: "40px" }, panelConfig.description(itemData))
|
|
3504
3479
|
},
|
|
3505
|
-
/* @__PURE__ */ React44.createElement(
|
|
3506
|
-
CloseButton2,
|
|
3507
|
-
{
|
|
3508
|
-
onClick: handleClose,
|
|
3509
|
-
style: {
|
|
3510
|
-
position: "absolute",
|
|
3511
|
-
top: "1rem",
|
|
3512
|
-
right: "1rem",
|
|
3513
|
-
zIndex: 1
|
|
3514
|
-
}
|
|
3515
|
-
}
|
|
3516
|
-
),
|
|
3517
|
-
loading ? /* @__PURE__ */ React44.createElement(Center3, { h: 200 }, /* @__PURE__ */ React44.createElement(Loader, null)) : error ? /* @__PURE__ */ React44.createElement(Alert3, { color: "red", title: "Error" }, /* @__PURE__ */ React44.createElement(Text25, { size: "sm" }, error)) : itemData ? /* @__PURE__ */ React44.createElement(Stack26, { gap: "md", style: { flex: 1 } }, /* @__PURE__ */ React44.createElement(SelectionPanelHeader, { title: panelConfig.title(itemData), description: panelConfig.description(itemData) }), panelConfig?.image && /* @__PURE__ */ React44.createElement(
|
|
3480
|
+
/* @__PURE__ */ React44.createElement(Stack26, { gap: "md", style: { flex: 1 } }, panelConfig?.image && /* @__PURE__ */ React44.createElement(
|
|
3518
3481
|
"img",
|
|
3519
3482
|
{
|
|
3520
3483
|
src: panelConfig?.image(itemData),
|
|
@@ -3526,36 +3489,36 @@ var ListSelectionPanel = ({ selectedIds, listData, listType, onClose }) => {
|
|
|
3526
3489
|
objectFit: "cover"
|
|
3527
3490
|
}
|
|
3528
3491
|
}
|
|
3529
|
-
), /* @__PURE__ */ React44.createElement(SelectionPrompts, { prompts: panelConfig.prompts(itemData) }), /* @__PURE__ */ React44.createElement(
|
|
3492
|
+
), /* @__PURE__ */ React44.createElement(SelectionPrompts, { prompts: panelConfig.prompts(itemData) }), /* @__PURE__ */ React44.createElement(Space, { h: 12 }), /* @__PURE__ */ React44.createElement(SelectionActionSections, { sections: panelConfig.actionSections(itemData), itemId: selectedItemId, itemData }))
|
|
3530
3493
|
);
|
|
3531
3494
|
};
|
|
3532
3495
|
|
|
3533
3496
|
// src/mantine/blocks/list/projects/ProjectsList.tsx
|
|
3534
3497
|
import React45 from "react";
|
|
3535
|
-
import { Text as Text26, Box as
|
|
3498
|
+
import { Text as Text26, Box as Box19, Image as Image12, Stack as Stack27, Flex as Flex18 } from "@mantine/core";
|
|
3536
3499
|
var ProjectsList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
3537
3500
|
if (!items || items.length === 0) {
|
|
3538
3501
|
return /* @__PURE__ */ React45.createElement(Text26, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No Projects found");
|
|
3539
3502
|
}
|
|
3540
3503
|
const rows = items.map((item) => {
|
|
3541
3504
|
const isChecked = isItemChecked?.(item.did);
|
|
3542
|
-
return /* @__PURE__ */ React45.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.did, !isChecked), key: item.did, isChecked: !!isChecked }, /* @__PURE__ */ React45.createElement(
|
|
3505
|
+
return /* @__PURE__ */ React45.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.did, !isChecked), key: item.did, isChecked: !!isChecked }, /* @__PURE__ */ React45.createElement(Flex18, { align: "center", gap: "sm" }, /* @__PURE__ */ React45.createElement(Image12, { radius: 16, w: 32, h: 32, src: item.icon }), /* @__PURE__ */ React45.createElement(Stack27, { gap: 0 }, /* @__PURE__ */ React45.createElement(Text26, { size: "sm" }, item.name || "-"), /* @__PURE__ */ React45.createElement(Text26, { size: "sm", c: "dimmed" }, shortStr(item.description, 50, 0) || "-"))), /* @__PURE__ */ React45.createElement(Flex18, { align: "center", gap: "md" }, isMultiSelect && /* @__PURE__ */ React45.createElement(ListItemCheckbox, { ariaLabel: `Select project ${item.did}`, checked: isItemChecked?.(item.did), onCheck: (checked) => onItemCheck?.(item.did, checked) })));
|
|
3543
3506
|
});
|
|
3544
|
-
return /* @__PURE__ */ React45.createElement(
|
|
3507
|
+
return /* @__PURE__ */ React45.createElement(Box19, { flex: 1 }, /* @__PURE__ */ React45.createElement(Stack27, null, rows));
|
|
3545
3508
|
};
|
|
3546
3509
|
|
|
3547
3510
|
// src/mantine/blocks/list/daos/DaosList.tsx
|
|
3548
3511
|
import React46 from "react";
|
|
3549
|
-
import { Text as Text27, Box as
|
|
3512
|
+
import { Text as Text27, Box as Box20, Image as Image13, Stack as Stack28, Flex as Flex19 } from "@mantine/core";
|
|
3550
3513
|
var DaosList = ({ items, isMultiSelect, isItemChecked, onItemCheck }) => {
|
|
3551
3514
|
if (!items || items.length === 0) {
|
|
3552
3515
|
return /* @__PURE__ */ React46.createElement(Text27, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No Daos found");
|
|
3553
3516
|
}
|
|
3554
3517
|
const rows = items.map((item) => {
|
|
3555
3518
|
const isChecked = isItemChecked?.(item.did);
|
|
3556
|
-
return /* @__PURE__ */ React46.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.did, !isChecked), key: item.did, isChecked: !!isChecked }, /* @__PURE__ */ React46.createElement(
|
|
3519
|
+
return /* @__PURE__ */ React46.createElement(ListItemContainer, { onClick: () => onItemCheck?.(item.did, !isChecked), key: item.did, isChecked: !!isChecked }, /* @__PURE__ */ React46.createElement(Flex19, { align: "center", gap: "sm" }, /* @__PURE__ */ React46.createElement(Image13, { radius: 16, w: 32, h: 32, src: item.icon }), /* @__PURE__ */ React46.createElement(Stack28, { gap: 0 }, /* @__PURE__ */ React46.createElement(Text27, { size: "sm" }, item.name || "-"), /* @__PURE__ */ React46.createElement(Text27, { size: "sm", c: "dimmed" }, shortStr(item.description, 50, 0) || "-"))), /* @__PURE__ */ React46.createElement(Flex19, { align: "center", gap: "md" }, isMultiSelect && /* @__PURE__ */ React46.createElement(ListItemCheckbox, { ariaLabel: `Select DAO ${item.did}`, checked: isItemChecked?.(item.did), onCheck: (checked) => onItemCheck?.(item.did, checked) })));
|
|
3557
3520
|
});
|
|
3558
|
-
return /* @__PURE__ */ React46.createElement(
|
|
3521
|
+
return /* @__PURE__ */ React46.createElement(Box20, { flex: 1 }, /* @__PURE__ */ React46.createElement(Stack28, null, rows));
|
|
3559
3522
|
};
|
|
3560
3523
|
|
|
3561
3524
|
// src/core/utils/files.ts
|
|
@@ -4062,10 +4025,10 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
4062
4025
|
if (!listType) {
|
|
4063
4026
|
return /* @__PURE__ */ React48.createElement(Center4, { py: "xl" }, /* @__PURE__ */ React48.createElement(Text29, { size: "sm", c: "dimmed" }, "List not configured"));
|
|
4064
4027
|
}
|
|
4065
|
-
return /* @__PURE__ */ React48.createElement(Stack30, { w: "100%" }, /* @__PURE__ */ React48.createElement(
|
|
4028
|
+
return /* @__PURE__ */ React48.createElement(Stack30, { w: "100%" }, /* @__PURE__ */ React48.createElement(Flex20, { px: 5, align: "center", justify: "space-between" }, /* @__PURE__ */ React48.createElement(Title3, { order: 4 }, getListNameByType(listType)), /* @__PURE__ */ React48.createElement(Tooltip5, { label: opened ? "Collapse" : "Expand", withArrow: true }, /* @__PURE__ */ React48.createElement(ActionIcon2, { variant: "subtle", size: "sm", onClick: toggle, "aria-label": opened ? "Collapse" : "Expand" }, opened ? /* @__PURE__ */ React48.createElement(IconChevronUp, { size: 18 }) : /* @__PURE__ */ React48.createElement(IconChevronDown2, { size: 18 })))), /* @__PURE__ */ React48.createElement(Collapse2, { pb: 5, px: 5, in: opened }, /* @__PURE__ */ React48.createElement(Stack30, { mih: totalPages !== 1 ? 500 : void 0, w: "100%" }, /* @__PURE__ */ React48.createElement(Flex20, { align: "center", gap: "xs" }, listSortConfig?.key && /* @__PURE__ */ React48.createElement(Flex20, { align: "center" }, /* @__PURE__ */ React48.createElement(Text29, { size: "xs" }, listSortConfig.key?.replace(/([A-Z])/g, " $1").replace(
|
|
4066
4029
|
/^./,
|
|
4067
4030
|
(str) => str.toUpperCase()
|
|
4068
|
-
), " "), /* @__PURE__ */ React48.createElement(Text29, { lh: 0.5 }, listSortConfig.direction === "asc" && /* @__PURE__ */ React48.createElement(IconArrowUp2, { size: 18 }), listSortConfig.direction === "desc" && /* @__PURE__ */ React48.createElement(IconArrowDown2, { size: 18 }))), isMultiSelect && /* @__PURE__ */ React48.createElement(Text29, { lh: 0.5 }, "Multi Selection")), /* @__PURE__ */ React48.createElement(
|
|
4031
|
+
), " "), /* @__PURE__ */ React48.createElement(Text29, { lh: 0.5 }, listSortConfig.direction === "asc" && /* @__PURE__ */ React48.createElement(IconArrowUp2, { size: 18 }), listSortConfig.direction === "desc" && /* @__PURE__ */ React48.createElement(IconArrowDown2, { size: 18 }))), isMultiSelect && /* @__PURE__ */ React48.createElement(Text29, { lh: 0.5 }, "Multi Selection")), /* @__PURE__ */ React48.createElement(Flex20, { justify: "space-between" }, /* @__PURE__ */ React48.createElement(Flex20, { gap: "xs", align: "center" }, /* @__PURE__ */ React48.createElement(FilterTab, { key: "All", label: "All", isActive: !listFilterConfig?.key, onClick: () => handleFilterChange(null) }), Array.isArray(listFilterConfigOptions) && listFilterConfigOptions.length > 0 && listFilterConfigOptions.map(({ key, label, type }) => /* @__PURE__ */ React48.createElement(
|
|
4069
4032
|
FilterTab,
|
|
4070
4033
|
{
|
|
4071
4034
|
key: label,
|
|
@@ -4073,7 +4036,7 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
4073
4036
|
isActive: listFilterConfig?.key === key && listFilterConfig?.value === type,
|
|
4074
4037
|
onClick: () => handleFilterChange({ key, value: type })
|
|
4075
4038
|
}
|
|
4076
|
-
))), /* @__PURE__ */ React48.createElement(
|
|
4039
|
+
))), /* @__PURE__ */ React48.createElement(Flex20, { gap: "xs" }, /* @__PURE__ */ React48.createElement(Tooltip5, { label: "Refresh", withArrow: true }, /* @__PURE__ */ React48.createElement(ActionIcon2, { variant: "subtle", size: "sm", onClick: fetchData, loading }, /* @__PURE__ */ React48.createElement(IconRefresh, { size: 18 }))), editable && /* @__PURE__ */ React48.createElement(Tooltip5, { label: "Settings", withArrow: true }, /* @__PURE__ */ React48.createElement(ActionIcon2, { variant: "subtle", size: "sm", onClick: openPanel }, /* @__PURE__ */ React48.createElement(IconSettings2, { size: 18 }))), listConfig && listSortConfigOptions && listSortConfigOptions?.length > 0 && /* @__PURE__ */ React48.createElement(
|
|
4077
4040
|
ListActionsMenu,
|
|
4078
4041
|
{
|
|
4079
4042
|
isMultiSelect,
|
|
@@ -4083,7 +4046,7 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
4083
4046
|
onChange: (sortOption) => handleSortChange(sortOption),
|
|
4084
4047
|
onDownloadCsv: data?.items ? () => downloadArrayAsCsv(data.items) : void 0
|
|
4085
4048
|
}
|
|
4086
|
-
))), /* @__PURE__ */ React48.createElement(
|
|
4049
|
+
))), /* @__PURE__ */ React48.createElement(Flex20, { flex: 1 }, loading ? /* @__PURE__ */ React48.createElement(Center4, { py: "xl", w: "100%" }, /* @__PURE__ */ React48.createElement(Loader2, { size: "md", mx: "auto" })) : error ? /* @__PURE__ */ React48.createElement(BaseAlert, { onRetry: fetchData, errMsg: error }) : /* @__PURE__ */ React48.createElement(Stack30, { flex: 1 }, /* @__PURE__ */ React48.createElement(Stack30, { gap: "md" }, renderListComponent(), /* @__PURE__ */ React48.createElement(
|
|
4087
4050
|
ListPagination,
|
|
4088
4051
|
{
|
|
4089
4052
|
page,
|
|
@@ -4146,7 +4109,7 @@ var ListBlockSpec = createReactBlockSpec2(
|
|
|
4146
4109
|
// src/mantine/blocks/overview/OverviewBlock.tsx
|
|
4147
4110
|
import React51, { useEffect as useEffect8, useState as useState11 } from "react";
|
|
4148
4111
|
import { createReactBlockSpec as createReactBlockSpec3 } from "@blocknote/react";
|
|
4149
|
-
import { Stack as Stack31, Text as Text30, Box as
|
|
4112
|
+
import { Stack as Stack31, Text as Text30, Box as Box21, Loader as Loader3, Alert as Alert4, Group as Group8, Accordion as Accordion2, Collapse as Collapse3 } from "@mantine/core";
|
|
4150
4113
|
import { IconChevronRight as IconChevronRight2, IconChevronDown as IconChevronDown3, IconFileDescription, IconWorld, IconCalendar, IconUser, IconCircleCheck } from "@tabler/icons-react";
|
|
4151
4114
|
import { useDisclosure as useDisclosure2 } from "@mantine/hooks";
|
|
4152
4115
|
var OverviewBlockContent = () => {
|
|
@@ -4173,7 +4136,7 @@ var OverviewBlockContent = () => {
|
|
|
4173
4136
|
}, [handlers]);
|
|
4174
4137
|
if (loading) {
|
|
4175
4138
|
return /* @__PURE__ */ React51.createElement(
|
|
4176
|
-
|
|
4139
|
+
Box21,
|
|
4177
4140
|
{
|
|
4178
4141
|
style: {
|
|
4179
4142
|
width: "100%",
|
|
@@ -4205,7 +4168,7 @@ var OverviewBlockContent = () => {
|
|
|
4205
4168
|
}
|
|
4206
4169
|
));
|
|
4207
4170
|
return /* @__PURE__ */ React51.createElement(
|
|
4208
|
-
|
|
4171
|
+
Box21,
|
|
4209
4172
|
{
|
|
4210
4173
|
style: {
|
|
4211
4174
|
width: "100%",
|
|
@@ -4227,7 +4190,7 @@ var OverviewBlockContent = () => {
|
|
|
4227
4190
|
},
|
|
4228
4191
|
domainCard.name
|
|
4229
4192
|
), /* @__PURE__ */ React51.createElement(
|
|
4230
|
-
|
|
4193
|
+
Box21,
|
|
4231
4194
|
{
|
|
4232
4195
|
style: {
|
|
4233
4196
|
background: "#333",
|
|
@@ -4236,7 +4199,7 @@ var OverviewBlockContent = () => {
|
|
|
4236
4199
|
}
|
|
4237
4200
|
},
|
|
4238
4201
|
/* @__PURE__ */ React51.createElement(
|
|
4239
|
-
|
|
4202
|
+
Box21,
|
|
4240
4203
|
{
|
|
4241
4204
|
style: {
|
|
4242
4205
|
padding: "12px",
|
|
@@ -4247,7 +4210,7 @@ var OverviewBlockContent = () => {
|
|
|
4247
4210
|
/* @__PURE__ */ React51.createElement(Group8, { gap: "xs" }, detailsOpened ? /* @__PURE__ */ React51.createElement(IconChevronDown3, { size: 20, color: "#ffffff" }) : /* @__PURE__ */ React51.createElement(IconChevronRight2, { size: 20, color: "#ffffff" }), /* @__PURE__ */ React51.createElement(Text30, { size: "sm", fw: 500, c: "#ffffff" }, "Details"))
|
|
4248
4211
|
),
|
|
4249
4212
|
/* @__PURE__ */ React51.createElement(Collapse3, { in: detailsOpened }, /* @__PURE__ */ React51.createElement(
|
|
4250
|
-
|
|
4213
|
+
Box21,
|
|
4251
4214
|
{
|
|
4252
4215
|
style: {
|
|
4253
4216
|
padding: "0 16px 16px 16px"
|
|
@@ -4255,7 +4218,7 @@ var OverviewBlockContent = () => {
|
|
|
4255
4218
|
},
|
|
4256
4219
|
/* @__PURE__ */ React51.createElement(Stack31, { gap: "xs" }, domainCard.entity_type && domainCard.entity_type.length > 0 && /* @__PURE__ */ React51.createElement(Group8, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React51.createElement(IconFileDescription, { size: 20, color: "#adb5bd", style: { flexShrink: 0 } }), /* @__PURE__ */ React51.createElement(Text30, { size: "sm", c: "dimmed", style: { width: "140px", flexShrink: 0 } }, "Type"), /* @__PURE__ */ React51.createElement(Text30, { size: "sm", style: { color: "#ffffff" } }, domainCard.entity_type[0].replace("ixo:", ""))), domainCard.valid_from && /* @__PURE__ */ React51.createElement(Group8, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React51.createElement(IconCalendar, { size: 20, color: "#adb5bd", style: { flexShrink: 0 } }), /* @__PURE__ */ React51.createElement(Text30, { size: "sm", c: "dimmed", style: { width: "140px", flexShrink: 0 } }, "Created"), /* @__PURE__ */ React51.createElement(Text30, { size: "sm", style: { color: "#ffffff" } }, new Date(domainCard.valid_from).toLocaleDateString("en-GB", { day: "numeric", month: "short", year: "numeric" }))), /* @__PURE__ */ React51.createElement(Group8, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React51.createElement(IconCircleCheck, { size: 20, color: "#adb5bd", style: { flexShrink: 0 } }), /* @__PURE__ */ React51.createElement(Text30, { size: "sm", c: "dimmed", style: { width: "140px", flexShrink: 0 } }, "Status"), /* @__PURE__ */ React51.createElement(Text30, { size: "sm", style: { color: "#ffffff" } }, "Active")), domainCard.area_served && /* @__PURE__ */ React51.createElement(Group8, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React51.createElement(IconWorld, { size: 20, color: "#adb5bd", style: { flexShrink: 0 } }), /* @__PURE__ */ React51.createElement(Text30, { size: "sm", c: "dimmed", style: { width: "140px", flexShrink: 0 } }, "Country"), /* @__PURE__ */ React51.createElement(Text30, { size: "sm", style: { color: "#ffffff" } }, domainCard.area_served)), domainCard.issuer && /* @__PURE__ */ React51.createElement(Group8, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React51.createElement(IconUser, { size: 20, color: "#adb5bd", style: { flexShrink: 0 } }), /* @__PURE__ */ React51.createElement(Text30, { size: "sm", c: "dimmed", style: { width: "140px", flexShrink: 0 } }, "Issuer"), /* @__PURE__ */ React51.createElement(Text30, { size: "sm", style: { color: "#ffffff" } }, domainCard.issuer)))
|
|
4257
4220
|
))
|
|
4258
|
-
), /* @__PURE__ */ React51.createElement(
|
|
4221
|
+
), /* @__PURE__ */ React51.createElement(Box21, { style: { marginTop: "24px" } }, /* @__PURE__ */ React51.createElement(Text30, { size: "lg", fw: 600, style: { marginBottom: "12px" } }, "About the Project"), /* @__PURE__ */ React51.createElement(
|
|
4259
4222
|
Text30,
|
|
4260
4223
|
{
|
|
4261
4224
|
size: "sm",
|
|
@@ -4265,7 +4228,7 @@ var OverviewBlockContent = () => {
|
|
|
4265
4228
|
}
|
|
4266
4229
|
},
|
|
4267
4230
|
domainCard.summary || domainCard.overview || domainCard.description || "No summary available"
|
|
4268
|
-
)), /* @__PURE__ */ React51.createElement(
|
|
4231
|
+
)), /* @__PURE__ */ React51.createElement(Box21, { style: { marginTop: "16px" } }, /* @__PURE__ */ React51.createElement(Text30, { size: "lg", fw: 600, style: { marginBottom: "12px" } }, "What are the next steps"), /* @__PURE__ */ React51.createElement(
|
|
4269
4232
|
Text30,
|
|
4270
4233
|
{
|
|
4271
4234
|
size: "sm",
|
|
@@ -4275,7 +4238,7 @@ var OverviewBlockContent = () => {
|
|
|
4275
4238
|
}
|
|
4276
4239
|
},
|
|
4277
4240
|
domainCard.description
|
|
4278
|
-
)), domainCard.faq && domainCard.faq.length > 0 && /* @__PURE__ */ React51.createElement(
|
|
4241
|
+
)), domainCard.faq && domainCard.faq.length > 0 && /* @__PURE__ */ React51.createElement(Box21, { style: { width: "95%", margin: "auto" } }, /* @__PURE__ */ React51.createElement(Accordion2, null, domainCard.faq.map((faqItem, index) => /* @__PURE__ */ React51.createElement(Accordion2.Item, { key: index, value: `faq-${index}` }, /* @__PURE__ */ React51.createElement(Accordion2.Control, { icon: /* @__PURE__ */ React51.createElement(ChatIcon, null) }, faqItem.question), /* @__PURE__ */ React51.createElement(Accordion2.Panel, null, faqItem.answer))))))
|
|
4279
4242
|
);
|
|
4280
4243
|
};
|
|
4281
4244
|
var OverviewBlock = createReactBlockSpec3(
|
|
@@ -7040,7 +7003,7 @@ var useVoteBusinessLogic = ({ block }) => {
|
|
|
7040
7003
|
|
|
7041
7004
|
// src/mantine/blocks/proposal/flow/VoteGeneralTab.tsx
|
|
7042
7005
|
import React91, { useState as useState23 } from "react";
|
|
7043
|
-
import { Stack as Stack70, Text as Text43, Group as Group23, Card as Card12, Button as Button12, Progress as Progress2, Box as
|
|
7006
|
+
import { Stack as Stack70, Text as Text43, Group as Group23, Card as Card12, Button as Button12, Progress as Progress2, Box as Box22, Tooltip as Tooltip6 } from "@mantine/core";
|
|
7044
7007
|
var getVoteIcon = (voteType) => {
|
|
7045
7008
|
switch (voteType) {
|
|
7046
7009
|
case "yes":
|
|
@@ -7094,7 +7057,7 @@ var FlowGeneralTab = ({
|
|
|
7094
7057
|
}
|
|
7095
7058
|
},
|
|
7096
7059
|
/* @__PURE__ */ React91.createElement(Group23, { gap: "xs", align: "center" }, /* @__PURE__ */ React91.createElement(
|
|
7097
|
-
|
|
7060
|
+
Box22,
|
|
7098
7061
|
{
|
|
7099
7062
|
style: {
|
|
7100
7063
|
width: 8,
|
|
@@ -7118,7 +7081,7 @@ var FlowGeneralTab = ({
|
|
|
7118
7081
|
}
|
|
7119
7082
|
},
|
|
7120
7083
|
/* @__PURE__ */ React91.createElement(Stack70, { gap: "xs" }, /* @__PURE__ */ React91.createElement(Group23, { justify: "space-between" }, /* @__PURE__ */ React91.createElement(Group23, { gap: "xs" }, /* @__PURE__ */ React91.createElement(
|
|
7121
|
-
|
|
7084
|
+
Box22,
|
|
7122
7085
|
{
|
|
7123
7086
|
w: 8,
|
|
7124
7087
|
h: 8,
|
|
@@ -7127,7 +7090,7 @@ var FlowGeneralTab = ({
|
|
|
7127
7090
|
borderRadius: "50%"
|
|
7128
7091
|
}
|
|
7129
7092
|
}
|
|
7130
|
-
), /* @__PURE__ */ React91.createElement(Text43, { size: "sm", style: { color: "#adb5bd" } }, "Status")), /* @__PURE__ */ React91.createElement(Text43, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, hasSubmittedProposal ? proposalStatus === "open" ? "Active" : proposalStatus || "Active" : "Waiting")), /* @__PURE__ */ React91.createElement(Group23, { justify: "space-between" }, /* @__PURE__ */ React91.createElement(Group23, { gap: "xs" }, /* @__PURE__ */ React91.createElement(
|
|
7093
|
+
), /* @__PURE__ */ React91.createElement(Text43, { size: "sm", style: { color: "#adb5bd" } }, "Status")), /* @__PURE__ */ React91.createElement(Text43, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, hasSubmittedProposal ? proposalStatus === "open" ? "Active" : proposalStatus || "Active" : "Waiting")), /* @__PURE__ */ React91.createElement(Group23, { justify: "space-between" }, /* @__PURE__ */ React91.createElement(Group23, { gap: "xs" }, /* @__PURE__ */ React91.createElement(Box22, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React91.createElement(Text43, { size: "sm", style: { color: "#adb5bd" } }, "Proposal ID")), /* @__PURE__ */ React91.createElement(Text43, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, hasSubmittedProposal ? `#${proposalId}` : "TBD")), /* @__PURE__ */ React91.createElement(Group23, { justify: "space-between" }, /* @__PURE__ */ React91.createElement(Group23, { gap: "xs" }, /* @__PURE__ */ React91.createElement(Box22, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React91.createElement(Text43, { size: "sm", style: { color: "#adb5bd" } }, "Title")), /* @__PURE__ */ React91.createElement(
|
|
7131
7094
|
Text43,
|
|
7132
7095
|
{
|
|
7133
7096
|
size: "sm",
|
|
@@ -7137,7 +7100,7 @@ var FlowGeneralTab = ({
|
|
|
7137
7100
|
}
|
|
7138
7101
|
},
|
|
7139
7102
|
hasSubmittedProposal ? proposalTitle || "Untitled" : "N/A"
|
|
7140
|
-
)), /* @__PURE__ */ React91.createElement(Group23, { justify: "space-between" }, /* @__PURE__ */ React91.createElement(Group23, { gap: "xs" }, /* @__PURE__ */ React91.createElement(
|
|
7103
|
+
)), /* @__PURE__ */ React91.createElement(Group23, { justify: "space-between" }, /* @__PURE__ */ React91.createElement(Group23, { gap: "xs" }, /* @__PURE__ */ React91.createElement(Box22, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React91.createElement(Text43, { size: "sm", style: { color: "#adb5bd" } }, "Description")), /* @__PURE__ */ React91.createElement(Text43, { size: "sm", fw: 500, style: { color: "#f1f3f5" }, title: proposalDescription }, hasSubmittedProposal ? proposalDescription ? proposalDescription.length > 30 ? proposalDescription.substring(0, 30) + "..." : proposalDescription : "No description" : "N/A")), /* @__PURE__ */ React91.createElement(Group23, { justify: "space-between" }, /* @__PURE__ */ React91.createElement(Group23, { gap: "xs" }, /* @__PURE__ */ React91.createElement(Box22, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React91.createElement(Text43, { size: "sm", style: { color: "#adb5bd" } }, "My Vote")), /* @__PURE__ */ React91.createElement(Text43, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, hasSubmittedProposal ? userVote?.vote ? userVote.vote.vote : "Pending" : "N/A"))),
|
|
7141
7104
|
/* @__PURE__ */ React91.createElement(Stack70, { gap: "xs" }, /* @__PURE__ */ React91.createElement(Text43, { size: "sm", style: { color: "#adb5bd" } }, hasSubmittedProposal ? "Voting is open" : "Voting pending"), /* @__PURE__ */ React91.createElement(
|
|
7142
7105
|
Progress2,
|
|
7143
7106
|
{
|
|
@@ -7163,7 +7126,7 @@ var FlowGeneralTab = ({
|
|
|
7163
7126
|
}
|
|
7164
7127
|
},
|
|
7165
7128
|
/* @__PURE__ */ React91.createElement(Group23, { gap: "xs", align: "center" }, /* @__PURE__ */ React91.createElement(
|
|
7166
|
-
|
|
7129
|
+
Box22,
|
|
7167
7130
|
{
|
|
7168
7131
|
style: {
|
|
7169
7132
|
width: 8,
|
|
@@ -7260,7 +7223,7 @@ var FlowGeneralTab = ({
|
|
|
7260
7223
|
}
|
|
7261
7224
|
},
|
|
7262
7225
|
/* @__PURE__ */ React91.createElement(Stack70, { gap: "xs" }, /* @__PURE__ */ React91.createElement(Group23, { gap: "xs", align: "center" }, /* @__PURE__ */ React91.createElement(
|
|
7263
|
-
|
|
7226
|
+
Box22,
|
|
7264
7227
|
{
|
|
7265
7228
|
style: {
|
|
7266
7229
|
width: 8,
|
|
@@ -8263,7 +8226,7 @@ import { IconVariable, IconX as IconX4 } from "@tabler/icons-react";
|
|
|
8263
8226
|
|
|
8264
8227
|
// src/mantine/components/DataInput/BlockPropSelector.tsx
|
|
8265
8228
|
import React100, { useState as useState29, useMemo as useMemo14 } from "react";
|
|
8266
|
-
import { Popover, Text as Text49, Stack as Stack76, Group as Group26, ActionIcon as ActionIcon7, Input, ScrollArea as ScrollArea4, Badge as Badge11, Box as
|
|
8229
|
+
import { Popover, Text as Text49, Stack as Stack76, Group as Group26, ActionIcon as ActionIcon7, Input, ScrollArea as ScrollArea4, Badge as Badge11, Box as Box23, Tooltip as Tooltip7 } from "@mantine/core";
|
|
8267
8230
|
import { IconSearch as IconSearch3, IconX as IconX3, IconCircle, IconChevronRight as IconChevronRight3, IconArrowLeft as IconArrowLeft2 } from "@tabler/icons-react";
|
|
8268
8231
|
function buildPropertyTree(properties) {
|
|
8269
8232
|
const root = [];
|
|
@@ -8399,7 +8362,7 @@ function BlockPropSelector({ children, opened, onClose, onSelect, editorDocument
|
|
|
8399
8362
|
), /* @__PURE__ */ React100.createElement(ScrollArea4, { h: 300, type: "auto" }, !selectedBlock ? (
|
|
8400
8363
|
// Block selection view
|
|
8401
8364
|
filteredBlocks.length === 0 ? /* @__PURE__ */ React100.createElement(Text49, { c: "dimmed", ta: "center", py: "xl", size: "sm" }, availableBlocks.length === 0 ? "No blocks with referenceable properties found" : "No blocks match your search") : /* @__PURE__ */ React100.createElement(Stack76, { gap: "sm" }, filteredBlocks.map((block) => /* @__PURE__ */ React100.createElement(
|
|
8402
|
-
|
|
8365
|
+
Box23,
|
|
8403
8366
|
{
|
|
8404
8367
|
key: block.id,
|
|
8405
8368
|
onClick: () => handleBlockSelect(block),
|
|
@@ -8431,7 +8394,7 @@ function BlockPropSelector({ children, opened, onClose, onSelect, editorDocument
|
|
|
8431
8394
|
) : (
|
|
8432
8395
|
// Property navigation view
|
|
8433
8396
|
currentNodes.length === 0 ? /* @__PURE__ */ React100.createElement(Text49, { c: "dimmed", ta: "center", py: "xl", size: "sm" }, "No properties available") : /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, currentNodes.map((node, index) => /* @__PURE__ */ React100.createElement(Tooltip7, { key: index, label: node.isLeaf ? `Select ${node.displayName}` : `Navigate into ${node.displayName}`, position: "left", withArrow: true }, /* @__PURE__ */ React100.createElement(
|
|
8434
|
-
|
|
8397
|
+
Box23,
|
|
8435
8398
|
{
|
|
8436
8399
|
onClick: () => handleNodeClick(node),
|
|
8437
8400
|
style: {
|
|
@@ -9741,7 +9704,7 @@ import { createReactBlockSpec as createReactBlockSpec6 } from "@blocknote/react"
|
|
|
9741
9704
|
|
|
9742
9705
|
// src/mantine/blocks/dynamicList/DynamicListBlock.tsx
|
|
9743
9706
|
import React110, { useMemo as useMemo19, useState as useState34, useCallback as useCallback20, useEffect as useEffect20, useRef as useRef3 } from "react";
|
|
9744
|
-
import { Box as
|
|
9707
|
+
import { Box as Box25, Stack as Stack82, Text as Text55, Paper as Paper11, Group as Group33, Button as Button20, ActionIcon as ActionIcon12, Tooltip as Tooltip10, Code as Code4, Flex as Flex21, Collapse as Collapse6, Title as Title5, Badge as Badge15, TextInput as TextInput5, CloseButton as CloseButton4, Select as Select3, Menu as Menu2 } from "@mantine/core";
|
|
9745
9708
|
import { useDisclosure as useDisclosure3 } from "@mantine/hooks";
|
|
9746
9709
|
import {
|
|
9747
9710
|
IconCamera,
|
|
@@ -9762,7 +9725,7 @@ import {
|
|
|
9762
9725
|
|
|
9763
9726
|
// src/mantine/blocks/dynamicList/DynamicListSelectionPanel.tsx
|
|
9764
9727
|
import React109, { useMemo as useMemo18, useState as useState33 } from "react";
|
|
9765
|
-
import { Paper as Paper10, CloseButton as CloseButton3, Stack as Stack81, Text as Text54, Box as
|
|
9728
|
+
import { Paper as Paper10, CloseButton as CloseButton3, Stack as Stack81, Text as Text54, Box as Box24, Group as Group32, Divider as Divider8, Code as Code3, ScrollArea as ScrollArea5, Collapse as Collapse5 } from "@mantine/core";
|
|
9766
9729
|
import { IconSparkles, IconChevronDown as IconChevronDown5, IconChevronRight as IconChevronRight4 } from "@tabler/icons-react";
|
|
9767
9730
|
function formatKeyAsLabel(key) {
|
|
9768
9731
|
return key.replace(/([A-Z])/g, " $1").replace(/[_-]/g, " ").replace(/^\s/, "").split(" ").map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(" ");
|
|
@@ -9802,14 +9765,14 @@ function DefaultKeyValueView({
|
|
|
9802
9765
|
const titleColumn = columns.find((col) => col.position === "topLeft");
|
|
9803
9766
|
const title = titleColumn ? item[titleColumn.key] : Object.values(item)[0];
|
|
9804
9767
|
const itemKeys = Object.keys(item).filter((key) => !key.startsWith("_"));
|
|
9805
|
-
return /* @__PURE__ */ React109.createElement(Stack81, { gap: "md", style: { flex: 1 } }, /* @__PURE__ */ React109.createElement(
|
|
9768
|
+
return /* @__PURE__ */ React109.createElement(Stack81, { gap: "md", style: { flex: 1 } }, /* @__PURE__ */ React109.createElement(Box24, null, /* @__PURE__ */ React109.createElement(Text54, { size: "lg", fw: 600 }, formatValue(title)), titleColumn && /* @__PURE__ */ React109.createElement(Text54, { size: "xs", c: "dimmed" }, titleColumn.label)), panelDescription && /* @__PURE__ */ React109.createElement(React109.Fragment, null, /* @__PURE__ */ React109.createElement(Divider8, null), /* @__PURE__ */ React109.createElement(Text54, { size: "sm", c: "dimmed" }, panelDescription)), /* @__PURE__ */ React109.createElement(Divider8, null), /* @__PURE__ */ React109.createElement(Box24, null, /* @__PURE__ */ React109.createElement(Group32, { gap: "xs", style: { cursor: "pointer" }, onClick: () => setValuesExpanded(!valuesExpanded) }, valuesExpanded ? /* @__PURE__ */ React109.createElement(IconChevronDown5, { size: 16, color: "var(--mantine-color-blue-4)" }) : /* @__PURE__ */ React109.createElement(IconChevronRight4, { size: 16, color: "var(--mantine-color-blue-4)" }), /* @__PURE__ */ React109.createElement(Text54, { size: "sm", fw: 500 }, "Values"), /* @__PURE__ */ React109.createElement(Text54, { size: "xs", c: "dimmed" }, "(", itemKeys.length, " fields)")), /* @__PURE__ */ React109.createElement(Collapse5, { in: valuesExpanded }, /* @__PURE__ */ React109.createElement(ScrollArea5, { style: { maxHeight: 300 }, mt: "sm" }, /* @__PURE__ */ React109.createElement(Stack81, { gap: "sm" }, itemKeys.map((key) => {
|
|
9806
9769
|
const column = columnMap[key];
|
|
9807
9770
|
const label = column?.label || formatKeyAsLabel(key);
|
|
9808
9771
|
const value = item[key];
|
|
9809
9772
|
const formattedValue = formatValue(value, column?.type);
|
|
9810
9773
|
const isObject = typeof value === "object" && value !== null;
|
|
9811
|
-
return /* @__PURE__ */ React109.createElement(
|
|
9812
|
-
}))))), /* @__PURE__ */ React109.createElement(
|
|
9774
|
+
return /* @__PURE__ */ React109.createElement(Box24, { key }, /* @__PURE__ */ React109.createElement(Text54, { size: "xs", c: "dimmed", fw: 500 }, label), isObject ? /* @__PURE__ */ React109.createElement(Code3, { block: true, style: { fontSize: "12px", whiteSpace: "pre-wrap", maxHeight: 150, overflow: "auto" } }, formattedValue) : /* @__PURE__ */ React109.createElement(Text54, { size: "sm", c: column?.color || void 0 }, formattedValue));
|
|
9775
|
+
}))))), /* @__PURE__ */ React109.createElement(Box24, { style: { flex: 1 } }), dataSource && /* @__PURE__ */ React109.createElement(React109.Fragment, null, /* @__PURE__ */ React109.createElement(Divider8, null), /* @__PURE__ */ React109.createElement(Box24, null, /* @__PURE__ */ React109.createElement(Group32, { gap: "xs", mb: "xs" }, /* @__PURE__ */ React109.createElement(IconSparkles, { size: 14, color: "var(--mantine-color-blue-4)" }), /* @__PURE__ */ React109.createElement(Text54, { size: "xs", fw: 500, c: "dimmed" }, "Data Source")), dataSource.oracleName && /* @__PURE__ */ React109.createElement(Text54, { size: "xs", c: "dimmed" }, "Oracle: ", dataSource.oracleName), dataSource.query && /* @__PURE__ */ React109.createElement(Box24, { mt: "xs" }, /* @__PURE__ */ React109.createElement(Text54, { size: "xs", c: "dimmed", mb: 4 }, "Query:"), /* @__PURE__ */ React109.createElement(Code3, { block: true, style: { fontSize: "11px", whiteSpace: "pre-wrap" } }, dataSource.query)))));
|
|
9813
9776
|
}
|
|
9814
9777
|
var DynamicListSelectionPanel = ({
|
|
9815
9778
|
selectedItem,
|
|
@@ -9880,7 +9843,7 @@ var DynamicListSelectionPanel = ({
|
|
|
9880
9843
|
),
|
|
9881
9844
|
customContent ? (
|
|
9882
9845
|
// Use custom renderer content
|
|
9883
|
-
/* @__PURE__ */ React109.createElement(
|
|
9846
|
+
/* @__PURE__ */ React109.createElement(Box24, { style: { flex: 1, paddingTop: "1rem", display: "flex", flexDirection: "column" } }, customContent)
|
|
9884
9847
|
) : (
|
|
9885
9848
|
// Default key-value view (actions commented out for now)
|
|
9886
9849
|
/* @__PURE__ */ React109.createElement(DefaultKeyValueView, { item: selectedItem, columns, dataSource, panelDescription })
|
|
@@ -10193,8 +10156,8 @@ function DynamicListBlock({ block, editor }) {
|
|
|
10193
10156
|
if (!listId) {
|
|
10194
10157
|
return /* @__PURE__ */ React110.createElement(Paper11, { p: "xl", withBorder: true, w: "100%", radius: "lg" }, /* @__PURE__ */ React110.createElement(Stack82, { align: "center", gap: "sm" }, /* @__PURE__ */ React110.createElement(IconDatabase, { size: 32, color: "var(--mantine-color-dimmed)" }), /* @__PURE__ */ React110.createElement(Text55, { fz: "18", ta: "center" }, "Dynamic List Block"), /* @__PURE__ */ React110.createElement(Text55, { fz: "sm", c: "dimmed", ta: "center" }, "This block will display dynamic data from AG-UI.", /* @__PURE__ */ React110.createElement("br", null), "Add a list from the AG-UI Canvas to populate it.")));
|
|
10195
10158
|
}
|
|
10196
|
-
return /* @__PURE__ */ React110.createElement(Stack82, { w: "100%" }, /* @__PURE__ */ React110.createElement(
|
|
10197
|
-
|
|
10159
|
+
return /* @__PURE__ */ React110.createElement(Stack82, { w: "100%" }, /* @__PURE__ */ React110.createElement(Flex21, { px: 5, align: "center", justify: "space-between" }, /* @__PURE__ */ React110.createElement(Title5, { order: 4 }, title || "Dynamic List"), /* @__PURE__ */ React110.createElement(ActionIcon12, { variant: "subtle", size: "sm", onClick: toggle, "aria-label": opened ? "Collapse" : "Expand" }, opened ? /* @__PURE__ */ React110.createElement(IconChevronUp3, { size: 18 }) : /* @__PURE__ */ React110.createElement(IconChevronDown6, { size: 18 }))), /* @__PURE__ */ React110.createElement(Collapse6, { in: showInfo }, /* @__PURE__ */ React110.createElement(
|
|
10160
|
+
Box25,
|
|
10198
10161
|
{
|
|
10199
10162
|
mx: 5,
|
|
10200
10163
|
mt: "xs",
|
|
@@ -10205,9 +10168,9 @@ function DynamicListBlock({ block, editor }) {
|
|
|
10205
10168
|
border: "1px solid var(--mantine-color-dark-4)"
|
|
10206
10169
|
}
|
|
10207
10170
|
},
|
|
10208
|
-
/* @__PURE__ */ React110.createElement(
|
|
10209
|
-
/* @__PURE__ */ React110.createElement(Stack82, { gap: 6 }, parsedDataSource?.oracleName && /* @__PURE__ */ React110.createElement(Group33, { gap: "xs" }, /* @__PURE__ */ React110.createElement(Text55, { fz: "xs", c: "dimmed", w: 70 }, "Oracle:"), /* @__PURE__ */ React110.createElement(Text55, { fz: "xs" }, parsedDataSource.oracleName)), parsedDataSource?.oracleDid && /* @__PURE__ */ React110.createElement(Group33, { gap: "xs" }, /* @__PURE__ */ React110.createElement(Text55, { fz: "xs", c: "dimmed", w: 70 }, "DID:"), /* @__PURE__ */ React110.createElement(Text55, { fz: "xs", style: { wordBreak: "break-all" } }, parsedDataSource.oracleDid)), parsedDataSource?.toolName && /* @__PURE__ */ React110.createElement(Group33, { gap: "xs" }, /* @__PURE__ */ React110.createElement(Text55, { fz: "xs", c: "dimmed", w: 70 }, "Tool:"), /* @__PURE__ */ React110.createElement(Text55, { fz: "xs" }, parsedDataSource.toolName)), parsedDataSource?.query && /* @__PURE__ */ React110.createElement(
|
|
10210
|
-
)), /* @__PURE__ */ React110.createElement(Collapse6, { pb: 5, px: 5, in: opened }, /* @__PURE__ */ React110.createElement(Stack82, { w: "100%" }, /* @__PURE__ */ React110.createElement(Collapse6, { in: showSearch }, /* @__PURE__ */ React110.createElement(
|
|
10171
|
+
/* @__PURE__ */ React110.createElement(Flex21, { justify: "space-between", align: "flex-start", mb: "xs" }, /* @__PURE__ */ React110.createElement(Group33, { gap: "xs" }, /* @__PURE__ */ React110.createElement(IconInfoCircle2, { size: 14, color: "var(--mantine-color-blue-4)" }), /* @__PURE__ */ React110.createElement(Text55, { fz: "xs", fw: 500, c: "dimmed" }, "Data Source")), /* @__PURE__ */ React110.createElement(ActionIcon12, { variant: "subtle", size: "xs", onClick: () => setShowInfo(false), "aria-label": "Close info" }, /* @__PURE__ */ React110.createElement(IconX5, { size: 14 }))),
|
|
10172
|
+
/* @__PURE__ */ React110.createElement(Stack82, { gap: 6 }, parsedDataSource?.oracleName && /* @__PURE__ */ React110.createElement(Group33, { gap: "xs" }, /* @__PURE__ */ React110.createElement(Text55, { fz: "xs", c: "dimmed", w: 70 }, "Oracle:"), /* @__PURE__ */ React110.createElement(Text55, { fz: "xs" }, parsedDataSource.oracleName)), parsedDataSource?.oracleDid && /* @__PURE__ */ React110.createElement(Group33, { gap: "xs" }, /* @__PURE__ */ React110.createElement(Text55, { fz: "xs", c: "dimmed", w: 70 }, "DID:"), /* @__PURE__ */ React110.createElement(Text55, { fz: "xs", style: { wordBreak: "break-all" } }, parsedDataSource.oracleDid)), parsedDataSource?.toolName && /* @__PURE__ */ React110.createElement(Group33, { gap: "xs" }, /* @__PURE__ */ React110.createElement(Text55, { fz: "xs", c: "dimmed", w: 70 }, "Tool:"), /* @__PURE__ */ React110.createElement(Text55, { fz: "xs" }, parsedDataSource.toolName)), parsedDataSource?.query && /* @__PURE__ */ React110.createElement(Box25, null, /* @__PURE__ */ React110.createElement(Text55, { fz: "xs", c: "dimmed", mb: 4 }, "Query:"), /* @__PURE__ */ React110.createElement(Text55, { fz: "xs", style: { whiteSpace: "pre-wrap" } }, parsedDataSource.query)), parsedDataSource?.description && /* @__PURE__ */ React110.createElement(Box25, null, /* @__PURE__ */ React110.createElement(Text55, { fz: "xs", c: "dimmed", mb: 4 }, "Description:"), /* @__PURE__ */ React110.createElement(Text55, { fz: "xs", fs: "italic" }, parsedDataSource.description)), parsedDataSource?.params && Object.keys(parsedDataSource.params).length > 0 && /* @__PURE__ */ React110.createElement(Box25, null, /* @__PURE__ */ React110.createElement(Text55, { fz: "xs", c: "dimmed", mb: 4 }, "Params:"), /* @__PURE__ */ React110.createElement(Code4, { block: true, style: { fontSize: "11px", whiteSpace: "pre-wrap" } }, JSON.stringify(parsedDataSource.params, null, 2))))
|
|
10173
|
+
)), /* @__PURE__ */ React110.createElement(Collapse6, { pb: 5, px: 5, in: opened }, /* @__PURE__ */ React110.createElement(Stack82, { w: "100%" }, /* @__PURE__ */ React110.createElement(Collapse6, { in: showSearch }, /* @__PURE__ */ React110.createElement(Flex21, { gap: "xs", align: "center" }, /* @__PURE__ */ React110.createElement(
|
|
10211
10174
|
TextInput5,
|
|
10212
10175
|
{
|
|
10213
10176
|
ref: searchInputRef,
|
|
@@ -10228,7 +10191,7 @@ function DynamicListBlock({ block, editor }) {
|
|
|
10228
10191
|
}
|
|
10229
10192
|
}
|
|
10230
10193
|
}
|
|
10231
|
-
), /* @__PURE__ */ React110.createElement(ActionIcon12, { variant: "subtle", size: "sm", onClick: handleSearchToggle, "aria-label": "Close search", title: "Close search" }, /* @__PURE__ */ React110.createElement(IconChevronUp3, { size: 16 })))), sortConfig && /* @__PURE__ */ React110.createElement(
|
|
10194
|
+
), /* @__PURE__ */ React110.createElement(ActionIcon12, { variant: "subtle", size: "sm", onClick: handleSearchToggle, "aria-label": "Close search", title: "Close search" }, /* @__PURE__ */ React110.createElement(IconChevronUp3, { size: 16 })))), sortConfig && /* @__PURE__ */ React110.createElement(Flex21, { align: "center", gap: "xs" }, /* @__PURE__ */ React110.createElement(Text55, { fz: "xs", c: "dimmed" }, "Sorted by ", parsedColumns.find((c) => c.key === sortConfig.key)?.label || sortConfig.key), sortConfig.direction === "asc" ? /* @__PURE__ */ React110.createElement(IconArrowUp3, { size: 14 }) : /* @__PURE__ */ React110.createElement(IconArrowDown3, { size: 14 })), hasData && /* @__PURE__ */ React110.createElement(Flex21, { justify: "space-between", align: "center" }, /* @__PURE__ */ React110.createElement(Group33, { gap: "xs" }, /* @__PURE__ */ React110.createElement(Text55, { fz: "sm", c: "dimmed" }, totalItems, " ", totalItems === 1 ? "item" : "items", searchQuery && rawData && ` of ${rawData.length}`, selectedIds.size > 0 && ` \u2022 ${selectedIds.size} selected`), useSnapshot && snapshotTimestamp && /* @__PURE__ */ React110.createElement(Tooltip10, { label: `Snapshot from ${new Date(snapshotTimestamp).toLocaleString()}` }, /* @__PURE__ */ React110.createElement(Text55, { fz: "xs", c: "yellow", style: { cursor: "help" } }, "(snapshot)")), useSnapshot && !snapshotTimestamp && /* @__PURE__ */ React110.createElement(Text55, { fz: "xs", c: "yellow" }, "(snapshot)"), !useSnapshot && /* @__PURE__ */ React110.createElement(Text55, { fz: "xs", c: "green" }, "(live)")), /* @__PURE__ */ React110.createElement(Group33, { gap: "xs" }, editable && /* @__PURE__ */ React110.createElement(React110.Fragment, null, useSnapshot && liveData.items && liveData.items.length > 0 && /* @__PURE__ */ React110.createElement(Button20, { size: "compact-xs", variant: "subtle", onClick: handleUseLiveData, leftSection: /* @__PURE__ */ React110.createElement(IconRefresh2, { size: 12 }) }, "Use Live"), !useSnapshot && hasSnapshot && /* @__PURE__ */ React110.createElement(Button20, { size: "compact-xs", variant: "subtle", onClick: handleUseSnapshot, leftSection: /* @__PURE__ */ React110.createElement(IconCamera, { size: 12 }) }, "Use Snapshot"), !useSnapshot && liveData.items && liveData.items.length > 0 && /* @__PURE__ */ React110.createElement(Tooltip10, { label: "Save current data as snapshot" }, /* @__PURE__ */ React110.createElement(ActionIcon12, { variant: "subtle", size: "sm", onClick: handleSaveSnapshot }, /* @__PURE__ */ React110.createElement(IconCamera, { size: 16 })))), /* @__PURE__ */ React110.createElement(
|
|
10232
10195
|
Menu2,
|
|
10233
10196
|
{
|
|
10234
10197
|
shadow: "md",
|
|
@@ -10257,12 +10220,12 @@ function DynamicListBlock({ block, editor }) {
|
|
|
10257
10220
|
}
|
|
10258
10221
|
},
|
|
10259
10222
|
/* @__PURE__ */ React110.createElement(Menu2.Target, null, /* @__PURE__ */ React110.createElement(ActionIcon12, { variant: "subtle", size: "sm", "aria-label": "List actions", title: "List actions" }, /* @__PURE__ */ React110.createElement(IconAdjustmentsHorizontal2, { size: 18 }))),
|
|
10260
|
-
/* @__PURE__ */ React110.createElement(Menu2.Dropdown, null, sortOptions.length > 0 && /* @__PURE__ */ React110.createElement(React110.Fragment, null, /* @__PURE__ */ React110.createElement(Menu2.Label, { onClick: () => setOrderByCollapsed(!orderByCollapsed), style: { cursor: "pointer" } }, /* @__PURE__ */ React110.createElement(
|
|
10223
|
+
/* @__PURE__ */ React110.createElement(Menu2.Dropdown, null, sortOptions.length > 0 && /* @__PURE__ */ React110.createElement(React110.Fragment, null, /* @__PURE__ */ React110.createElement(Menu2.Label, { onClick: () => setOrderByCollapsed(!orderByCollapsed), style: { cursor: "pointer" } }, /* @__PURE__ */ React110.createElement(Flex21, { align: "center", gap: 10 }, orderByCollapsed ? /* @__PURE__ */ React110.createElement(IconChevronRight5, { size: 14 }) : /* @__PURE__ */ React110.createElement(IconChevronDown6, { size: 14 }), /* @__PURE__ */ React110.createElement(Text55, { fz: "14" }, "Order By"))), /* @__PURE__ */ React110.createElement(Collapse6, { in: !orderByCollapsed }, sortOptions.map((opt) => {
|
|
10261
10224
|
const isAscActive = sortConfig?.key === opt.key && sortConfig?.direction === "asc";
|
|
10262
10225
|
const isDescActive = sortConfig?.key === opt.key && sortConfig?.direction === "desc";
|
|
10263
10226
|
const isRowActive = isAscActive || isDescActive;
|
|
10264
10227
|
return /* @__PURE__ */ React110.createElement(
|
|
10265
|
-
|
|
10228
|
+
Box25,
|
|
10266
10229
|
{
|
|
10267
10230
|
key: opt.key,
|
|
10268
10231
|
px: "sm",
|
|
@@ -10273,7 +10236,7 @@ function DynamicListBlock({ block, editor }) {
|
|
|
10273
10236
|
margin: "2px 4px"
|
|
10274
10237
|
}
|
|
10275
10238
|
},
|
|
10276
|
-
/* @__PURE__ */ React110.createElement(
|
|
10239
|
+
/* @__PURE__ */ React110.createElement(Flex21, { align: "center", justify: "space-between", gap: "xs" }, /* @__PURE__ */ React110.createElement(
|
|
10277
10240
|
ActionIcon12,
|
|
10278
10241
|
{
|
|
10279
10242
|
variant: "subtle",
|
|
@@ -10311,7 +10274,7 @@ function DynamicListBlock({ block, editor }) {
|
|
|
10311
10274
|
/* @__PURE__ */ React110.createElement(IconArrowDown3, { size: 14 })
|
|
10312
10275
|
))
|
|
10313
10276
|
);
|
|
10314
|
-
})), /* @__PURE__ */ React110.createElement(Menu2.Divider, null)), parsedColumns.length > 0 && /* @__PURE__ */ React110.createElement(React110.Fragment, null, /* @__PURE__ */ React110.createElement(Menu2.Label, { onClick: () => setColumnsCollapsed(!columnsCollapsed), style: { cursor: "pointer" } }, /* @__PURE__ */ React110.createElement(
|
|
10277
|
+
})), /* @__PURE__ */ React110.createElement(Menu2.Divider, null)), parsedColumns.length > 0 && /* @__PURE__ */ React110.createElement(React110.Fragment, null, /* @__PURE__ */ React110.createElement(Menu2.Label, { onClick: () => setColumnsCollapsed(!columnsCollapsed), style: { cursor: "pointer" } }, /* @__PURE__ */ React110.createElement(Flex21, { align: "center", gap: 10 }, columnsCollapsed ? /* @__PURE__ */ React110.createElement(IconChevronRight5, { size: 14 }) : /* @__PURE__ */ React110.createElement(IconChevronDown6, { size: 14 }), /* @__PURE__ */ React110.createElement(Text55, { fz: "14" }, "Columns"))), /* @__PURE__ */ React110.createElement(Collapse6, { in: !columnsCollapsed }, parsedColumns.map((col) => /* @__PURE__ */ React110.createElement(Box25, { key: col.key, px: "sm", py: 4, style: { margin: "2px 4px" } }, /* @__PURE__ */ React110.createElement(Flex21, { align: "center", justify: "space-between", gap: "xs" }, /* @__PURE__ */ React110.createElement(Text55, { fz: "xs", style: { flex: 1, minWidth: 0 }, lineClamp: 1 }, col.label), /* @__PURE__ */ React110.createElement(
|
|
10315
10278
|
Select3,
|
|
10316
10279
|
{
|
|
10317
10280
|
size: "xs",
|
|
@@ -10363,8 +10326,8 @@ function DynamicListBlock({ block, editor }) {
|
|
|
10363
10326
|
))), !useSnapshot && liveData.loading && /* @__PURE__ */ React110.createElement(Paper11, { p: "lg", bg: "var(--mantine-color-dark-6)", radius: "sm" }, /* @__PURE__ */ React110.createElement(Text55, { c: "dimmed", ta: "center" }, "Loading data...")), !useSnapshot && liveData.error && /* @__PURE__ */ React110.createElement(Paper11, { p: "lg", bg: "var(--mantine-color-red-9)", radius: "sm" }, /* @__PURE__ */ React110.createElement(Text55, { c: "white", ta: "center" }, "Error: ", liveData.error)), hasData && paginatedData && /* @__PURE__ */ React110.createElement(Stack82, { gap: "xs" }, paginatedData.map((row, index) => {
|
|
10364
10327
|
const rowId = getRowId(row, index);
|
|
10365
10328
|
const isChecked = isItemChecked(rowId);
|
|
10366
|
-
return /* @__PURE__ */ React110.createElement(ListItemContainer, { key: rowId, isChecked, onClick: () => onItemCheck(rowId, !isChecked) }, /* @__PURE__ */ React110.createElement(
|
|
10367
|
-
})), hasData && totalPages > 1 && /* @__PURE__ */ React110.createElement(ListPagination, { page, setPage, totalPages }), !hasData && !liveData.loading && searchQuery && rawData && rawData.length > 0 && /* @__PURE__ */ React110.createElement(Text55, { c: "dimmed", ta: "center", fz: "sm" }, "No matching items for \u201C", searchQuery, "\u201D"), !hasData && !liveData.loading && !searchQuery && parsedDataSource && /* @__PURE__ */ React110.createElement(Paper11, { p: "lg", bg: "var(--mantine-color-dark-6)", radius: "sm" }, /* @__PURE__ */ React110.createElement(Stack82, { gap: "sm" }, /* @__PURE__ */ React110.createElement(Group33, { gap: "xs" }, /* @__PURE__ */ React110.createElement(IconSparkles2, { size: 16, color: "var(--mantine-color-blue-4)" }), /* @__PURE__ */ React110.createElement(Text55, { fz: "sm", fw: 500 }, "Data Source")), parsedDataSource.oracleName && /* @__PURE__ */ React110.createElement(Group33, { gap: "xs" }, /* @__PURE__ */ React110.createElement(Text55, { size: "xs", c: "dimmed" }, "Oracle:"), /* @__PURE__ */ React110.createElement(Badge15, { size: "sm", variant: "light" }, parsedDataSource.oracleName)), parsedDataSource.query && /* @__PURE__ */ React110.createElement(
|
|
10329
|
+
return /* @__PURE__ */ React110.createElement(ListItemContainer, { key: rowId, isChecked, onClick: () => onItemCheck(rowId, !isChecked) }, /* @__PURE__ */ React110.createElement(Flex21, { align: "center", gap: "sm" }, /* @__PURE__ */ React110.createElement(Stack82, { gap: 2 }, renderField(row, columnsByPosition.topLeft), columnsByPosition.bottomLeft && /* @__PURE__ */ React110.createElement(Text55, { size: "xs", c: columnsByPosition.bottomLeft.color || "dimmed", lineClamp: 1 }, formatValue2(row[columnsByPosition.bottomLeft.key], columnsByPosition.bottomLeft.type) || ""))), /* @__PURE__ */ React110.createElement(Flex21, { align: "center", gap: "md" }, /* @__PURE__ */ React110.createElement(Stack82, { gap: 2, align: "flex-end" }, columnsByPosition.topRight && /* @__PURE__ */ React110.createElement(Text55, { size: "sm", fw: 500, c: columnsByPosition.topRight.color || void 0 }, formatValue2(row[columnsByPosition.topRight.key], columnsByPosition.topRight.type) || ""), columnsByPosition.bottomRight && /* @__PURE__ */ React110.createElement(Text55, { size: "xs", c: columnsByPosition.bottomRight.color || "dimmed", tt: "capitalize" }, formatValue2(row[columnsByPosition.bottomRight.key], columnsByPosition.bottomRight.type) || "")), isMultiSelect && /* @__PURE__ */ React110.createElement(ListItemCheckbox, { ariaLabel: `Select ${rowId}`, checked: isChecked, onCheck: (checked) => onItemCheck(rowId, checked) })));
|
|
10330
|
+
})), hasData && totalPages > 1 && /* @__PURE__ */ React110.createElement(ListPagination, { page, setPage, totalPages }), !hasData && !liveData.loading && searchQuery && rawData && rawData.length > 0 && /* @__PURE__ */ React110.createElement(Text55, { c: "dimmed", ta: "center", fz: "sm" }, "No matching items for \u201C", searchQuery, "\u201D"), !hasData && !liveData.loading && !searchQuery && parsedDataSource && /* @__PURE__ */ React110.createElement(Paper11, { p: "lg", bg: "var(--mantine-color-dark-6)", radius: "sm" }, /* @__PURE__ */ React110.createElement(Stack82, { gap: "sm" }, /* @__PURE__ */ React110.createElement(Group33, { gap: "xs" }, /* @__PURE__ */ React110.createElement(IconSparkles2, { size: 16, color: "var(--mantine-color-blue-4)" }), /* @__PURE__ */ React110.createElement(Text55, { fz: "sm", fw: 500 }, "Data Source")), parsedDataSource.oracleName && /* @__PURE__ */ React110.createElement(Group33, { gap: "xs" }, /* @__PURE__ */ React110.createElement(Text55, { size: "xs", c: "dimmed" }, "Oracle:"), /* @__PURE__ */ React110.createElement(Badge15, { size: "sm", variant: "light" }, parsedDataSource.oracleName)), parsedDataSource.query && /* @__PURE__ */ React110.createElement(Box25, null, /* @__PURE__ */ React110.createElement(Text55, { size: "xs", c: "dimmed", mb: 4 }, "Query:"), /* @__PURE__ */ React110.createElement(Code4, { block: true, style: { fontSize: "12px", whiteSpace: "pre-wrap" } }, parsedDataSource.query)), parsedDataSource.description && /* @__PURE__ */ React110.createElement(Text55, { size: "xs", c: "dimmed", fs: "italic" }, parsedDataSource.description), /* @__PURE__ */ React110.createElement(Text55, { size: "xs", c: "dimmed", ta: "center", mt: "xs" }, "Ask your oracle this query to populate the list."))), !hasData && !liveData.loading && !searchQuery && !parsedDataSource && /* @__PURE__ */ React110.createElement(Paper11, { p: "lg", bg: "var(--mantine-color-dark-6)", radius: "sm" }, /* @__PURE__ */ React110.createElement(Text55, { c: "dimmed", ta: "center", fz: "sm" }, "No data available. Add data from the AG-UI Canvas.")))));
|
|
10368
10331
|
}
|
|
10369
10332
|
|
|
10370
10333
|
// src/mantine/blocks/dynamicList/DynamicListBlockSpec.tsx
|
|
@@ -10410,23 +10373,23 @@ var DynamicListBlockSpec = createReactBlockSpec6(
|
|
|
10410
10373
|
// src/mantine/blocks/enumChecklist/EnumChecklistBlock.tsx
|
|
10411
10374
|
import React118, { useState as useState36, useEffect as useEffect21, useMemo as useMemo20, useCallback as useCallback21 } from "react";
|
|
10412
10375
|
import { createReactBlockSpec as createReactBlockSpec7 } from "@blocknote/react";
|
|
10413
|
-
import { Stack as Stack88, Text as Text61, Button as Button25, ActionIcon as ActionIcon13, Center as Center5, Flex as
|
|
10376
|
+
import { Stack as Stack88, Text as Text61, Button as Button25, ActionIcon as ActionIcon13, Center as Center5, Flex as Flex23 } from "@mantine/core";
|
|
10414
10377
|
|
|
10415
10378
|
// src/mantine/blocks/enumChecklist/oracle_personalities/index.tsx
|
|
10416
10379
|
import React112 from "react";
|
|
10417
|
-
import { Box as
|
|
10380
|
+
import { Box as Box26, Flex as Flex22, Stack as Stack83, Text as Text56, Image as Image14 } from "@mantine/core";
|
|
10418
10381
|
function OraclePersonalitiesEnumList({ selectionMode, isItemChecked, onItemCheck, items }) {
|
|
10419
10382
|
if (!items || items.length === 0) {
|
|
10420
10383
|
return /* @__PURE__ */ React112.createElement(Text56, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No assets found");
|
|
10421
10384
|
}
|
|
10422
10385
|
const rows = items.map(({ id, name, description, voice, icon }) => /* @__PURE__ */ React112.createElement(ListItemContainer, { key: id, isChecked: false, onClick: () => {
|
|
10423
|
-
} }, /* @__PURE__ */ React112.createElement(
|
|
10424
|
-
return /* @__PURE__ */ React112.createElement(
|
|
10386
|
+
} }, /* @__PURE__ */ React112.createElement(Flex22, { align: "center", gap: "sm" }, /* @__PURE__ */ React112.createElement(Image14, { radius: 16, w: 62, h: 62, src: icon, alt: name }), /* @__PURE__ */ React112.createElement(Stack83, { gap: 0 }, /* @__PURE__ */ React112.createElement(Text56, { size: "sm", fw: 500 }, name || "-"), description !== void 0 && /* @__PURE__ */ React112.createElement(Text56, { size: "sm", c: "dimmed" }, description))), /* @__PURE__ */ React112.createElement(Flex22, { align: "center", gap: "md" }, /* @__PURE__ */ React112.createElement(Stack83, { ta: "right", gap: 0 }, /* @__PURE__ */ React112.createElement(Text56, { size: "sm", fw: 500 }, "Voice"), /* @__PURE__ */ React112.createElement(Text56, { size: "sm", c: "dimmed" }, voice)), selectionMode && /* @__PURE__ */ React112.createElement(ListItemCheckbox, { ariaLabel: `Select oracle ${name}`, checked: isItemChecked?.(id), onCheck: (checked) => onItemCheck?.(id, checked) }))));
|
|
10387
|
+
return /* @__PURE__ */ React112.createElement(Box26, { flex: 1 }, /* @__PURE__ */ React112.createElement(Stack83, null, rows));
|
|
10425
10388
|
}
|
|
10426
10389
|
|
|
10427
10390
|
// src/mantine/blocks/enumChecklist/EnumChecklistConfigModal.tsx
|
|
10428
10391
|
import React117, { useState as useState35 } from "react";
|
|
10429
|
-
import { Modal, Group as Group37, Box as
|
|
10392
|
+
import { Modal, Group as Group37, Box as Box28 } from "@mantine/core";
|
|
10430
10393
|
|
|
10431
10394
|
// src/mantine/blocks/list/modal/ModalNavigation.tsx
|
|
10432
10395
|
import React113 from "react";
|
|
@@ -10456,7 +10419,7 @@ var ModalNavigation = ({ steps, activeStep, onStepChange, showUpdateButton = fal
|
|
|
10456
10419
|
|
|
10457
10420
|
// src/mantine/blocks/enumChecklist/EnumChecklistTypeSelection.tsx
|
|
10458
10421
|
import React114 from "react";
|
|
10459
|
-
import { Stack as Stack85, Card as Card15, Group as Group34, Text as Text58, Box as
|
|
10422
|
+
import { Stack as Stack85, Card as Card15, Group as Group34, Text as Text58, Box as Box27, Button as Button22 } from "@mantine/core";
|
|
10460
10423
|
|
|
10461
10424
|
// src/mantine/blocks/enumChecklist/oracle_personalities/config.ts
|
|
10462
10425
|
var oraclePersonalitiesMetadata = {
|
|
@@ -10599,7 +10562,7 @@ var EnumChecklistTypeSelection = ({ selectedType, onTypeSelect, onNext }) => {
|
|
|
10599
10562
|
onClick: () => onTypeSelect(enumChecklistMeta.id)
|
|
10600
10563
|
},
|
|
10601
10564
|
/* @__PURE__ */ React114.createElement(Group34, { gap: "md", align: "flex-start" }, /* @__PURE__ */ React114.createElement(
|
|
10602
|
-
|
|
10565
|
+
Box27,
|
|
10603
10566
|
{
|
|
10604
10567
|
style: {
|
|
10605
10568
|
width: 48,
|
|
@@ -10771,7 +10734,7 @@ var EnumChecklistConfigModal = ({ opened, onClose, onSave, initialConfig }) => {
|
|
|
10771
10734
|
return null;
|
|
10772
10735
|
}
|
|
10773
10736
|
};
|
|
10774
|
-
return /* @__PURE__ */ React117.createElement(Modal, { opened, onClose: handleClose, title: "Configure Enum Checklist Block", size: "xl" }, /* @__PURE__ */ React117.createElement(Group37, { align: "flex-start", gap: "lg", style: { minHeight: "400px" } }, /* @__PURE__ */ React117.createElement(
|
|
10737
|
+
return /* @__PURE__ */ React117.createElement(Modal, { opened, onClose: handleClose, title: "Configure Enum Checklist Block", size: "xl" }, /* @__PURE__ */ React117.createElement(Group37, { align: "flex-start", gap: "lg", style: { minHeight: "400px" } }, /* @__PURE__ */ React117.createElement(Box28, { style: { width: "200px", flexShrink: 0, height: "400px", display: "flex" } }, /* @__PURE__ */ React117.createElement(ModalNavigation, { steps, activeStep, onStepChange: setActiveStep, showUpdateButton: selectedType !== null, onUpdateBlock: handleAddToBlock })), /* @__PURE__ */ React117.createElement(Box28, { style: { flex: 1 } }, renderStepContent())));
|
|
10775
10738
|
};
|
|
10776
10739
|
|
|
10777
10740
|
// src/mantine/blocks/enumChecklist/EnumChecklistBlock.tsx
|
|
@@ -10872,7 +10835,7 @@ var EnumChecklistBlockContent = ({ block, editor }) => {
|
|
|
10872
10835
|
return null;
|
|
10873
10836
|
}
|
|
10874
10837
|
};
|
|
10875
|
-
return /* @__PURE__ */ React118.createElement(Stack88, { w: "100%" }, listType && /* @__PURE__ */ React118.createElement(
|
|
10838
|
+
return /* @__PURE__ */ React118.createElement(Stack88, { w: "100%" }, listType && /* @__PURE__ */ React118.createElement(Flex23, { align: "center", justify: "space-between", gap: "xs" }, /* @__PURE__ */ React118.createElement(Text61, null, getEnumListNameByType(listType)), listConfig.listSelectionMode && /* @__PURE__ */ React118.createElement(Text61, { lh: 0.5, c: "dimmed" }, listConfig?.selection_mode === "single" ? "Single Selection" : "Multi Selection"), editable && /* @__PURE__ */ React118.createElement(Flex23, { justify: listType ? "space-between" : "flex-end" }, /* @__PURE__ */ React118.createElement(Flex23, { gap: "xs" }, /* @__PURE__ */ React118.createElement(ActionIcon13, { variant: "subtle", size: "sm", onClick: () => setModalOpened(true) }, /* @__PURE__ */ React118.createElement(IconSettings3, null))))), /* @__PURE__ */ React118.createElement(Flex23, { flex: 1 }, !listType ? /* @__PURE__ */ React118.createElement(Center5, { py: "xl" }, /* @__PURE__ */ React118.createElement(Stack88, { align: "center", gap: "sm" }, /* @__PURE__ */ React118.createElement(Text61, { size: "sm", c: "dimmed", ta: "center" }, "No list type configured"), /* @__PURE__ */ React118.createElement(Button25, { size: "sm", variant: "light", onClick: () => setModalOpened(true) }, "Configure List"))) : /* @__PURE__ */ React118.createElement(Stack88, { gap: "md", flex: 1 }, renderListComponent())), /* @__PURE__ */ React118.createElement(
|
|
10876
10839
|
EnumChecklistConfigModal,
|
|
10877
10840
|
{
|
|
10878
10841
|
opened: modalOpened,
|
|
@@ -11720,7 +11683,7 @@ var ClaimTemplateView = ({ editor, block }) => {
|
|
|
11720
11683
|
|
|
11721
11684
|
// src/mantine/blocks/claim/flow/FlowView.tsx
|
|
11722
11685
|
import React131, { useMemo as useMemo28 } from "react";
|
|
11723
|
-
import { Stack as Stack96, Text as Text69, Loader as Loader12, Center as Center7, Alert as Alert16, Title as Title7, Flex as
|
|
11686
|
+
import { Stack as Stack96, Text as Text69, Loader as Loader12, Center as Center7, Alert as Alert16, Title as Title7, Flex as Flex24, ActionIcon as ActionIcon18 } from "@mantine/core";
|
|
11724
11687
|
|
|
11725
11688
|
// src/mantine/hooks/useCurrentUser.ts
|
|
11726
11689
|
import { useState as useState41, useEffect as useEffect25, useRef as useRef4 } from "react";
|
|
@@ -12291,7 +12254,7 @@ var ClaimsListSheet = ({ collectionId, collectionName, deedId, adminAddress, use
|
|
|
12291
12254
|
};
|
|
12292
12255
|
|
|
12293
12256
|
// src/mantine/blocks/claim/flow/ClaimCollectionsList.tsx
|
|
12294
|
-
import { IconArrowRight
|
|
12257
|
+
import { IconArrowRight } from "@tabler/icons-react";
|
|
12295
12258
|
var CollectionItem = ({ collection, deedId, adminAddress, userRole, onRefresh, execution }) => {
|
|
12296
12259
|
console.log("[CollectionItem] RENDER START", { collectionId: collection.id, userRole });
|
|
12297
12260
|
const { getCurrentUser } = useBlocknoteHandlers();
|
|
@@ -12342,7 +12305,7 @@ var CollectionItem = ({ collection, deedId, adminAddress, userRole, onRefresh, e
|
|
|
12342
12305
|
}
|
|
12343
12306
|
};
|
|
12344
12307
|
return /* @__PURE__ */ React130.createElement("div", { style: { opacity: canAccessClaims ? 1 : 0.5 } }, /* @__PURE__ */ React130.createElement(ListItemContainer, { isChecked: false, onClick: () => {
|
|
12345
|
-
} }, /* @__PURE__ */ React130.createElement(Stack95, { gap: 4, style: { flex: 1 } }, /* @__PURE__ */ React130.createElement(Text68, { size: "sm", fw: 500, c: canAccessClaims ? void 0 : "dimmed" }, collectionName), collection.description && /* @__PURE__ */ React130.createElement(Text68, { size: "xs", c: "dimmed" }, collection.description)), /* @__PURE__ */ React130.createElement(Tooltip12, { label: "You need to apply to be a service agent first", disabled: canAccessClaims, position: "left", withArrow: true }, /* @__PURE__ */ React130.createElement(ActionIcon17, { variant: "subtle", size: "lg", onClick: handleClick, disabled: !canAccessClaims, style: { cursor: canAccessClaims ? "pointer" : "not-allowed" } }, /* @__PURE__ */ React130.createElement(
|
|
12308
|
+
} }, /* @__PURE__ */ React130.createElement(Stack95, { gap: 4, style: { flex: 1 } }, /* @__PURE__ */ React130.createElement(Text68, { size: "sm", fw: 500, c: canAccessClaims ? void 0 : "dimmed" }, collectionName), collection.description && /* @__PURE__ */ React130.createElement(Text68, { size: "xs", c: "dimmed" }, collection.description)), /* @__PURE__ */ React130.createElement(Tooltip12, { label: "You need to apply to be a service agent first", disabled: canAccessClaims, position: "left", withArrow: true }, /* @__PURE__ */ React130.createElement(ActionIcon17, { variant: "subtle", size: "lg", onClick: handleClick, disabled: !canAccessClaims, style: { cursor: canAccessClaims ? "pointer" : "not-allowed" } }, /* @__PURE__ */ React130.createElement(IconArrowRight, { size: 20 })))));
|
|
12346
12309
|
};
|
|
12347
12310
|
var ClaimCollectionsList = ({ collections, deedId, adminAddress, userAddress, onRefresh, execution }) => {
|
|
12348
12311
|
const { userRoles, loading: loadingRoles } = useUserRoles(collections, userAddress, adminAddress, deedId);
|
|
@@ -12423,7 +12386,7 @@ var ClaimFlowView = ({ editor, block }) => {
|
|
|
12423
12386
|
if (selectedCollectionIds.length === 0) {
|
|
12424
12387
|
return /* @__PURE__ */ React131.createElement(Center7, { py: "xl" }, /* @__PURE__ */ React131.createElement(Text69, { size: "sm", c: "dimmed" }, "No claim collections selected"));
|
|
12425
12388
|
}
|
|
12426
|
-
return /* @__PURE__ */ React131.createElement(Stack96, { w: "100%" }, /* @__PURE__ */ React131.createElement(
|
|
12389
|
+
return /* @__PURE__ */ React131.createElement(Stack96, { w: "100%" }, /* @__PURE__ */ React131.createElement(Flex24, { px: 5, align: "center", justify: "space-between" }, /* @__PURE__ */ React131.createElement(Title7, { order: 4 }, "Submit Claims"), /* @__PURE__ */ React131.createElement(Flex24, { gap: "xs" }, /* @__PURE__ */ React131.createElement(ActionIcon18, { variant: "subtle", size: "sm", onClick: refetch, loading }, /* @__PURE__ */ React131.createElement(IconRefresh3, { size: 18 })), editable && /* @__PURE__ */ React131.createElement(ActionIcon18, { variant: "subtle", size: "sm", onClick: open }, /* @__PURE__ */ React131.createElement(IconSettings4, { size: 18 })))), loading ? /* @__PURE__ */ React131.createElement(Center7, { py: "xl" }, /* @__PURE__ */ React131.createElement(Loader12, { size: "md" })) : error ? /* @__PURE__ */ React131.createElement(Alert16, { color: "red", title: "Failed to load collections", icon: /* @__PURE__ */ React131.createElement(IconAlertCircle2, { size: 18 }) }, /* @__PURE__ */ React131.createElement(Text69, { size: "sm" }, error)) : /* @__PURE__ */ React131.createElement(
|
|
12427
12390
|
ClaimCollectionsList,
|
|
12428
12391
|
{
|
|
12429
12392
|
collections,
|
|
@@ -12642,7 +12605,7 @@ var BidTemplateView = ({ editor, block }) => {
|
|
|
12642
12605
|
|
|
12643
12606
|
// src/mantine/blocks/bid/flow/components/FlowView.tsx
|
|
12644
12607
|
import React146, { useMemo as useMemo38 } from "react";
|
|
12645
|
-
import { Stack as Stack104, Text as Text77, Loader as Loader18, Center as Center10, Alert as Alert19, Title as Title8, Flex as
|
|
12608
|
+
import { Stack as Stack104, Text as Text77, Loader as Loader18, Center as Center10, Alert as Alert19, Title as Title8, Flex as Flex25, ActionIcon as ActionIcon21 } from "@mantine/core";
|
|
12646
12609
|
import { IconSettings as IconSettings5, IconRefresh as IconRefresh4, IconAlertCircle as IconAlertCircle5 } from "@tabler/icons-react";
|
|
12647
12610
|
|
|
12648
12611
|
// src/mantine/blocks/bid/flow/components/ClaimCollectionsList.tsx
|
|
@@ -12651,8 +12614,8 @@ import { Stack as Stack103, Text as Text76, Loader as Loader17, Center as Center
|
|
|
12651
12614
|
|
|
12652
12615
|
// src/mantine/blocks/bid/flow/components/CollectionItem.tsx
|
|
12653
12616
|
import React144, { useMemo as useMemo37 } from "react";
|
|
12654
|
-
import { Stack as Stack102, Text as Text75, Button as Button29, Menu as Menu3, Badge as Badge20, ActionIcon as ActionIcon20, Box as
|
|
12655
|
-
import { IconChevronDown as IconChevronDown8, IconArrowRight as
|
|
12617
|
+
import { Stack as Stack102, Text as Text75, Button as Button29, Menu as Menu3, Badge as Badge20, ActionIcon as ActionIcon20, Box as Box29, Tooltip as Tooltip13, Loader as Loader16 } from "@mantine/core";
|
|
12618
|
+
import { IconChevronDown as IconChevronDown8, IconArrowRight as IconArrowRight3, IconLock } from "@tabler/icons-react";
|
|
12656
12619
|
|
|
12657
12620
|
// src/mantine/hooks/useBlockAuthorization.ts
|
|
12658
12621
|
import { useState as useState46, useEffect as useEffect30, useMemo as useMemo31 } from "react";
|
|
@@ -12874,7 +12837,7 @@ import { IconAlertCircle as IconAlertCircle4 } from "@tabler/icons-react";
|
|
|
12874
12837
|
// src/mantine/blocks/bid/flow/components/BidItem.tsx
|
|
12875
12838
|
import React140, { useMemo as useMemo36 } from "react";
|
|
12876
12839
|
import { Stack as Stack100, Text as Text73, Badge as Badge19, Group as Group44, ActionIcon as ActionIcon19 } from "@mantine/core";
|
|
12877
|
-
import { IconArrowRight as
|
|
12840
|
+
import { IconArrowRight as IconArrowRight2 } from "@tabler/icons-react";
|
|
12878
12841
|
|
|
12879
12842
|
// src/mantine/blocks/bid/flow/components/BidViewPanel.tsx
|
|
12880
12843
|
import React139, { useMemo as useMemo35, useState as useState50 } from "react";
|
|
@@ -13153,7 +13116,7 @@ var BidItem = ({ bid, deedId, adminAddress, onRefresh, execution }) => {
|
|
|
13153
13116
|
const displayStatus = bid.status;
|
|
13154
13117
|
const displayReason = bid.reason;
|
|
13155
13118
|
return /* @__PURE__ */ React140.createElement(ListItemContainer, { isChecked: false, onClick: () => {
|
|
13156
|
-
} }, /* @__PURE__ */ React140.createElement(Stack100, { gap: 4, style: { flex: 1 } }, /* @__PURE__ */ React140.createElement(Group44, { gap: "xs" }, /* @__PURE__ */ React140.createElement(Text73, { size: "xs", fw: 500 }, loadingProfile ? "Loading..." : displayName), userProfile?.verified && /* @__PURE__ */ React140.createElement(Text73, { size: "xs", c: "blue", fw: 600, title: "Verified user" }, "\u2713"), /* @__PURE__ */ React140.createElement(Badge19, { size: "xs", variant: "light", color: getRoleColor(bid.role) }, getRoleLabel(bid.role))), /* @__PURE__ */ React140.createElement(Text73, { size: "xs", c: "dimmed" }, "Submitted: ", formatDate(displayDate)), displayStatus === "rejected" && displayReason && /* @__PURE__ */ React140.createElement(Text73, { size: "xs", c: "red" }, "Reason: ", displayReason)), /* @__PURE__ */ React140.createElement(Group44, { gap: "xs" }, displayStatus && /* @__PURE__ */ React140.createElement(Badge19, { size: "sm", color: getStatusColor(displayStatus) }, getStatusLabel(displayStatus)), /* @__PURE__ */ React140.createElement(ActionIcon19, { variant: "subtle", size: "lg", onClick: openBidPanel }, /* @__PURE__ */ React140.createElement(
|
|
13119
|
+
} }, /* @__PURE__ */ React140.createElement(Stack100, { gap: 4, style: { flex: 1 } }, /* @__PURE__ */ React140.createElement(Group44, { gap: "xs" }, /* @__PURE__ */ React140.createElement(Text73, { size: "xs", fw: 500 }, loadingProfile ? "Loading..." : displayName), userProfile?.verified && /* @__PURE__ */ React140.createElement(Text73, { size: "xs", c: "blue", fw: 600, title: "Verified user" }, "\u2713"), /* @__PURE__ */ React140.createElement(Badge19, { size: "xs", variant: "light", color: getRoleColor(bid.role) }, getRoleLabel(bid.role))), /* @__PURE__ */ React140.createElement(Text73, { size: "xs", c: "dimmed" }, "Submitted: ", formatDate(displayDate)), displayStatus === "rejected" && displayReason && /* @__PURE__ */ React140.createElement(Text73, { size: "xs", c: "red" }, "Reason: ", displayReason)), /* @__PURE__ */ React140.createElement(Group44, { gap: "xs" }, displayStatus && /* @__PURE__ */ React140.createElement(Badge19, { size: "sm", color: getStatusColor(displayStatus) }, getStatusLabel(displayStatus)), /* @__PURE__ */ React140.createElement(ActionIcon19, { variant: "subtle", size: "lg", onClick: openBidPanel }, /* @__PURE__ */ React140.createElement(IconArrowRight2, { size: 20 }))));
|
|
13157
13120
|
};
|
|
13158
13121
|
|
|
13159
13122
|
// src/mantine/blocks/bid/flow/hooks/useBids.ts
|
|
@@ -13309,7 +13272,7 @@ var CollectionItem2 = ({ collection, deedId, adminAddress, userRole, onRefresh,
|
|
|
13309
13272
|
return /* @__PURE__ */ React144.createElement(Loader16, { size: "xs" });
|
|
13310
13273
|
}
|
|
13311
13274
|
if (userRole === "PO" /* Owner */) {
|
|
13312
|
-
return /* @__PURE__ */ React144.createElement(ActionIcon20, { variant: "subtle", size: "lg", onClick: openBidsList }, /* @__PURE__ */ React144.createElement(
|
|
13275
|
+
return /* @__PURE__ */ React144.createElement(ActionIcon20, { variant: "subtle", size: "lg", onClick: openBidsList }, /* @__PURE__ */ React144.createElement(IconArrowRight3, { size: 20 }));
|
|
13313
13276
|
} else if (userRole === "SA" /* ServiceProvider */ || userRole === "EA" /* Evaluator */) {
|
|
13314
13277
|
return /* @__PURE__ */ React144.createElement(Badge20, { size: "sm", color: getRoleColor(userRole) }, getRoleLabel(userRole));
|
|
13315
13278
|
} else {
|
|
@@ -13326,7 +13289,7 @@ var CollectionItem2 = ({ collection, deedId, adminAddress, userRole, onRefresh,
|
|
|
13326
13289
|
return /* @__PURE__ */ React144.createElement(UserPlus_default, null);
|
|
13327
13290
|
};
|
|
13328
13291
|
return /* @__PURE__ */ React144.createElement(ListItemContainer, { isChecked: false, onClick: () => {
|
|
13329
|
-
} }, /* @__PURE__ */ React144.createElement(
|
|
13292
|
+
} }, /* @__PURE__ */ React144.createElement(Box29, { mr: "md", style: { display: "flex", alignItems: "center" } }, getCollectionIcon()), /* @__PURE__ */ React144.createElement(Stack102, { gap: 4, style: { flex: 1 } }, /* @__PURE__ */ React144.createElement(Text75, { size: "sm", fw: 500 }, getCollectionName(collection)), collection.description && /* @__PURE__ */ React144.createElement(Text75, { size: "xs", c: "dimmed" }, collection.description)), renderActionButton());
|
|
13330
13293
|
};
|
|
13331
13294
|
|
|
13332
13295
|
// src/mantine/blocks/bid/flow/components/ClaimCollectionsList.tsx
|
|
@@ -13411,7 +13374,7 @@ var BidFlowView = ({ editor, block }) => {
|
|
|
13411
13374
|
if (selectedCollectionIds.length === 0) {
|
|
13412
13375
|
return /* @__PURE__ */ React146.createElement(Center10, { py: "xl" }, /* @__PURE__ */ React146.createElement(Text77, { size: "sm", c: "dimmed" }, "No claim collections selected"));
|
|
13413
13376
|
}
|
|
13414
|
-
return /* @__PURE__ */ React146.createElement(Stack104, { w: "100%" }, /* @__PURE__ */ React146.createElement(
|
|
13377
|
+
return /* @__PURE__ */ React146.createElement(Stack104, { w: "100%" }, /* @__PURE__ */ React146.createElement(Flex25, { px: 5, align: "center", justify: "space-between" }, /* @__PURE__ */ React146.createElement(Title8, { order: 4 }, "Bid Application"), /* @__PURE__ */ React146.createElement(Flex25, { gap: "xs" }, /* @__PURE__ */ React146.createElement(ActionIcon21, { variant: "subtle", size: "sm", onClick: refetch, loading }, /* @__PURE__ */ React146.createElement(IconRefresh4, { size: 18 })), editable && /* @__PURE__ */ React146.createElement(ActionIcon21, { variant: "subtle", size: "sm", onClick: open }, /* @__PURE__ */ React146.createElement(IconSettings5, { size: 18 })))), loading ? /* @__PURE__ */ React146.createElement(Center10, { py: "xl" }, /* @__PURE__ */ React146.createElement(Loader18, { size: "md" })) : error ? /* @__PURE__ */ React146.createElement(Alert19, { color: "red", title: "Failed to load collections", icon: /* @__PURE__ */ React146.createElement(IconAlertCircle5, { size: 18 }) }, /* @__PURE__ */ React146.createElement(Text77, { size: "sm" }, error)) : /* @__PURE__ */ React146.createElement(
|
|
13415
13378
|
ClaimCollectionsList2,
|
|
13416
13379
|
{
|
|
13417
13380
|
collections,
|
|
@@ -13606,7 +13569,7 @@ var EvaluatorTemplateView = ({ editor, block }) => {
|
|
|
13606
13569
|
|
|
13607
13570
|
// src/mantine/blocks/evaluator/flow/FlowView.tsx
|
|
13608
13571
|
import React154, { useMemo as useMemo43 } from "react";
|
|
13609
|
-
import { Stack as Stack108, Text as Text81, Loader as Loader21, Center as Center12, Alert as Alert21, Title as Title10, Flex as
|
|
13572
|
+
import { Stack as Stack108, Text as Text81, Loader as Loader21, Center as Center12, Alert as Alert21, Title as Title10, Flex as Flex26, ActionIcon as ActionIcon24 } from "@mantine/core";
|
|
13610
13573
|
import { IconSettings as IconSettings6, IconRefresh as IconRefresh6, IconAlertCircle as IconAlertCircle7 } from "@tabler/icons-react";
|
|
13611
13574
|
|
|
13612
13575
|
// src/mantine/blocks/evaluator/flow/ClaimCollectionsList.tsx
|
|
@@ -13616,7 +13579,7 @@ import { Stack as Stack107, Text as Text80, ActionIcon as ActionIcon23, Tooltip
|
|
|
13616
13579
|
// src/mantine/blocks/evaluator/flow/ClaimsList.tsx
|
|
13617
13580
|
import React152, { useState as useState54, useEffect as useEffect37, useCallback as useCallback35, useMemo as useMemo41 } from "react";
|
|
13618
13581
|
import { Paper as Paper13, CloseButton as CloseButton6, Title as Title9, Loader as Loader19, Stack as Stack106, Text as Text79, ActionIcon as ActionIcon22, Alert as Alert20, Badge as Badge21, Group as Group46, Button as Button30, Divider as Divider10 } from "@mantine/core";
|
|
13619
|
-
import { IconAlertCircle as IconAlertCircle6, IconArrowRight as
|
|
13582
|
+
import { IconAlertCircle as IconAlertCircle6, IconArrowRight as IconArrowRight4, IconRefresh as IconRefresh5, IconArrowLeft as IconArrowLeft4 } from "@tabler/icons-react";
|
|
13620
13583
|
import { Survey as Survey4, SurveyModel as SurveyModel4 } from "@ixo/surveys";
|
|
13621
13584
|
|
|
13622
13585
|
// src/mantine/blocks/evaluator/flow/theme.ts
|
|
@@ -14071,12 +14034,12 @@ var ClaimListItem = ({ claim, onViewClaim }) => {
|
|
|
14071
14034
|
style: { cursor: "pointer" }
|
|
14072
14035
|
},
|
|
14073
14036
|
/* @__PURE__ */ React152.createElement(ListItemContainer, { isChecked: false, onClick: () => {
|
|
14074
|
-
} }, /* @__PURE__ */ React152.createElement(Stack106, { gap: 4, style: { flex: 1 } }, /* @__PURE__ */ React152.createElement(Text79, { size: "sm", fw: 500 }, "Claim #", claim.claimId.slice(-8)), /* @__PURE__ */ React152.createElement(Text79, { size: "xs", c: "dimmed" }, "Submitted: ", formatDate2(claim.submissionDate || claim.submittedAt)), claim.agentDid && /* @__PURE__ */ React152.createElement(Group46, { gap: 4 }, /* @__PURE__ */ React152.createElement(Text79, { size: "xs", c: "dimmed" }, "Agent: ", loadingProfile ? "Loading..." : displayName), userProfile?.verified && /* @__PURE__ */ React152.createElement(Text79, { size: "xs", c: "blue", fw: 600, title: "Verified user" }, "\u2713"))), /* @__PURE__ */ React152.createElement(Stack106, { gap: 4, align: "flex-end" }, /* @__PURE__ */ React152.createElement(Badge21, { color: claimStatus.color, size: "sm" }, claimStatus.status), /* @__PURE__ */ React152.createElement(ActionIcon22, { variant: "subtle", size: "sm" }, /* @__PURE__ */ React152.createElement(
|
|
14037
|
+
} }, /* @__PURE__ */ React152.createElement(Stack106, { gap: 4, style: { flex: 1 } }, /* @__PURE__ */ React152.createElement(Text79, { size: "sm", fw: 500 }, "Claim #", claim.claimId.slice(-8)), /* @__PURE__ */ React152.createElement(Text79, { size: "xs", c: "dimmed" }, "Submitted: ", formatDate2(claim.submissionDate || claim.submittedAt)), claim.agentDid && /* @__PURE__ */ React152.createElement(Group46, { gap: 4 }, /* @__PURE__ */ React152.createElement(Text79, { size: "xs", c: "dimmed" }, "Agent: ", loadingProfile ? "Loading..." : displayName), userProfile?.verified && /* @__PURE__ */ React152.createElement(Text79, { size: "xs", c: "blue", fw: 600, title: "Verified user" }, "\u2713"))), /* @__PURE__ */ React152.createElement(Stack106, { gap: 4, align: "flex-end" }, /* @__PURE__ */ React152.createElement(Badge21, { color: claimStatus.color, size: "sm" }, claimStatus.status), /* @__PURE__ */ React152.createElement(ActionIcon22, { variant: "subtle", size: "sm" }, /* @__PURE__ */ React152.createElement(IconArrowRight4, { size: 16 }))))
|
|
14075
14038
|
);
|
|
14076
14039
|
};
|
|
14077
14040
|
|
|
14078
14041
|
// src/mantine/blocks/evaluator/flow/ClaimCollectionsList.tsx
|
|
14079
|
-
import { IconArrowRight as
|
|
14042
|
+
import { IconArrowRight as IconArrowRight5 } from "@tabler/icons-react";
|
|
14080
14043
|
var CollectionItem3 = ({ collection, deedId, adminAddress, userRole, onRefresh }) => {
|
|
14081
14044
|
const { getCurrentUser } = useBlocknoteHandlers();
|
|
14082
14045
|
const getCurrentUserRef = useRef7(getCurrentUser);
|
|
@@ -14111,7 +14074,7 @@ var CollectionItem3 = ({ collection, deedId, adminAddress, userRole, onRefresh }
|
|
|
14111
14074
|
openClaimsPanel();
|
|
14112
14075
|
}
|
|
14113
14076
|
};
|
|
14114
|
-
return /* @__PURE__ */ React153.createElement("div", { style: { opacity: canEvaluateClaims ? 1 : 0.5 } }, /* @__PURE__ */ React153.createElement(ListItemContainer, { tooltip: "You need to be an evaluator agent to review claims", onClick: handleClick, disabled: !canEvaluateClaims, isChecked: opened }, /* @__PURE__ */ React153.createElement(Stack107, { gap: 4, style: { flex: 1 } }, /* @__PURE__ */ React153.createElement(Text80, { size: "sm", fw: 500, c: canEvaluateClaims ? void 0 : "dimmed" }, getCollectionName2(collection)), collection.description && /* @__PURE__ */ React153.createElement(Text80, { size: "xs", c: "dimmed" }, collection.description)), /* @__PURE__ */ React153.createElement(Tooltip14, { label: "You need to be an evaluator agent to review claims", disabled: canEvaluateClaims, position: "left", withArrow: true }, /* @__PURE__ */ React153.createElement(ActionIcon23, { variant: "subtle", size: "lg", onClick: handleClick, disabled: !canEvaluateClaims, style: { cursor: canEvaluateClaims ? "pointer" : "not-allowed" } }, /* @__PURE__ */ React153.createElement(
|
|
14077
|
+
return /* @__PURE__ */ React153.createElement("div", { style: { opacity: canEvaluateClaims ? 1 : 0.5 } }, /* @__PURE__ */ React153.createElement(ListItemContainer, { tooltip: "You need to be an evaluator agent to review claims", onClick: handleClick, disabled: !canEvaluateClaims, isChecked: opened }, /* @__PURE__ */ React153.createElement(Stack107, { gap: 4, style: { flex: 1 } }, /* @__PURE__ */ React153.createElement(Text80, { size: "sm", fw: 500, c: canEvaluateClaims ? void 0 : "dimmed" }, getCollectionName2(collection)), collection.description && /* @__PURE__ */ React153.createElement(Text80, { size: "xs", c: "dimmed" }, collection.description)), /* @__PURE__ */ React153.createElement(Tooltip14, { label: "You need to be an evaluator agent to review claims", disabled: canEvaluateClaims, position: "left", withArrow: true }, /* @__PURE__ */ React153.createElement(ActionIcon23, { variant: "subtle", size: "lg", onClick: handleClick, disabled: !canEvaluateClaims, style: { cursor: canEvaluateClaims ? "pointer" : "not-allowed" } }, /* @__PURE__ */ React153.createElement(IconArrowRight5, { size: 20 })))));
|
|
14115
14078
|
};
|
|
14116
14079
|
var ClaimCollectionsList3 = ({ collections, deedId, adminAddress, userAddress, onRefresh }) => {
|
|
14117
14080
|
const { userRoles, loading: loadingRoles } = useUserRoles(collections, userAddress, adminAddress, deedId);
|
|
@@ -14145,7 +14108,7 @@ var EvaluatorFlowView = ({ editor, block }) => {
|
|
|
14145
14108
|
if (selectedCollectionIds.length === 0) {
|
|
14146
14109
|
return /* @__PURE__ */ React154.createElement(Center12, { py: "xl" }, /* @__PURE__ */ React154.createElement(Text81, { size: "sm", c: "dimmed" }, "No claim collections selected"));
|
|
14147
14110
|
}
|
|
14148
|
-
return /* @__PURE__ */ React154.createElement(Stack108, { w: "100%" }, /* @__PURE__ */ React154.createElement(
|
|
14111
|
+
return /* @__PURE__ */ React154.createElement(Stack108, { w: "100%" }, /* @__PURE__ */ React154.createElement(Flex26, { px: 5, align: "center", justify: "space-between" }, /* @__PURE__ */ React154.createElement(Title10, { order: 4 }, "Evaluate Claims"), /* @__PURE__ */ React154.createElement(Flex26, { gap: "xs" }, /* @__PURE__ */ React154.createElement(ActionIcon24, { variant: "subtle", size: "sm", onClick: refetch, loading }, /* @__PURE__ */ React154.createElement(IconRefresh6, { size: 18 })), editable && /* @__PURE__ */ React154.createElement(ActionIcon24, { variant: "subtle", size: "sm" }, /* @__PURE__ */ React154.createElement(IconSettings6, { size: 18 })))), loading ? /* @__PURE__ */ React154.createElement(Center12, { py: "xl" }, /* @__PURE__ */ React154.createElement(Loader21, { size: "md" })) : error ? /* @__PURE__ */ React154.createElement(Alert21, { color: "red", title: "Failed to load collections", icon: /* @__PURE__ */ React154.createElement(IconAlertCircle7, { size: 18 }) }, /* @__PURE__ */ React154.createElement(Text81, { size: "sm" }, error)) : /* @__PURE__ */ React154.createElement(ClaimCollectionsList3, { collections, deedId: did, adminAddress, userAddress, onRefresh: refetch }));
|
|
14149
14112
|
};
|
|
14150
14113
|
|
|
14151
14114
|
// src/mantine/blocks/evaluator/EvaluatorBlock.tsx
|
|
@@ -14187,7 +14150,7 @@ import { createReactBlockSpec as createReactBlockSpec12 } from "@blocknote/react
|
|
|
14187
14150
|
|
|
14188
14151
|
// src/mantine/blocks/visualization/VisualizationBlock.tsx
|
|
14189
14152
|
import React157, { useMemo as useMemo44, useCallback as useCallback36, useRef as useRef8, useState as useState55, useEffect as useEffect39 } from "react";
|
|
14190
|
-
import { Box as
|
|
14153
|
+
import { Box as Box30, Stack as Stack109, Text as Text82, Paper as Paper14, Group as Group47 } from "@mantine/core";
|
|
14191
14154
|
function VisualizationBlock({ block, editor }) {
|
|
14192
14155
|
const { visualizationRenderer } = useBlocknoteContext();
|
|
14193
14156
|
const { vizType, config, title, preferences } = block.props;
|
|
@@ -14242,7 +14205,7 @@ function VisualizationBlock({ block, editor }) {
|
|
|
14242
14205
|
if (visualizationRenderer) {
|
|
14243
14206
|
const renderedContent = visualizationRenderer(vizType, parsedConfig, parsedPreferences, handlePreferencesChange);
|
|
14244
14207
|
if (renderedContent) {
|
|
14245
|
-
return /* @__PURE__ */ React157.createElement(
|
|
14208
|
+
return /* @__PURE__ */ React157.createElement(Box30, { ref: containerRef, w: "100%", miw: 200, mih: 200 }, hasValidDimensions ? renderedContent : null);
|
|
14246
14209
|
}
|
|
14247
14210
|
}
|
|
14248
14211
|
return /* @__PURE__ */ React157.createElement(Paper14, { p: "lg", withBorder: true, radius: "lg", w: "100%" }, /* @__PURE__ */ React157.createElement(Stack109, { gap: "sm" }, /* @__PURE__ */ React157.createElement(Text82, { fz: "18", ta: "center" }, "Visualization Block"), /* @__PURE__ */ React157.createElement(Paper14, { p: "sm", bg: "var(--mantine-color-dark-6)", radius: "sm" }, /* @__PURE__ */ React157.createElement(Stack109, { gap: "xs" }, !title && /* @__PURE__ */ React157.createElement(Group47, { gap: "xs" }, /* @__PURE__ */ React157.createElement(Text82, { size: "xs", c: "dimmed", fw: 500 }, "Title:"), /* @__PURE__ */ React157.createElement(Text82, { size: "xs", c: "white" }, title || "No title")), /* @__PURE__ */ React157.createElement(Group47, { gap: "xs" }, /* @__PURE__ */ React157.createElement(Text82, { size: "xs", c: "dimmed", fw: 500 }, "Type:"), /* @__PURE__ */ React157.createElement(Text82, { size: "xs", c: "white" }, vizType)))), /* @__PURE__ */ React157.createElement(Text82, { c: "dimmed", fz: "sm", fs: "italic", ta: "center" }, "View in a compatible client to see the full visualization.")));
|
|
@@ -15802,7 +15765,7 @@ import React167, { useCallback as useCallback40 } from "react";
|
|
|
15802
15765
|
|
|
15803
15766
|
// src/mantine/blocks/protocolSelector/template/GeneralTab.tsx
|
|
15804
15767
|
import React166, { useEffect as useEffect42, useMemo as useMemo48, useState as useState59 } from "react";
|
|
15805
|
-
import { Divider as Divider11, Stack as Stack113, Text as Text86, PillsInput as PillsInput2, Pill as Pill2, Box as
|
|
15768
|
+
import { Divider as Divider11, Stack as Stack113, Text as Text86, PillsInput as PillsInput2, Pill as Pill2, Box as Box31 } from "@mantine/core";
|
|
15806
15769
|
var GeneralTab10 = ({ title, description, protocolDids, onTitleChange, onDescriptionChange, onProtocolDidsChange }) => {
|
|
15807
15770
|
const [localTitle, setLocalTitle] = useState59(title || "");
|
|
15808
15771
|
const [localDescription, setLocalDescription] = useState59(description || "");
|
|
@@ -15870,7 +15833,7 @@ var GeneralTab10 = ({ title, description, protocolDids, onTitleChange, onDescrip
|
|
|
15870
15833
|
}
|
|
15871
15834
|
}
|
|
15872
15835
|
}
|
|
15873
|
-
))), localDids.length > 0 && /* @__PURE__ */ React166.createElement(
|
|
15836
|
+
))), localDids.length > 0 && /* @__PURE__ */ React166.createElement(Box31, { mt: "xs" }, /* @__PURE__ */ React166.createElement(Text86, { size: "xs", c: "dimmed" }, localDids.length, " protocol", localDids.length !== 1 ? "s" : "", " configured"))));
|
|
15874
15837
|
};
|
|
15875
15838
|
|
|
15876
15839
|
// src/mantine/blocks/protocolSelector/template/TemplateConfig.tsx
|
|
@@ -15913,7 +15876,7 @@ var TemplateConfig10 = ({ editor, block }) => {
|
|
|
15913
15876
|
};
|
|
15914
15877
|
|
|
15915
15878
|
// src/mantine/blocks/protocolSelector/template/TemplateView.tsx
|
|
15916
|
-
import { Box as
|
|
15879
|
+
import { Box as Box32, Group as Group51, Stack as Stack114, Text as Text87 } from "@mantine/core";
|
|
15917
15880
|
import { IconCircleDashed as IconCircleDashed2 } from "@tabler/icons-react";
|
|
15918
15881
|
var PROTOCOL_SELECTOR_TEMPLATE_PANEL_ID = "protocol-selector-template-panel";
|
|
15919
15882
|
var ProtocolSelectorTemplateView = ({ editor, block }) => {
|
|
@@ -15929,7 +15892,7 @@ var ProtocolSelectorTemplateView = ({ editor, block }) => {
|
|
|
15929
15892
|
}
|
|
15930
15893
|
}, [block.props.protocolDids]);
|
|
15931
15894
|
return /* @__PURE__ */ React168.createElement(BaseContainer, { onClick: open }, /* @__PURE__ */ React168.createElement(Group51, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React168.createElement(Group51, { wrap: "nowrap", align: "center", gap: "md" }, /* @__PURE__ */ React168.createElement(
|
|
15932
|
-
|
|
15895
|
+
Box32,
|
|
15933
15896
|
{
|
|
15934
15897
|
style: {
|
|
15935
15898
|
width: 40,
|
|
@@ -15947,12 +15910,12 @@ var ProtocolSelectorTemplateView = ({ editor, block }) => {
|
|
|
15947
15910
|
|
|
15948
15911
|
// src/mantine/blocks/protocolSelector/flow/FlowView.tsx
|
|
15949
15912
|
import React171, { useMemo as useMemo51 } from "react";
|
|
15950
|
-
import { Badge as Badge24, Box as
|
|
15913
|
+
import { Badge as Badge24, Box as Box34, Group as Group53, Stack as Stack116, Text as Text89, Tooltip as Tooltip16 } from "@mantine/core";
|
|
15951
15914
|
import { IconCircleDashed as IconCircleDashed3, IconChecks } from "@tabler/icons-react";
|
|
15952
15915
|
|
|
15953
15916
|
// src/mantine/blocks/protocolSelector/flow/ProtocolSelectionPanel.tsx
|
|
15954
15917
|
import React170, { useState as useState60, useEffect as useEffect43, useMemo as useMemo50, useCallback as useCallback41 } from "react";
|
|
15955
|
-
import { Paper as Paper16, CloseButton as CloseButton9, Stack as Stack115, Text as Text88, Box as
|
|
15918
|
+
import { Paper as Paper16, CloseButton as CloseButton9, Stack as Stack115, Text as Text88, Box as Box33, Group as Group52, Loader as Loader23 } from "@mantine/core";
|
|
15956
15919
|
|
|
15957
15920
|
// src/icons/EntityAvatar.tsx
|
|
15958
15921
|
import React169 from "react";
|
|
@@ -16087,10 +16050,10 @@ var ProtocolSelectionPanel = ({ editor, block }) => {
|
|
|
16087
16050
|
}
|
|
16088
16051
|
},
|
|
16089
16052
|
/* @__PURE__ */ React170.createElement(Group52, { justify: "space-between", align: "center", mb: "xl" }, /* @__PURE__ */ React170.createElement(Text88, { fz: 16, fw: 600 }, block.props.title || "Select Protocol"), /* @__PURE__ */ React170.createElement(CloseButton9, { onClick: closePanel })),
|
|
16090
|
-
/* @__PURE__ */ React170.createElement(Stack115, { gap: "sm", style: { flex: 1, overflow: "auto" } }, protocols.length === 0 ? /* @__PURE__ */ React170.createElement(
|
|
16053
|
+
/* @__PURE__ */ React170.createElement(Stack115, { gap: "sm", style: { flex: 1, overflow: "auto" } }, protocols.length === 0 ? /* @__PURE__ */ React170.createElement(Box33, { py: "md" }, /* @__PURE__ */ React170.createElement(Text88, { c: "dimmed", ta: "center" }, "No protocols configured.", /* @__PURE__ */ React170.createElement("br", null), "Add protocol DIDs in template mode.")) : protocols.map((protocol) => {
|
|
16091
16054
|
const isSelected = protocol.did === selectedDid;
|
|
16092
16055
|
return /* @__PURE__ */ React170.createElement(
|
|
16093
|
-
|
|
16056
|
+
Box33,
|
|
16094
16057
|
{
|
|
16095
16058
|
key: protocol.did,
|
|
16096
16059
|
onClick: () => !protocol.loading && handleSelectProtocol(protocol),
|
|
@@ -16125,7 +16088,7 @@ var ProtocolSelectorFlowView = ({ editor, block, isDisabled }) => {
|
|
|
16125
16088
|
open();
|
|
16126
16089
|
};
|
|
16127
16090
|
const containerContent = /* @__PURE__ */ React171.createElement(BaseContainer, { onClick: disabled ? void 0 : handleClick }, /* @__PURE__ */ React171.createElement(Group53, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React171.createElement(Group53, { wrap: "nowrap", align: "center", gap: "md" }, /* @__PURE__ */ React171.createElement(
|
|
16128
|
-
|
|
16091
|
+
Box34,
|
|
16129
16092
|
{
|
|
16130
16093
|
style: {
|
|
16131
16094
|
display: "flex",
|
|
@@ -16137,7 +16100,7 @@ var ProtocolSelectorFlowView = ({ editor, block, isDisabled }) => {
|
|
|
16137
16100
|
/* @__PURE__ */ React171.createElement(IconCircleDashed3, { size: 26, color: "white" })
|
|
16138
16101
|
), /* @__PURE__ */ React171.createElement(Stack116, { gap: 2, style: { flex: 1 } }, /* @__PURE__ */ React171.createElement(Text89, { fw: 500, size: "sm", lineClamp: 1, style: { opacity: disabled ? 0.5 : 1 } }, block.props.title || "Select Protocol"), isCompleted && block.props.selectedProtocolType ? /* @__PURE__ */ React171.createElement(Badge24, { size: "sm", styles: { root: { backgroundColor: "var(--mantine-primary-color-light)", color: "var(--mantine-primary-color-filled)" } } }, block.props.selectedProtocolType) : /* @__PURE__ */ React171.createElement(Text89, { size: "xs", c: "dimmed", style: { opacity: disabled ? 0.5 : 1 } }, "Selection"))), /* @__PURE__ */ React171.createElement(Stack116, { gap: 2, align: "flex-end" }, isCompleted ? /* @__PURE__ */ React171.createElement(React171.Fragment, null, /* @__PURE__ */ React171.createElement(Group53, { gap: 4 }, /* @__PURE__ */ React171.createElement(IconChecks, { size: 16, color: "var(--mantine-color-green-4)" }), /* @__PURE__ */ React171.createElement(Text89, { size: "sm", c: "green.4", fw: 500 }, "Completed")), /* @__PURE__ */ React171.createElement(Text89, { size: "xs", c: "dimmed", lineClamp: 1 }, block.props.selectedProtocolName || block.props.selectedProtocolDid)) : /* @__PURE__ */ React171.createElement(React171.Fragment, null, /* @__PURE__ */ React171.createElement(Text89, { size: "sm" }, "Pending"), /* @__PURE__ */ React171.createElement(Text89, { size: "xs", c: "dimmed" }, "Complete now")))));
|
|
16139
16102
|
if (disabled && isDisabled?.message) {
|
|
16140
|
-
return /* @__PURE__ */ React171.createElement(Tooltip16, { label: isDisabled.message, position: "top", withArrow: true }, /* @__PURE__ */ React171.createElement(
|
|
16103
|
+
return /* @__PURE__ */ React171.createElement(Tooltip16, { label: isDisabled.message, position: "top", withArrow: true }, /* @__PURE__ */ React171.createElement(Box34, { style: { cursor: "not-allowed" } }, containerContent));
|
|
16141
16104
|
}
|
|
16142
16105
|
return containerContent;
|
|
16143
16106
|
};
|
|
@@ -16744,14 +16707,14 @@ var DomainCreatorSignTemplateView = ({ editor, block }) => {
|
|
|
16744
16707
|
};
|
|
16745
16708
|
|
|
16746
16709
|
// src/mantine/blocks/domainCreatorSign/flow/FlowView.tsx
|
|
16747
|
-
import React185, { useCallback as useCallback47, useMemo as useMemo56 } from "react";
|
|
16710
|
+
import React185, { useCallback as useCallback47, useMemo as useMemo56, useEffect as useEffect47 } from "react";
|
|
16748
16711
|
import { ActionIcon as ActionIcon27, Badge as Badge28, Group as Group59, Stack as Stack122, Text as Text96, Tooltip as Tooltip18 } from "@mantine/core";
|
|
16749
16712
|
import { IconChevronRight as IconChevronRight8 } from "@tabler/icons-react";
|
|
16750
16713
|
|
|
16751
16714
|
// src/mantine/blocks/domainCreatorSign/flow/SignPanel.tsx
|
|
16752
|
-
import React184, { useCallback as useCallback46, useState as useState64 } from "react";
|
|
16753
16715
|
import { Alert as Alert24, Button as Button32, CloseButton as CloseButton13, Group as Group58, Loader as Loader24, Stack as Stack121, Text as Text95, Title as Title16 } from "@mantine/core";
|
|
16754
16716
|
import { IconAlertCircle as IconAlertCircle11, IconCheck as IconCheck5, IconSignature } from "@tabler/icons-react";
|
|
16717
|
+
import React184, { useCallback as useCallback46, useState as useState64 } from "react";
|
|
16755
16718
|
var SignPanel = ({ editor, block, onComplete, onError }) => {
|
|
16756
16719
|
const { closePanel } = usePanelStore();
|
|
16757
16720
|
const { handlers } = useBlocknoteContext();
|
|
@@ -16765,6 +16728,11 @@ var SignPanel = ({ editor, block, onComplete, onError }) => {
|
|
|
16765
16728
|
return null;
|
|
16766
16729
|
}
|
|
16767
16730
|
}, [block.props.domainCardData]);
|
|
16731
|
+
const getDate100YearsFromNow = useCallback46(() => {
|
|
16732
|
+
const date = /* @__PURE__ */ new Date();
|
|
16733
|
+
date.setFullYear(date.getFullYear() + 100);
|
|
16734
|
+
return date.toISOString();
|
|
16735
|
+
}, []);
|
|
16768
16736
|
const processSignAndCreate = useCallback46(async () => {
|
|
16769
16737
|
if (!handlers) {
|
|
16770
16738
|
throw new Error("Handlers not available");
|
|
@@ -16782,25 +16750,30 @@ var SignPanel = ({ editor, block, onComplete, onError }) => {
|
|
|
16782
16750
|
throw new Error("requestPin handler not available");
|
|
16783
16751
|
}
|
|
16784
16752
|
const domainCardData2 = getDomainCardData();
|
|
16785
|
-
if (!domainCardData2 || !domainCardData2.name) {
|
|
16753
|
+
if (!domainCardData2 || !domainCardData2.credentialSubject?.name) {
|
|
16786
16754
|
throw new Error("Domain card data is missing or invalid");
|
|
16787
16755
|
}
|
|
16788
|
-
const
|
|
16756
|
+
const extractEntityType = (type) => {
|
|
16757
|
+
return type.replace(/^schema:/i, "").toLowerCase();
|
|
16758
|
+
};
|
|
16759
|
+
const entityType = block.props.entityType || (domainCardData2.credentialSubject?.type?.[0] ? extractEntityType(domainCardData2.credentialSubject.type[0]) : "dao");
|
|
16789
16760
|
const issuerDid = handlers.getEntityDid?.() || handlers.getCurrentUser?.()?.address;
|
|
16790
16761
|
if (!issuerDid) {
|
|
16791
16762
|
throw new Error("Unable to determine issuer DID");
|
|
16792
16763
|
}
|
|
16793
16764
|
const entityDid = "did:ixo:entity:pending";
|
|
16765
|
+
const validFrom = domainCardData2.validFrom || (/* @__PURE__ */ new Date()).toISOString();
|
|
16766
|
+
const validUntil = domainCardData2.validUntil || getDate100YearsFromNow();
|
|
16794
16767
|
const credentialSubject = {
|
|
16795
|
-
...domainCardData2,
|
|
16768
|
+
...domainCardData2.credentialSubject,
|
|
16796
16769
|
id: entityDid
|
|
16797
16770
|
};
|
|
16798
16771
|
const unsignedCredential = buildVerifiableCredential({
|
|
16799
16772
|
entityDid,
|
|
16800
16773
|
issuerDid,
|
|
16801
16774
|
credentialSubject,
|
|
16802
|
-
validFrom
|
|
16803
|
-
validUntil
|
|
16775
|
+
validFrom,
|
|
16776
|
+
validUntil
|
|
16804
16777
|
});
|
|
16805
16778
|
setFlowStep("signing");
|
|
16806
16779
|
editor.updateBlock(block, { props: { ...block.props, status: "signing" } });
|
|
@@ -16828,22 +16801,23 @@ var SignPanel = ({ editor, block, onComplete, onError }) => {
|
|
|
16828
16801
|
entityDid,
|
|
16829
16802
|
cid: uploadResult.cid,
|
|
16830
16803
|
serviceEndpoint: uploadResult.url,
|
|
16831
|
-
description: `Domain Card for ${domainCardData2.name || "Domain"}`
|
|
16804
|
+
description: `Domain Card for ${domainCardData2.credentialSubject?.name || "Domain"}`
|
|
16832
16805
|
});
|
|
16833
16806
|
setFlowStep("creating");
|
|
16834
16807
|
editor.updateBlock(block, { props: { ...block.props, status: "creating" } });
|
|
16808
|
+
const endDate = domainCardData2.endDate || validUntil;
|
|
16835
16809
|
const { entityDid: newEntityDid, transactionHash } = await handlers.createDomain({
|
|
16836
16810
|
entityType,
|
|
16837
16811
|
linkedResource: [domainCardLinkedResource],
|
|
16838
|
-
startDate:
|
|
16839
|
-
endDate
|
|
16812
|
+
startDate: validFrom,
|
|
16813
|
+
endDate
|
|
16840
16814
|
});
|
|
16841
16815
|
return {
|
|
16842
16816
|
entityDid: newEntityDid,
|
|
16843
16817
|
entityType,
|
|
16844
16818
|
transactionHash
|
|
16845
16819
|
};
|
|
16846
|
-
}, [handlers, getDomainCardData, block, editor]);
|
|
16820
|
+
}, [handlers, getDomainCardData, block, editor, getDate100YearsFromNow]);
|
|
16847
16821
|
const handleSign = useCallback46(async () => {
|
|
16848
16822
|
try {
|
|
16849
16823
|
const result = await processSignAndCreate();
|
|
@@ -16893,13 +16867,34 @@ var SignPanel = ({ editor, block, onComplete, onError }) => {
|
|
|
16893
16867
|
return /* @__PURE__ */ React184.createElement(Stack121, { gap: "md", p: "md" }, /* @__PURE__ */ React184.createElement(Group58, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React184.createElement(Title16, { order: 5 }, block.props.title || "Sign to Create"), /* @__PURE__ */ React184.createElement(CloseButton13, { onClick: handleClose, title: "Close panel" })), /* @__PURE__ */ React184.createElement(Alert24, { icon: /* @__PURE__ */ React184.createElement(IconAlertCircle11, { size: 16 }), title: "Domain Creation Failed", color: "red" }, /* @__PURE__ */ React184.createElement(Text95, { size: "sm" }, error || "An unexpected error occurred")), /* @__PURE__ */ React184.createElement(Group58, null, /* @__PURE__ */ React184.createElement(Button32, { variant: "outline", onClick: handleRetry }, "Try Again"), /* @__PURE__ */ React184.createElement(Button32, { variant: "subtle", onClick: handleClose }, "Close")));
|
|
16894
16868
|
}
|
|
16895
16869
|
const domainCardData = getDomainCardData();
|
|
16896
|
-
return /* @__PURE__ */ React184.createElement(Stack121, { gap: "md", p: "md" }, /* @__PURE__ */ React184.createElement(Group58, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React184.createElement(Stack121, { gap: 4 }, /* @__PURE__ */ React184.createElement(Title16, { order: 5 }, block.props.title || "Sign to Create"), /* @__PURE__ */ React184.createElement(Text95, { size: "sm", c: "dimmed" }, "Review and sign to create your domain.")), /* @__PURE__ */ React184.createElement(CloseButton13, { onClick: handleClose, title: "Close panel" })), /* @__PURE__ */ React184.createElement(Stack121, { gap: "xs", p: "md", style: { backgroundColor: "var(--mantine-color-dark-6)", borderRadius: 8 } }, /* @__PURE__ */ React184.createElement(Text95, { fw: 600, size: "sm" }, "Domain Card Summary"), /* @__PURE__ */ React184.createElement(Group58, { gap: "xs" }, /* @__PURE__ */ React184.createElement(Text95, { size: "xs", c: "dimmed", style: { width: 80 } }, "Name:"), /* @__PURE__ */ React184.createElement(Text95, { size: "xs" }, domainCardData?.name || "Not set")), /* @__PURE__ */ React184.createElement(Group58, { gap: "xs" }, /* @__PURE__ */ React184.createElement(Text95, { size: "xs", c: "dimmed", style: { width: 80 } }, "Type:"), /* @__PURE__ */ React184.createElement(Text95, { size: "xs" }, block.props.entityType || domainCardData?.type?.[0]
|
|
16870
|
+
return /* @__PURE__ */ React184.createElement(Stack121, { gap: "md", p: "md" }, /* @__PURE__ */ React184.createElement(Group58, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React184.createElement(Stack121, { gap: 4 }, /* @__PURE__ */ React184.createElement(Title16, { order: 5 }, block.props.title || "Sign to Create"), /* @__PURE__ */ React184.createElement(Text95, { size: "sm", c: "dimmed" }, "Review and sign to create your domain.")), /* @__PURE__ */ React184.createElement(CloseButton13, { onClick: handleClose, title: "Close panel" })), /* @__PURE__ */ React184.createElement(Stack121, { gap: "xs", p: "md", style: { backgroundColor: "var(--mantine-color-dark-6)", borderRadius: 8 } }, /* @__PURE__ */ React184.createElement(Text95, { fw: 600, size: "sm" }, "Domain Card Summary"), /* @__PURE__ */ React184.createElement(Group58, { gap: "xs" }, /* @__PURE__ */ React184.createElement(Text95, { size: "xs", c: "dimmed", style: { width: 80 } }, "Name:"), /* @__PURE__ */ React184.createElement(Text95, { size: "xs" }, domainCardData?.credentialSubject?.name || "Not set")), /* @__PURE__ */ React184.createElement(Group58, { gap: "xs" }, /* @__PURE__ */ React184.createElement(Text95, { size: "xs", c: "dimmed", style: { width: 80 } }, "Type:"), /* @__PURE__ */ React184.createElement(Text95, { size: "xs" }, block.props.entityType || (domainCardData?.credentialSubject?.type?.[0]?.replace(/^schema:/i, "").toLowerCase() ?? "dao"))), domainCardData?.credentialSubject?.description && /* @__PURE__ */ React184.createElement(Group58, { gap: "xs", align: "flex-start" }, /* @__PURE__ */ React184.createElement(Text95, { size: "xs", c: "dimmed", style: { width: 80 } }, "Description:"), /* @__PURE__ */ React184.createElement(Text95, { size: "xs", lineClamp: 2, style: { flex: 1 } }, domainCardData.credentialSubject.description))), /* @__PURE__ */ React184.createElement(Button32, { leftSection: /* @__PURE__ */ React184.createElement(IconSignature, { size: 18 }), onClick: handleSign, fullWidth: true }, "Sign & Create Domain"));
|
|
16897
16871
|
};
|
|
16898
16872
|
|
|
16899
16873
|
// src/mantine/blocks/domainCreatorSign/flow/FlowView.tsx
|
|
16900
16874
|
var DOMAIN_CREATOR_SIGN_FLOW_PANEL_ID = "domain-creator-sign-flow-panel";
|
|
16875
|
+
function isDomainCardDataReady(domainCardData) {
|
|
16876
|
+
if (!domainCardData || domainCardData === "{}") return false;
|
|
16877
|
+
try {
|
|
16878
|
+
const parsed = JSON.parse(domainCardData);
|
|
16879
|
+
return Boolean(parsed && typeof parsed === "object" && parsed.name);
|
|
16880
|
+
} catch {
|
|
16881
|
+
return false;
|
|
16882
|
+
}
|
|
16883
|
+
}
|
|
16901
16884
|
var DomainCreatorSignFlowView = ({ editor, block }) => {
|
|
16902
16885
|
const status = block.props.status || "pending";
|
|
16886
|
+
const domainCardData = block.props.domainCardData || "{}";
|
|
16887
|
+
const isDataReady = isDomainCardDataReady(domainCardData);
|
|
16888
|
+
useEffect47(() => {
|
|
16889
|
+
if (status === "pending" && isDataReady) {
|
|
16890
|
+
editor.updateBlock(block, {
|
|
16891
|
+
props: {
|
|
16892
|
+
...block.props,
|
|
16893
|
+
status: "ready"
|
|
16894
|
+
}
|
|
16895
|
+
});
|
|
16896
|
+
}
|
|
16897
|
+
}, [isDataReady, status, editor, block]);
|
|
16903
16898
|
const handleComplete = useCallback47(
|
|
16904
16899
|
(result) => {
|
|
16905
16900
|
editor.updateBlock(block, {
|
|
@@ -16960,7 +16955,7 @@ var DomainCreatorSignFlowView = ({ editor, block }) => {
|
|
|
16960
16955
|
case "ready":
|
|
16961
16956
|
return "Click to sign and create the domain";
|
|
16962
16957
|
default:
|
|
16963
|
-
return "Waiting for domain data
|
|
16958
|
+
return "Waiting for domain card data";
|
|
16964
16959
|
}
|
|
16965
16960
|
};
|
|
16966
16961
|
return /* @__PURE__ */ React185.createElement(BaseContainer, { onClick: isClickable ? handleOpen : void 0, style: { opacity: isClickable ? 1 : 0.7, cursor: isClickable ? "pointer" : "not-allowed" } }, /* @__PURE__ */ React185.createElement(Group59, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React185.createElement(Group59, { wrap: "nowrap", align: "center", style: { flex: 1 } }, getIcon("feather", block.props.icon), /* @__PURE__ */ React185.createElement(Stack122, { gap: 4, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React185.createElement(Group59, { gap: "xs", align: "center" }, /* @__PURE__ */ React185.createElement(Text96, { fw: 600, size: "sm" }, block.props.title || "Sign to Create"), /* @__PURE__ */ React185.createElement(Badge28, { size: "xs", variant: "filled", color: badgeProps.color, styles: { root: { backgroundColor: `var(--mantine-color-${badgeProps.color}-6)`, color: "white" } } }, badgeProps.text)), /* @__PURE__ */ React185.createElement(Text96, { size: "xs", c: "dimmed", lineClamp: 2 }, getDescriptionText()))), isClickable && /* @__PURE__ */ React185.createElement(Tooltip18, { label: status === "completed" ? "View details" : "Sign & Create", withArrow: true }, /* @__PURE__ */ React185.createElement(ActionIcon27, { variant: "subtle", color: "blue" }, /* @__PURE__ */ React185.createElement(IconChevronRight8, { size: 18 })))));
|
|
@@ -17022,14 +17017,14 @@ import React189, { useCallback as useCallback48 } from "react";
|
|
|
17022
17017
|
import { Paper as Paper19, CloseButton as CloseButton14, Title as Title17 } from "@mantine/core";
|
|
17023
17018
|
|
|
17024
17019
|
// src/mantine/blocks/domainCardViewer/template/GeneralTab.tsx
|
|
17025
|
-
import React188, { useEffect as
|
|
17020
|
+
import React188, { useEffect as useEffect48, useState as useState65 } from "react";
|
|
17026
17021
|
var GeneralTab13 = ({ title, description, icon, onTitleChange, onDescriptionChange, onIconChange }) => {
|
|
17027
17022
|
const [localTitle, setLocalTitle] = useState65(title || "");
|
|
17028
17023
|
const [localDescription, setLocalDescription] = useState65(description || "");
|
|
17029
17024
|
const [localIcon, setLocalIcon] = useState65(icon || "dots-circle");
|
|
17030
|
-
|
|
17031
|
-
|
|
17032
|
-
|
|
17025
|
+
useEffect48(() => setLocalTitle(title || ""), [title]);
|
|
17026
|
+
useEffect48(() => setLocalDescription(description || ""), [description]);
|
|
17027
|
+
useEffect48(() => setLocalIcon(icon || "dots-circle"), [icon]);
|
|
17033
17028
|
return /* @__PURE__ */ React188.createElement(BaseSection, null, /* @__PURE__ */ React188.createElement(
|
|
17034
17029
|
BaseTextInput,
|
|
17035
17030
|
{
|
|
@@ -17145,13 +17140,13 @@ var DomainCardViewerTemplateView = ({ editor, block }) => {
|
|
|
17145
17140
|
};
|
|
17146
17141
|
|
|
17147
17142
|
// src/mantine/blocks/domainCardViewer/flow/FlowView.tsx
|
|
17148
|
-
import React192, { useMemo as useMemo59, useCallback as useCallback49, useEffect as
|
|
17143
|
+
import React192, { useMemo as useMemo59, useCallback as useCallback49, useEffect as useEffect49 } from "react";
|
|
17149
17144
|
import { ActionIcon as ActionIcon28, Badge as Badge30, Button as Button34, Group as Group61, Stack as Stack125, Text as Text99, Tooltip as Tooltip19 } from "@mantine/core";
|
|
17150
17145
|
import { IconChevronRight as IconChevronRight9, IconLoader, IconTestPipe, IconTrash as IconTrash5 } from "@tabler/icons-react";
|
|
17151
17146
|
|
|
17152
17147
|
// src/mantine/blocks/domainCardViewer/flow/ViewerPanel.tsx
|
|
17153
17148
|
import React191, { useMemo as useMemo58 } from "react";
|
|
17154
|
-
import { Paper as Paper20, CloseButton as CloseButton15, Title as Title18, Stack as Stack124, Text as Text98, Loader as Loader25, Alert as Alert25, Button as Button33, Box as
|
|
17149
|
+
import { Paper as Paper20, CloseButton as CloseButton15, Title as Title18, Stack as Stack124, Text as Text98, Loader as Loader25, Alert as Alert25, Button as Button33, Box as Box35, ScrollArea as ScrollArea6, Code as Code6 } from "@mantine/core";
|
|
17155
17150
|
import { IconAlertCircle as IconAlertCircle12, IconCheck as IconCheck6, IconSparkles as IconSparkles3 } from "@tabler/icons-react";
|
|
17156
17151
|
function parsePreviewData(jsonString) {
|
|
17157
17152
|
if (!jsonString || jsonString === "{}") return null;
|
|
@@ -17162,7 +17157,7 @@ function parsePreviewData(jsonString) {
|
|
|
17162
17157
|
}
|
|
17163
17158
|
}
|
|
17164
17159
|
var JsonViewer = ({ data }) => {
|
|
17165
|
-
return /* @__PURE__ */ React191.createElement(ScrollArea6, { h: "100%", offsetScrollbars: true }, /* @__PURE__ */ React191.createElement(Stack124, { gap: "md" }, data.name && /* @__PURE__ */ React191.createElement(
|
|
17160
|
+
return /* @__PURE__ */ React191.createElement(ScrollArea6, { h: "100%", offsetScrollbars: true }, /* @__PURE__ */ React191.createElement(Stack124, { gap: "md" }, data.name && /* @__PURE__ */ React191.createElement(Box35, null, /* @__PURE__ */ React191.createElement(Text98, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Name"), /* @__PURE__ */ React191.createElement(Text98, { size: "lg", fw: 600 }, data.name)), data.summary && /* @__PURE__ */ React191.createElement(Box35, null, /* @__PURE__ */ React191.createElement(Text98, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Summary"), /* @__PURE__ */ React191.createElement(Text98, { size: "sm" }, data.summary)), data.description && /* @__PURE__ */ React191.createElement(Box35, null, /* @__PURE__ */ React191.createElement(Text98, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Description"), /* @__PURE__ */ React191.createElement(Text98, { size: "sm" }, data.description)), data.entity_type && data.entity_type.length > 0 && /* @__PURE__ */ React191.createElement(Box35, null, /* @__PURE__ */ React191.createElement(Text98, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Type"), /* @__PURE__ */ React191.createElement(Text98, { size: "sm" }, data.entity_type.join(", "))), data.keywords && data.keywords.length > 0 && /* @__PURE__ */ React191.createElement(Box35, null, /* @__PURE__ */ React191.createElement(Text98, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Keywords"), /* @__PURE__ */ React191.createElement(Text98, { size: "sm" }, data.keywords.join(", "))), data.faq && data.faq.length > 0 && /* @__PURE__ */ React191.createElement(Box35, null, /* @__PURE__ */ React191.createElement(Text98, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600, mb: "xs" }, "FAQ"), /* @__PURE__ */ React191.createElement(Stack124, { gap: "sm" }, data.faq.map((item, index) => /* @__PURE__ */ React191.createElement(Box35, { key: index, p: "sm", style: { borderRadius: 8, backgroundColor: "var(--mantine-color-dark-6)" } }, /* @__PURE__ */ React191.createElement(Text98, { size: "sm", fw: 500, mb: 4 }, item.question), /* @__PURE__ */ React191.createElement(Text98, { size: "xs", c: "dimmed" }, item.answer))))), /* @__PURE__ */ React191.createElement(Box35, null, /* @__PURE__ */ React191.createElement(Text98, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600, mb: "xs" }, "Raw Data"), /* @__PURE__ */ React191.createElement(Code6, { block: true, style: { fontSize: 11, maxHeight: 200, overflow: "auto" } }, JSON.stringify(data, null, 2)))));
|
|
17166
17161
|
};
|
|
17167
17162
|
var ViewerPanel = ({ block, onApprove }) => {
|
|
17168
17163
|
const { closePanel } = usePanelStore();
|
|
@@ -17201,7 +17196,7 @@ var ViewerPanel = ({ block, onApprove }) => {
|
|
|
17201
17196
|
/* @__PURE__ */ React191.createElement(Title18, { order: 5 }, block.props.title || "Domain Card"),
|
|
17202
17197
|
/* @__PURE__ */ React191.createElement(CloseButton15, { onClick: closePanel })
|
|
17203
17198
|
),
|
|
17204
|
-
/* @__PURE__ */ React191.createElement(
|
|
17199
|
+
/* @__PURE__ */ React191.createElement(Box35, { style: { flex: 1, overflow: "hidden", display: "flex", flexDirection: "column" } }, isLoading && /* @__PURE__ */ React191.createElement(Stack124, { align: "center", justify: "center", style: { flex: 1 }, gap: "md" }, /* @__PURE__ */ React191.createElement(Loader25, { size: "lg", color: "blue" }), /* @__PURE__ */ React191.createElement(Stack124, { align: "center", gap: "xs" }, /* @__PURE__ */ React191.createElement(IconSparkles3, { size: 24, color: "var(--mantine-color-blue-5)" }), /* @__PURE__ */ React191.createElement(Text98, { size: "sm", c: "dimmed", ta: "center" }, loadingMessage))), isError && /* @__PURE__ */ React191.createElement(Stack124, { style: { flex: 1 }, gap: "md" }, /* @__PURE__ */ React191.createElement(Alert25, { icon: /* @__PURE__ */ React191.createElement(IconAlertCircle12, { size: 16 }), title: "Error", color: "red", variant: "light" }, errorMessage), /* @__PURE__ */ React191.createElement(Text98, { size: "sm", c: "dimmed", ta: "center" }, "Please ask the oracle to try again.")), (isReady || isApproved) && hasData && /* @__PURE__ */ React191.createElement(Box35, { style: { flex: 1, overflow: "hidden" } }, domainCardRenderer ? (
|
|
17205
17200
|
// Use custom renderer from web app
|
|
17206
17201
|
/* @__PURE__ */ React191.createElement(ScrollArea6, { h: "100%", offsetScrollbars: true }, domainCardRenderer(domainPreviewData))
|
|
17207
17202
|
) : (
|
|
@@ -17209,7 +17204,7 @@ var ViewerPanel = ({ block, onApprove }) => {
|
|
|
17209
17204
|
/* @__PURE__ */ React191.createElement(JsonViewer, { data: domainPreviewData })
|
|
17210
17205
|
)), !isLoading && !isError && !hasData && /* @__PURE__ */ React191.createElement(Stack124, { align: "center", justify: "center", style: { flex: 1 }, gap: "md" }, /* @__PURE__ */ React191.createElement(Text98, { size: "sm", c: "dimmed", ta: "center" }, "No domain data available yet."))),
|
|
17211
17206
|
isReady && hasData && /* @__PURE__ */ React191.createElement(
|
|
17212
|
-
|
|
17207
|
+
Box35,
|
|
17213
17208
|
{
|
|
17214
17209
|
pt: "md",
|
|
17215
17210
|
mt: "md",
|
|
@@ -17223,7 +17218,7 @@ var ViewerPanel = ({ block, onApprove }) => {
|
|
|
17223
17218
|
/* @__PURE__ */ React191.createElement(Button33, { fullWidth: true, color: "teal", leftSection: /* @__PURE__ */ React191.createElement(IconCheck6, { size: 16 }), onClick: onApprove }, "Approve")
|
|
17224
17219
|
),
|
|
17225
17220
|
isApproved && /* @__PURE__ */ React191.createElement(
|
|
17226
|
-
|
|
17221
|
+
Box35,
|
|
17227
17222
|
{
|
|
17228
17223
|
pt: "md",
|
|
17229
17224
|
mt: "md",
|
|
@@ -17456,45 +17451,11 @@ function isPreviewDataReady(domainPreviewData) {
|
|
|
17456
17451
|
return false;
|
|
17457
17452
|
}
|
|
17458
17453
|
}
|
|
17459
|
-
function isDomainCardDataReady(domainCardData) {
|
|
17460
|
-
if (!domainCardData || domainCardData === "{}") return false;
|
|
17461
|
-
try {
|
|
17462
|
-
const parsed = JSON.parse(domainCardData);
|
|
17463
|
-
return Boolean(parsed && typeof parsed === "object" && parsed.name);
|
|
17464
|
-
} catch {
|
|
17465
|
-
return false;
|
|
17466
|
-
}
|
|
17467
|
-
}
|
|
17468
|
-
function syncToDomainCreatorSignBlocks(editor, domainCardData, isApproved) {
|
|
17469
|
-
const allBlocks = editor.document;
|
|
17470
|
-
for (const docBlock of allBlocks) {
|
|
17471
|
-
if (docBlock.type === "domainCreatorSign") {
|
|
17472
|
-
const currentStatus = docBlock.props.status;
|
|
17473
|
-
if (currentStatus === "completed" || currentStatus === "signing" || currentStatus === "uploading" || currentStatus === "creating") {
|
|
17474
|
-
continue;
|
|
17475
|
-
}
|
|
17476
|
-
const newStatus = isApproved && isDomainCardDataReady(domainCardData) ? "ready" : "pending";
|
|
17477
|
-
if (docBlock.props.domainCardData !== domainCardData || docBlock.props.status !== newStatus) {
|
|
17478
|
-
editor.updateBlock(docBlock, {
|
|
17479
|
-
props: {
|
|
17480
|
-
...docBlock.props,
|
|
17481
|
-
domainCardData,
|
|
17482
|
-
status: newStatus
|
|
17483
|
-
}
|
|
17484
|
-
});
|
|
17485
|
-
}
|
|
17486
|
-
}
|
|
17487
|
-
}
|
|
17488
|
-
}
|
|
17489
17454
|
var DomainCardViewerFlowView = ({ editor, block }) => {
|
|
17490
17455
|
const status = block.props.status || "pending";
|
|
17491
17456
|
const domainPreviewData = block.props.domainPreviewData || "{}";
|
|
17492
|
-
const domainCardData = block.props.domainCardData || "{}";
|
|
17493
17457
|
const isDataReady = isPreviewDataReady(domainPreviewData);
|
|
17494
|
-
|
|
17495
|
-
const prevDomainCardDataRef = useRef11(domainCardData);
|
|
17496
|
-
const prevStatusRef = useRef11(status);
|
|
17497
|
-
useEffect48(() => {
|
|
17458
|
+
useEffect49(() => {
|
|
17498
17459
|
if (status === "pending" && isDataReady) {
|
|
17499
17460
|
editor.updateBlock(block, {
|
|
17500
17461
|
props: {
|
|
@@ -17504,15 +17465,6 @@ var DomainCardViewerFlowView = ({ editor, block }) => {
|
|
|
17504
17465
|
});
|
|
17505
17466
|
}
|
|
17506
17467
|
}, [isDataReady, status, editor, block]);
|
|
17507
|
-
useEffect48(() => {
|
|
17508
|
-
const dataChanged = prevDomainCardDataRef.current !== domainCardData;
|
|
17509
|
-
const statusChanged = prevStatusRef.current !== status;
|
|
17510
|
-
if (dataChanged || statusChanged) {
|
|
17511
|
-
syncToDomainCreatorSignBlocks(editor, domainCardData, isApproved);
|
|
17512
|
-
prevDomainCardDataRef.current = domainCardData;
|
|
17513
|
-
prevStatusRef.current = status;
|
|
17514
|
-
}
|
|
17515
|
-
}, [domainCardData, status, isApproved, editor]);
|
|
17516
17468
|
const handleApprove = useCallback49(() => {
|
|
17517
17469
|
editor.updateBlock(block, {
|
|
17518
17470
|
props: {
|
|
@@ -17814,7 +17766,7 @@ blockRegistry.register({
|
|
|
17814
17766
|
});
|
|
17815
17767
|
|
|
17816
17768
|
// src/mantine/blocks/hooks/useBlockDependencies.ts
|
|
17817
|
-
import { useMemo as useMemo60, useEffect as
|
|
17769
|
+
import { useMemo as useMemo60, useEffect as useEffect50, useState as useState66, useCallback as useCallback50 } from "react";
|
|
17818
17770
|
|
|
17819
17771
|
// src/mantine/blocks/hooks/useDependsOn.ts
|
|
17820
17772
|
import { useMemo as useMemo61 } from "react";
|
|
@@ -18293,14 +18245,14 @@ import { useCreateBlockNote as useCreateBlockNote2 } from "@blocknote/react";
|
|
|
18293
18245
|
import { BlockNoteSchema as BlockNoteSchema2, defaultBlockSpecs as defaultBlockSpecs2, defaultInlineContentSpecs as defaultInlineContentSpecs2, defaultStyleSpecs as defaultStyleSpecs2 } from "@blocknote/core";
|
|
18294
18246
|
|
|
18295
18247
|
// src/core/hooks/useMatrixProvider.ts
|
|
18296
|
-
import { useEffect as
|
|
18248
|
+
import { useEffect as useEffect51, useState as useState67, useRef as useRef11, useCallback as useCallback51, useMemo as useMemo62 } from "react";
|
|
18297
18249
|
import { MatrixProvider } from "@ixo/matrix-crdt";
|
|
18298
18250
|
function useMatrixProvider({ matrixClient, roomId, yDoc }) {
|
|
18299
18251
|
const [matrixProvider, setProvider] = useState67(null);
|
|
18300
18252
|
const [status, setStatus] = useState67("disconnected");
|
|
18301
|
-
const isMountedRef =
|
|
18302
|
-
const providerRef =
|
|
18303
|
-
const retryTimeoutRef =
|
|
18253
|
+
const isMountedRef = useRef11(true);
|
|
18254
|
+
const providerRef = useRef11(null);
|
|
18255
|
+
const retryTimeoutRef = useRef11(null);
|
|
18304
18256
|
const providerOptions = useMemo62(
|
|
18305
18257
|
() => ({
|
|
18306
18258
|
translator: {
|
|
@@ -18362,7 +18314,7 @@ function useMatrixProvider({ matrixClient, roomId, yDoc }) {
|
|
|
18362
18314
|
}
|
|
18363
18315
|
}
|
|
18364
18316
|
}, [matrixClient, providerOptions, handleDocumentAvailable, handleDocumentUnavailable, handleCanWriteChanged]);
|
|
18365
|
-
|
|
18317
|
+
useEffect51(() => {
|
|
18366
18318
|
isMountedRef.current = true;
|
|
18367
18319
|
initProvider();
|
|
18368
18320
|
return () => {
|
|
@@ -18379,7 +18331,7 @@ function useMatrixProvider({ matrixClient, roomId, yDoc }) {
|
|
|
18379
18331
|
setStatus("disconnected");
|
|
18380
18332
|
};
|
|
18381
18333
|
}, [initProvider]);
|
|
18382
|
-
|
|
18334
|
+
useEffect51(() => {
|
|
18383
18335
|
return () => {
|
|
18384
18336
|
isMountedRef.current = false;
|
|
18385
18337
|
};
|
|
@@ -18398,7 +18350,7 @@ function useCollaborativeYDoc(_options) {
|
|
|
18398
18350
|
}
|
|
18399
18351
|
|
|
18400
18352
|
// src/mantine/hooks/useCollaborativeIxoEditor.ts
|
|
18401
|
-
import { useMemo as useMemo64, useEffect as
|
|
18353
|
+
import { useMemo as useMemo64, useEffect as useEffect52 } from "react";
|
|
18402
18354
|
|
|
18403
18355
|
// src/core/lib/matrixMetadata.ts
|
|
18404
18356
|
var COVER_IMAGE_EVENT_TYPE = "ixo.page.cover_image";
|
|
@@ -18583,7 +18535,7 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
18583
18535
|
roomId: options.roomId
|
|
18584
18536
|
});
|
|
18585
18537
|
const metadataManager = useMemo64(() => new MatrixMetadataManager(matrixClient, options.roomId), [matrixClient, options.roomId]);
|
|
18586
|
-
|
|
18538
|
+
useEffect52(() => {
|
|
18587
18539
|
return () => {
|
|
18588
18540
|
metadataManager.dispose();
|
|
18589
18541
|
};
|
|
@@ -18804,12 +18756,12 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
18804
18756
|
return void 0;
|
|
18805
18757
|
};
|
|
18806
18758
|
}
|
|
18807
|
-
|
|
18759
|
+
useEffect52(() => {
|
|
18808
18760
|
if (ixoEditor) {
|
|
18809
18761
|
ixoEditor.isEditable = editable;
|
|
18810
18762
|
}
|
|
18811
18763
|
}, [ixoEditor, editable]);
|
|
18812
|
-
|
|
18764
|
+
useEffect52(() => {
|
|
18813
18765
|
if (connectionStatus !== "connected") {
|
|
18814
18766
|
return;
|
|
18815
18767
|
}
|
|
@@ -18841,9 +18793,190 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
18841
18793
|
};
|
|
18842
18794
|
}
|
|
18843
18795
|
|
|
18796
|
+
// src/mantine/components/Base/BaseIconPicker.tsx
|
|
18797
|
+
import React196, { useState as useState68, useMemo as useMemo65, useEffect as useEffect53 } from "react";
|
|
18798
|
+
import { TextInput as TextInput6, Tabs as Tabs3, Box as Box36, Stack as Stack126, UnstyledButton as UnstyledButton2, Text as Text100, Center as Center13, ScrollArea as ScrollArea7, Group as Group62, Popover as Popover2 } from "@mantine/core";
|
|
18799
|
+
import * as TablerIcons from "@tabler/icons-react";
|
|
18800
|
+
import { IconSearch as IconSearch5, IconX as IconX8, IconChevronLeft, IconChevronRight as IconChevronRight10 } from "@tabler/icons-react";
|
|
18801
|
+
|
|
18802
|
+
// src/mantine/components/Base/CoverImageButton.tsx
|
|
18803
|
+
import React195, { forwardRef } from "react";
|
|
18804
|
+
import { Button as Button35 } from "@mantine/core";
|
|
18805
|
+
var CoverImageButton = forwardRef(({ isActive = false, onClick, children, style, ...props }, ref) => /* @__PURE__ */ React195.createElement(
|
|
18806
|
+
Button35,
|
|
18807
|
+
{
|
|
18808
|
+
ref,
|
|
18809
|
+
variant: "filled",
|
|
18810
|
+
onClick,
|
|
18811
|
+
size: "xs",
|
|
18812
|
+
style: {
|
|
18813
|
+
backgroundColor: isActive ? "rgba(55, 53, 47, 0.9)" : "rgba(255, 255, 255, 0.9)",
|
|
18814
|
+
color: isActive ? "white" : "#37352f",
|
|
18815
|
+
fontSize: "12px",
|
|
18816
|
+
fontWeight: 500,
|
|
18817
|
+
padding: "4px 8px",
|
|
18818
|
+
height: "auto",
|
|
18819
|
+
...style
|
|
18820
|
+
},
|
|
18821
|
+
...props
|
|
18822
|
+
},
|
|
18823
|
+
children
|
|
18824
|
+
));
|
|
18825
|
+
CoverImageButton.displayName = "CoverImageButton";
|
|
18826
|
+
|
|
18827
|
+
// src/core/services/localStorage.ts
|
|
18828
|
+
var localStorageService = {
|
|
18829
|
+
set(key, value) {
|
|
18830
|
+
try {
|
|
18831
|
+
window.localStorage.setItem(key, JSON.stringify(value));
|
|
18832
|
+
} catch {
|
|
18833
|
+
}
|
|
18834
|
+
},
|
|
18835
|
+
get(key) {
|
|
18836
|
+
try {
|
|
18837
|
+
const item = window.localStorage.getItem(key);
|
|
18838
|
+
return item ? JSON.parse(item) : null;
|
|
18839
|
+
} catch {
|
|
18840
|
+
return null;
|
|
18841
|
+
}
|
|
18842
|
+
},
|
|
18843
|
+
remove(key) {
|
|
18844
|
+
try {
|
|
18845
|
+
window.localStorage.removeItem(key);
|
|
18846
|
+
} catch {
|
|
18847
|
+
}
|
|
18848
|
+
}
|
|
18849
|
+
};
|
|
18850
|
+
|
|
18851
|
+
// src/mantine/components/Base/BaseIconPicker.tsx
|
|
18852
|
+
var iconsKey = "editor_recent_icons";
|
|
18853
|
+
var ICONS_PER_PAGE = 500;
|
|
18854
|
+
function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, children, currentIcon }) {
|
|
18855
|
+
const [searchQuery, setSearchQuery] = useState68("");
|
|
18856
|
+
const [activeTab, setActiveTab] = useState68("icons");
|
|
18857
|
+
const [currentPage, setCurrentPage] = useState68(1);
|
|
18858
|
+
const allIcons = useMemo65(() => {
|
|
18859
|
+
const iconEntries = Object.entries(TablerIcons).filter(([name]) => name.startsWith("Icon") && name !== "IconProps");
|
|
18860
|
+
return iconEntries;
|
|
18861
|
+
}, []);
|
|
18862
|
+
const filteredIcons = useMemo65(() => {
|
|
18863
|
+
if (!searchQuery) return allIcons;
|
|
18864
|
+
const query = searchQuery.toLowerCase();
|
|
18865
|
+
return allIcons.filter(([name]) => name.toLowerCase().includes(query));
|
|
18866
|
+
}, [allIcons, searchQuery]);
|
|
18867
|
+
useEffect53(() => {
|
|
18868
|
+
setCurrentPage(1);
|
|
18869
|
+
}, [searchQuery]);
|
|
18870
|
+
const paginatedIcons = useMemo65(() => {
|
|
18871
|
+
const startIndex = (currentPage - 1) * ICONS_PER_PAGE;
|
|
18872
|
+
const endIndex = startIndex + ICONS_PER_PAGE;
|
|
18873
|
+
return filteredIcons.slice(startIndex, endIndex);
|
|
18874
|
+
}, [filteredIcons, currentPage]);
|
|
18875
|
+
const totalPages = Math.ceil(filteredIcons.length / ICONS_PER_PAGE);
|
|
18876
|
+
const recentIcons = useMemo65(() => {
|
|
18877
|
+
const recentIconNames = localStorageService.get(iconsKey);
|
|
18878
|
+
if (!recentIconNames || recentIconNames.length === 0) return [];
|
|
18879
|
+
return recentIconNames.slice(0, 24).map((iconName) => allIcons.find(([name]) => name === iconName)).filter((entry) => entry !== void 0);
|
|
18880
|
+
}, [opened, allIcons]);
|
|
18881
|
+
const handleIconClick = (iconName) => {
|
|
18882
|
+
const recentIconNames = localStorageService.get(iconsKey) || [];
|
|
18883
|
+
const filteredIcons2 = recentIconNames.filter((name) => name !== iconName);
|
|
18884
|
+
const updatedIcons = [iconName, ...filteredIcons2].slice(0, 24);
|
|
18885
|
+
localStorageService.set(iconsKey, updatedIcons);
|
|
18886
|
+
onSelectIcon(iconName);
|
|
18887
|
+
onClose();
|
|
18888
|
+
};
|
|
18889
|
+
const renderIconGrid = (icons) => {
|
|
18890
|
+
if (icons.length === 0) {
|
|
18891
|
+
return /* @__PURE__ */ React196.createElement(Center13, { py: "xl" }, /* @__PURE__ */ React196.createElement(Text100, { c: "dimmed", size: "sm" }, "No icons found"));
|
|
18892
|
+
}
|
|
18893
|
+
return /* @__PURE__ */ React196.createElement(
|
|
18894
|
+
Box36,
|
|
18895
|
+
{
|
|
18896
|
+
style: {
|
|
18897
|
+
display: "grid",
|
|
18898
|
+
gridTemplateColumns: "repeat(auto-fill, minmax(48px, 1fr))",
|
|
18899
|
+
gap: "8px",
|
|
18900
|
+
padding: "8px"
|
|
18901
|
+
}
|
|
18902
|
+
},
|
|
18903
|
+
icons.map(([name, IconComponent]) => {
|
|
18904
|
+
const isSelected = currentIcon === name.replace("Icon", "").replace(/([A-Z])/g, "-$1").toLowerCase().slice(1);
|
|
18905
|
+
return /* @__PURE__ */ React196.createElement(
|
|
18906
|
+
UnstyledButton2,
|
|
18907
|
+
{
|
|
18908
|
+
key: name,
|
|
18909
|
+
onClick: () => handleIconClick(name),
|
|
18910
|
+
style: {
|
|
18911
|
+
width: "48px",
|
|
18912
|
+
height: "48px",
|
|
18913
|
+
display: "flex",
|
|
18914
|
+
alignItems: "center",
|
|
18915
|
+
justifyContent: "center",
|
|
18916
|
+
borderRadius: "8px",
|
|
18917
|
+
border: isSelected ? "2px solid rgb(0, 255, 157)" : "1px solid rgba(255, 255, 255, 0.1)",
|
|
18918
|
+
backgroundColor: isSelected ? "rgba(0, 255, 157, 0.1)" : "rgba(255, 255, 255, 0.02)",
|
|
18919
|
+
transition: "all 0.2s",
|
|
18920
|
+
cursor: "pointer"
|
|
18921
|
+
},
|
|
18922
|
+
styles: {
|
|
18923
|
+
root: {
|
|
18924
|
+
"&:hover": {
|
|
18925
|
+
backgroundColor: "rgba(255, 255, 255, 0.08)",
|
|
18926
|
+
borderColor: "rgba(255, 255, 255, 0.2)"
|
|
18927
|
+
}
|
|
18928
|
+
}
|
|
18929
|
+
}
|
|
18930
|
+
},
|
|
18931
|
+
/* @__PURE__ */ React196.createElement(IconComponent, { color: "white", size: 24, stroke: 1.5 })
|
|
18932
|
+
);
|
|
18933
|
+
})
|
|
18934
|
+
);
|
|
18935
|
+
};
|
|
18936
|
+
return /* @__PURE__ */ React196.createElement(Popover2, { opened, onClose, position: "right", width: 500, shadow: "xl" }, /* @__PURE__ */ React196.createElement(Popover2.Target, null, children), /* @__PURE__ */ React196.createElement(
|
|
18937
|
+
Popover2.Dropdown,
|
|
18938
|
+
{
|
|
18939
|
+
style: {
|
|
18940
|
+
backgroundColor: "#1a1a1a",
|
|
18941
|
+
border: "1px solid rgba(255, 255, 255, 0.1)",
|
|
18942
|
+
borderRadius: "12px"
|
|
18943
|
+
},
|
|
18944
|
+
p: 0
|
|
18945
|
+
},
|
|
18946
|
+
/* @__PURE__ */ React196.createElement(Stack126, { gap: "md", p: "md" }, /* @__PURE__ */ React196.createElement(Tabs3, { value: activeTab, onChange: setActiveTab, variant: "pills" }, /* @__PURE__ */ React196.createElement(Tabs3.List, null, /* @__PURE__ */ React196.createElement(Tabs3.Tab, { value: "icons" }, "Icons"), /* @__PURE__ */ React196.createElement(Tabs3.Tab, { value: "upload" }, "Upload")), /* @__PURE__ */ React196.createElement(Tabs3.Panel, { value: "icons", pt: "md" }, /* @__PURE__ */ React196.createElement(
|
|
18947
|
+
TextInput6,
|
|
18948
|
+
{
|
|
18949
|
+
mb: "md",
|
|
18950
|
+
placeholder: "Filter",
|
|
18951
|
+
leftSection: /* @__PURE__ */ React196.createElement(IconSearch5, { size: 18 }),
|
|
18952
|
+
value: searchQuery,
|
|
18953
|
+
onChange: (e) => setSearchQuery(e.currentTarget.value),
|
|
18954
|
+
rightSection: searchQuery && /* @__PURE__ */ React196.createElement(UnstyledButton2, { onClick: () => setSearchQuery("") }, /* @__PURE__ */ React196.createElement(IconX8, { size: 18 })),
|
|
18955
|
+
style: { flex: 1 },
|
|
18956
|
+
styles: {
|
|
18957
|
+
input: {
|
|
18958
|
+
backgroundColor: "rgba(255, 255, 255, 0.05)",
|
|
18959
|
+
border: "1px solid rgba(255, 255, 255, 0.1)",
|
|
18960
|
+
borderRadius: "8px"
|
|
18961
|
+
}
|
|
18962
|
+
}
|
|
18963
|
+
}
|
|
18964
|
+
), !searchQuery && /* @__PURE__ */ React196.createElement(Box36, { mb: "md" }, /* @__PURE__ */ React196.createElement(Text100, { size: "sm", fw: 500, mb: "xs", px: "xs" }, "Recent"), /* @__PURE__ */ React196.createElement(ScrollArea7.Autosize, { scrollbarSize: 0, mah: 60 }, renderIconGrid(recentIcons))), /* @__PURE__ */ React196.createElement(Box36, null, /* @__PURE__ */ React196.createElement(Group62, { justify: "space-between", mb: "xs", px: "xs" }, /* @__PURE__ */ React196.createElement(Text100, { size: "sm", fw: 500 }, searchQuery ? "Results" : "Icons"), totalPages > 1 && /* @__PURE__ */ React196.createElement(Group62, { gap: "xs" }, /* @__PURE__ */ React196.createElement(Text100, { size: "xs", c: "dimmed" }, "Page ", currentPage, " of ", totalPages, " (", filteredIcons.length, " total)"), /* @__PURE__ */ React196.createElement(BaseButton, { size: "xs", onClick: () => setCurrentPage((p) => Math.max(1, p - 1)), disabled: currentPage === 1, leftSection: /* @__PURE__ */ React196.createElement(IconChevronLeft, { size: 14 }) }, "Prev"), /* @__PURE__ */ React196.createElement(
|
|
18965
|
+
BaseButton,
|
|
18966
|
+
{
|
|
18967
|
+
size: "xs",
|
|
18968
|
+
onClick: () => setCurrentPage((p) => Math.min(totalPages, p + 1)),
|
|
18969
|
+
disabled: currentPage === totalPages,
|
|
18970
|
+
leftSection: /* @__PURE__ */ React196.createElement(IconChevronRight10, { size: 14 })
|
|
18971
|
+
},
|
|
18972
|
+
"Next"
|
|
18973
|
+
))), /* @__PURE__ */ React196.createElement(ScrollArea7.Autosize, { scrollbarSize: 0, mah: 200 }, renderIconGrid(paginatedIcons)))), /* @__PURE__ */ React196.createElement(Tabs3.Panel, { value: "upload", pt: "md" }, /* @__PURE__ */ React196.createElement(Center13, { py: "xl" }, /* @__PURE__ */ React196.createElement(Stack126, { align: "center", gap: "md" }, /* @__PURE__ */ React196.createElement(Text100, { size: "sm", c: "dimmed", ta: "center" }, "Upload a custom icon image", /* @__PURE__ */ React196.createElement("br", null), "(PNG, JPG, SVG)"), /* @__PURE__ */ React196.createElement(CoverImageButton, { onClick: onUploadClick }, "Choose File"))))))
|
|
18974
|
+
));
|
|
18975
|
+
}
|
|
18976
|
+
|
|
18844
18977
|
// src/mantine/components/CoverImage.tsx
|
|
18845
|
-
import
|
|
18846
|
-
import { Box as
|
|
18978
|
+
import React198, { useState as useState69, useRef as useRef12, useEffect as useEffect54 } from "react";
|
|
18979
|
+
import { Box as Box38, Group as Group63 } from "@mantine/core";
|
|
18847
18980
|
|
|
18848
18981
|
// src/core/lib/imageTransform.ts
|
|
18849
18982
|
var CLOUDFLARE_CDN_BASE = "https://www.ixo.earth/cdn-cgi/image";
|
|
@@ -18975,40 +19108,67 @@ function transformIconImage(sourceUrl, size = "default", customOptions) {
|
|
|
18975
19108
|
return transformImage(sourceUrl, options);
|
|
18976
19109
|
}
|
|
18977
19110
|
|
|
18978
|
-
// src/mantine/components/Base/
|
|
18979
|
-
import
|
|
18980
|
-
import {
|
|
18981
|
-
|
|
18982
|
-
|
|
18983
|
-
|
|
19111
|
+
// src/mantine/components/Base/PageIcon.tsx
|
|
19112
|
+
import React197, { useMemo as useMemo66 } from "react";
|
|
19113
|
+
import { Center as Center14, Box as Box37 } from "@mantine/core";
|
|
19114
|
+
import * as TablerIcons2 from "@tabler/icons-react";
|
|
19115
|
+
function PageIcon({ src, iconSize = 64, useCenter = false, style }) {
|
|
19116
|
+
const isIconName = src && !src.startsWith("http");
|
|
19117
|
+
const IconComponent = useMemo66(() => {
|
|
19118
|
+
if (!isIconName || !src) return null;
|
|
19119
|
+
const iconComponent = TablerIcons2[src];
|
|
19120
|
+
if (iconComponent) {
|
|
19121
|
+
return iconComponent;
|
|
19122
|
+
}
|
|
19123
|
+
return null;
|
|
19124
|
+
}, [isIconName, src]);
|
|
19125
|
+
const Container = useCenter ? Center14 : Box37;
|
|
19126
|
+
if (!src) return null;
|
|
19127
|
+
if (IconComponent) {
|
|
19128
|
+
return /* @__PURE__ */ React197.createElement(
|
|
19129
|
+
Container,
|
|
19130
|
+
{
|
|
19131
|
+
style: {
|
|
19132
|
+
width: "100%",
|
|
19133
|
+
height: "100%",
|
|
19134
|
+
borderRadius: "100%",
|
|
19135
|
+
boxShadow: "0 1px 2px rgba(0, 0, 0, 0.1)",
|
|
19136
|
+
backgroundColor: "rgba(255, 255, 255, 0.1)",
|
|
19137
|
+
...style
|
|
19138
|
+
}
|
|
19139
|
+
},
|
|
19140
|
+
/* @__PURE__ */ React197.createElement(IconComponent, { size: iconSize, color: "white", stroke: 1.5 })
|
|
19141
|
+
);
|
|
19142
|
+
}
|
|
19143
|
+
return /* @__PURE__ */ React197.createElement(
|
|
19144
|
+
"img",
|
|
18984
19145
|
{
|
|
18985
|
-
|
|
18986
|
-
|
|
18987
|
-
size: "xs",
|
|
19146
|
+
src,
|
|
19147
|
+
alt: "Logo",
|
|
18988
19148
|
style: {
|
|
18989
|
-
|
|
18990
|
-
|
|
18991
|
-
|
|
18992
|
-
|
|
18993
|
-
|
|
18994
|
-
height: "auto",
|
|
19149
|
+
width: "100%",
|
|
19150
|
+
height: "100%",
|
|
19151
|
+
borderRadius: "100%",
|
|
19152
|
+
boxShadow: "0 1px 2px rgba(0, 0, 0, 0.1)",
|
|
19153
|
+
objectFit: "cover",
|
|
18995
19154
|
...style
|
|
18996
19155
|
}
|
|
18997
|
-
}
|
|
18998
|
-
children
|
|
19156
|
+
}
|
|
18999
19157
|
);
|
|
19000
19158
|
}
|
|
19001
19159
|
|
|
19002
19160
|
// src/mantine/components/CoverImage.tsx
|
|
19161
|
+
import { useDisclosure as useDisclosure4 } from "@mantine/hooks";
|
|
19003
19162
|
function CoverImage({ coverImageUrl, logoUrl }) {
|
|
19004
19163
|
const { editor, handlers, editable } = useBlocknoteContext();
|
|
19005
|
-
const [isHovering, setIsHovering] =
|
|
19006
|
-
const [isRepositioning, setIsRepositioning] =
|
|
19007
|
-
const [coverPosition, setCoverPosition] =
|
|
19008
|
-
const coverFileInputRef =
|
|
19009
|
-
const logoFileInputRef =
|
|
19010
|
-
const [
|
|
19011
|
-
|
|
19164
|
+
const [isHovering, setIsHovering] = useState69(false);
|
|
19165
|
+
const [isRepositioning, setIsRepositioning] = useState69(false);
|
|
19166
|
+
const [coverPosition, setCoverPosition] = useState69(50);
|
|
19167
|
+
const coverFileInputRef = useRef12(null);
|
|
19168
|
+
const logoFileInputRef = useRef12(null);
|
|
19169
|
+
const [opened, { open, close }] = useDisclosure4(false);
|
|
19170
|
+
const [metadata, setMetadata] = useState69(() => editor?.getPageMetadata?.() || null);
|
|
19171
|
+
useEffect54(() => {
|
|
19012
19172
|
if (!editor?._metadataManager) {
|
|
19013
19173
|
return;
|
|
19014
19174
|
}
|
|
@@ -19022,7 +19182,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
19022
19182
|
const rawCoverUrl = metadata?.cover || coverImageUrl;
|
|
19023
19183
|
const rawLogoUrl = metadata?.icon || logoUrl;
|
|
19024
19184
|
const coverUrl = rawCoverUrl ? transformCoverImage(rawCoverUrl, "desktop") : void 0;
|
|
19025
|
-
const logoSrc = rawLogoUrl ? transformIconImage(rawLogoUrl, "default") : void 0;
|
|
19185
|
+
const logoSrc = rawLogoUrl ? rawLogoUrl.startsWith("http") ? transformIconImage(rawLogoUrl, "default") : rawLogoUrl : void 0;
|
|
19026
19186
|
const hasCover = !!coverUrl;
|
|
19027
19187
|
const hasLogo = !!logoSrc;
|
|
19028
19188
|
const handleFileSelect = async (event, type) => {
|
|
@@ -19042,46 +19202,37 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
19042
19202
|
} else {
|
|
19043
19203
|
await editor.setPageMetadata?.({ icon: imageUrl });
|
|
19044
19204
|
}
|
|
19045
|
-
} catch
|
|
19205
|
+
} catch {
|
|
19046
19206
|
const currentMetadata = editor?.getPageMetadata?.();
|
|
19047
19207
|
if (currentMetadata) {
|
|
19048
19208
|
setMetadata(currentMetadata);
|
|
19049
19209
|
}
|
|
19050
19210
|
}
|
|
19051
19211
|
};
|
|
19052
|
-
const handleAddCover = () => {
|
|
19053
|
-
coverFileInputRef.current?.click();
|
|
19054
|
-
};
|
|
19055
|
-
const handleChangeCover = () => {
|
|
19056
|
-
coverFileInputRef.current?.click();
|
|
19057
|
-
};
|
|
19058
|
-
const handleReposition = () => {
|
|
19059
|
-
setIsRepositioning(!isRepositioning);
|
|
19060
|
-
};
|
|
19061
19212
|
const handleRemoveCover = async () => {
|
|
19062
19213
|
if (!editor) return;
|
|
19063
19214
|
setMetadata((prev) => ({ ...prev, cover: void 0 }));
|
|
19064
19215
|
try {
|
|
19065
19216
|
await editor.setPageMetadata?.({ cover: void 0 });
|
|
19066
|
-
} catch
|
|
19217
|
+
} catch {
|
|
19067
19218
|
const currentMetadata = editor?.getPageMetadata?.();
|
|
19068
19219
|
if (currentMetadata) {
|
|
19069
19220
|
setMetadata(currentMetadata);
|
|
19070
19221
|
}
|
|
19071
19222
|
}
|
|
19072
19223
|
};
|
|
19073
|
-
const
|
|
19074
|
-
|
|
19075
|
-
|
|
19076
|
-
|
|
19077
|
-
|
|
19224
|
+
const handleSelectLogoIcon = async (iconName) => {
|
|
19225
|
+
if (editor) {
|
|
19226
|
+
await editor.setPageMetadata?.({ icon: iconName });
|
|
19227
|
+
setMetadata((prev) => ({ ...prev, icon: iconName }));
|
|
19228
|
+
}
|
|
19078
19229
|
};
|
|
19079
19230
|
const handleRemoveLogo = async () => {
|
|
19080
19231
|
if (!editor) return;
|
|
19081
19232
|
setMetadata((prev) => ({ ...prev, icon: void 0 }));
|
|
19082
19233
|
try {
|
|
19083
19234
|
await editor.setPageMetadata?.({ icon: void 0 });
|
|
19084
|
-
} catch
|
|
19235
|
+
} catch {
|
|
19085
19236
|
const currentMetadata = editor?.getPageMetadata?.();
|
|
19086
19237
|
if (currentMetadata) {
|
|
19087
19238
|
setMetadata(currentMetadata);
|
|
@@ -19099,8 +19250,8 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
19099
19250
|
return null;
|
|
19100
19251
|
}
|
|
19101
19252
|
if (!hasCover) {
|
|
19102
|
-
return /* @__PURE__ */
|
|
19103
|
-
|
|
19253
|
+
return /* @__PURE__ */ React198.createElement(
|
|
19254
|
+
Box38,
|
|
19104
19255
|
{
|
|
19105
19256
|
style: {
|
|
19106
19257
|
position: "relative",
|
|
@@ -19112,8 +19263,8 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
19112
19263
|
onMouseEnter: () => editable && setIsHovering(true),
|
|
19113
19264
|
onMouseLeave: () => editable && setIsHovering(false)
|
|
19114
19265
|
},
|
|
19115
|
-
/* @__PURE__ */
|
|
19116
|
-
|
|
19266
|
+
/* @__PURE__ */ React198.createElement("div", { style: { maxWidth: "900px", margin: "0 auto", position: "relative", height: "100%" } }, /* @__PURE__ */ React198.createElement("input", { ref: coverFileInputRef, type: "file", accept: "image/*", style: { display: "none" }, onChange: (e) => handleFileSelect(e, "cover") }), /* @__PURE__ */ React198.createElement("input", { ref: logoFileInputRef, type: "file", accept: "image/*", style: { display: "none" }, onChange: (e) => handleFileSelect(e, "logo") }), editable && isHovering && !logoSrc && /* @__PURE__ */ React198.createElement(
|
|
19267
|
+
Group63,
|
|
19117
19268
|
{
|
|
19118
19269
|
gap: "xs",
|
|
19119
19270
|
style: {
|
|
@@ -19123,10 +19274,20 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
19123
19274
|
zIndex: 10
|
|
19124
19275
|
}
|
|
19125
19276
|
},
|
|
19126
|
-
/* @__PURE__ */
|
|
19127
|
-
|
|
19128
|
-
|
|
19129
|
-
|
|
19277
|
+
/* @__PURE__ */ React198.createElement(
|
|
19278
|
+
BaseIconPicker,
|
|
19279
|
+
{
|
|
19280
|
+
opened,
|
|
19281
|
+
onClose: close,
|
|
19282
|
+
currentIcon: metadata?.icon ?? "",
|
|
19283
|
+
onSelectIcon: (name) => handleSelectLogoIcon(name),
|
|
19284
|
+
onUploadClick: () => logoFileInputRef.current?.click()
|
|
19285
|
+
},
|
|
19286
|
+
/* @__PURE__ */ React198.createElement(CoverImageButton, { onClick: open }, "Add icon")
|
|
19287
|
+
),
|
|
19288
|
+
/* @__PURE__ */ React198.createElement(CoverImageButton, { onClick: () => coverFileInputRef.current?.click() }, "Add cover")
|
|
19289
|
+
), logoSrc && /* @__PURE__ */ React198.createElement(
|
|
19290
|
+
Box38,
|
|
19130
19291
|
{
|
|
19131
19292
|
style: {
|
|
19132
19293
|
position: "relative",
|
|
@@ -19139,21 +19300,8 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
19139
19300
|
zIndex: 11
|
|
19140
19301
|
}
|
|
19141
19302
|
},
|
|
19142
|
-
/* @__PURE__ */
|
|
19143
|
-
|
|
19144
|
-
{
|
|
19145
|
-
src: logoSrc,
|
|
19146
|
-
alt: "Logo",
|
|
19147
|
-
style: {
|
|
19148
|
-
width: "100%",
|
|
19149
|
-
height: "100%",
|
|
19150
|
-
borderRadius: "100%",
|
|
19151
|
-
boxShadow: "0 1px 2px rgba(0, 0, 0, 0.1)",
|
|
19152
|
-
objectFit: "cover"
|
|
19153
|
-
}
|
|
19154
|
-
}
|
|
19155
|
-
),
|
|
19156
|
-
editable && isHovering && /* @__PURE__ */ React196.createElement(
|
|
19303
|
+
/* @__PURE__ */ React198.createElement(PageIcon, { src: logoSrc, useCenter: true, iconSize: 64 }),
|
|
19304
|
+
editable && isHovering && /* @__PURE__ */ React198.createElement(
|
|
19157
19305
|
"div",
|
|
19158
19306
|
{
|
|
19159
19307
|
style: {
|
|
@@ -19168,21 +19316,30 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
19168
19316
|
alignItems: "center"
|
|
19169
19317
|
}
|
|
19170
19318
|
},
|
|
19171
|
-
/* @__PURE__ */
|
|
19172
|
-
|
|
19173
|
-
|
|
19319
|
+
/* @__PURE__ */ React198.createElement(
|
|
19320
|
+
BaseIconPicker,
|
|
19321
|
+
{
|
|
19322
|
+
opened,
|
|
19323
|
+
onClose: close,
|
|
19324
|
+
currentIcon: metadata?.icon ?? "",
|
|
19325
|
+
onSelectIcon: (name) => handleSelectLogoIcon(name),
|
|
19326
|
+
onUploadClick: () => logoFileInputRef.current?.click()
|
|
19327
|
+
},
|
|
19328
|
+
/* @__PURE__ */ React198.createElement(CoverImageButton, { onClick: open }, "Change")
|
|
19329
|
+
),
|
|
19330
|
+
/* @__PURE__ */ React198.createElement(CoverImageButton, { onClick: handleRemoveLogo }, "Remove"),
|
|
19331
|
+
/* @__PURE__ */ React198.createElement(CoverImageButton, { onClick: () => coverFileInputRef.current?.click() }, "Add cover")
|
|
19174
19332
|
)
|
|
19175
19333
|
))
|
|
19176
19334
|
);
|
|
19177
19335
|
}
|
|
19178
|
-
return /* @__PURE__ */
|
|
19179
|
-
|
|
19336
|
+
return /* @__PURE__ */ React198.createElement(
|
|
19337
|
+
Box38,
|
|
19180
19338
|
{
|
|
19181
19339
|
style: {
|
|
19182
19340
|
position: "relative",
|
|
19183
19341
|
width: "100%",
|
|
19184
19342
|
paddingBottom: "70px",
|
|
19185
|
-
// Space for logo area (increased for 120px logo)
|
|
19186
19343
|
cursor: isRepositioning ? "ns-resize" : "default",
|
|
19187
19344
|
backgroundColor: "transparent"
|
|
19188
19345
|
},
|
|
@@ -19196,7 +19353,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
19196
19353
|
onMouseMove: handleMouseMove,
|
|
19197
19354
|
onClick: () => isRepositioning && setIsRepositioning(false)
|
|
19198
19355
|
},
|
|
19199
|
-
/* @__PURE__ */
|
|
19356
|
+
/* @__PURE__ */ React198.createElement(
|
|
19200
19357
|
"img",
|
|
19201
19358
|
{
|
|
19202
19359
|
src: coverUrl,
|
|
@@ -19214,8 +19371,8 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
19214
19371
|
}
|
|
19215
19372
|
}
|
|
19216
19373
|
),
|
|
19217
|
-
editable && isHovering && /* @__PURE__ */
|
|
19218
|
-
|
|
19374
|
+
editable && isHovering && /* @__PURE__ */ React198.createElement(
|
|
19375
|
+
Group63,
|
|
19219
19376
|
{
|
|
19220
19377
|
gap: "xs",
|
|
19221
19378
|
style: {
|
|
@@ -19225,12 +19382,12 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
19225
19382
|
zIndex: 10
|
|
19226
19383
|
}
|
|
19227
19384
|
},
|
|
19228
|
-
/* @__PURE__ */
|
|
19229
|
-
/* @__PURE__ */
|
|
19230
|
-
/* @__PURE__ */
|
|
19385
|
+
/* @__PURE__ */ React198.createElement(CoverImageButton, { onClick: () => coverFileInputRef.current?.click() }, "Change cover"),
|
|
19386
|
+
/* @__PURE__ */ React198.createElement(CoverImageButton, { onClick: () => setIsRepositioning(!isRepositioning), isActive: isRepositioning }, isRepositioning ? "Done" : "Reposition"),
|
|
19387
|
+
/* @__PURE__ */ React198.createElement(CoverImageButton, { onClick: handleRemoveCover }, "Remove")
|
|
19231
19388
|
),
|
|
19232
|
-
/* @__PURE__ */
|
|
19233
|
-
|
|
19389
|
+
/* @__PURE__ */ React198.createElement("div", { style: { maxWidth: "900px", margin: "0 auto", position: "absolute", bottom: 0, left: -40, right: 0, height: "70px" } }, /* @__PURE__ */ React198.createElement(
|
|
19390
|
+
Box38,
|
|
19234
19391
|
{
|
|
19235
19392
|
style: {
|
|
19236
19393
|
position: "absolute",
|
|
@@ -19241,61 +19398,52 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
19241
19398
|
zIndex: 11
|
|
19242
19399
|
}
|
|
19243
19400
|
},
|
|
19244
|
-
logoSrc && /* @__PURE__ */
|
|
19245
|
-
|
|
19401
|
+
logoSrc && /* @__PURE__ */ React198.createElement(PageIcon, { src: logoSrc, iconSize: 64 }),
|
|
19402
|
+
editable && isHovering && /* @__PURE__ */ React198.createElement(React198.Fragment, null, logoSrc ? /* @__PURE__ */ React198.createElement(
|
|
19403
|
+
Group63,
|
|
19246
19404
|
{
|
|
19247
|
-
|
|
19248
|
-
alt: "Logo",
|
|
19405
|
+
gap: "xs",
|
|
19249
19406
|
style: {
|
|
19250
|
-
|
|
19251
|
-
|
|
19252
|
-
|
|
19253
|
-
|
|
19254
|
-
objectFit: "cover"
|
|
19407
|
+
position: "absolute",
|
|
19408
|
+
top: "0",
|
|
19409
|
+
left: "130px",
|
|
19410
|
+
zIndex: 12
|
|
19255
19411
|
}
|
|
19256
|
-
}
|
|
19257
|
-
|
|
19258
|
-
|
|
19259
|
-
// Logo exists: Show Change/Remove buttons when hovering on cover
|
|
19260
|
-
/* @__PURE__ */ React196.createElement(
|
|
19261
|
-
Group62,
|
|
19262
|
-
{
|
|
19263
|
-
gap: "xs",
|
|
19264
|
-
style: {
|
|
19265
|
-
position: "absolute",
|
|
19266
|
-
top: "0",
|
|
19267
|
-
left: "130px",
|
|
19268
|
-
zIndex: 12
|
|
19269
|
-
}
|
|
19270
|
-
},
|
|
19271
|
-
/* @__PURE__ */ React196.createElement(CoverImageButton, { onClick: handleChangeLogo }, "Change"),
|
|
19272
|
-
/* @__PURE__ */ React196.createElement(CoverImageButton, { onClick: handleRemoveLogo }, "Remove")
|
|
19273
|
-
)
|
|
19274
|
-
) : (
|
|
19275
|
-
// No logo: Show "Add icon" button when hovering anywhere on cover
|
|
19276
|
-
/* @__PURE__ */ React196.createElement(
|
|
19277
|
-
CoverImageButton,
|
|
19412
|
+
},
|
|
19413
|
+
/* @__PURE__ */ React198.createElement(
|
|
19414
|
+
BaseIconPicker,
|
|
19278
19415
|
{
|
|
19279
|
-
|
|
19280
|
-
|
|
19281
|
-
|
|
19282
|
-
|
|
19283
|
-
|
|
19284
|
-
transform: "translate(-50%, -50%)",
|
|
19285
|
-
zIndex: 12
|
|
19286
|
-
}
|
|
19416
|
+
opened,
|
|
19417
|
+
onClose: close,
|
|
19418
|
+
currentIcon: metadata?.icon ?? "",
|
|
19419
|
+
onSelectIcon: (name) => handleSelectLogoIcon(name),
|
|
19420
|
+
onUploadClick: () => logoFileInputRef.current?.click()
|
|
19287
19421
|
},
|
|
19288
|
-
|
|
19289
|
-
)
|
|
19422
|
+
/* @__PURE__ */ React198.createElement(CoverImageButton, { onClick: open }, "Change")
|
|
19423
|
+
),
|
|
19424
|
+
/* @__PURE__ */ React198.createElement(CoverImageButton, { onClick: handleRemoveLogo }, "Remove")
|
|
19425
|
+
) : /* @__PURE__ */ React198.createElement(
|
|
19426
|
+
CoverImageButton,
|
|
19427
|
+
{
|
|
19428
|
+
onClick: open,
|
|
19429
|
+
style: {
|
|
19430
|
+
position: "absolute",
|
|
19431
|
+
top: "50%",
|
|
19432
|
+
left: "50%",
|
|
19433
|
+
transform: "translate(-50%, -50%)",
|
|
19434
|
+
zIndex: 12
|
|
19435
|
+
}
|
|
19436
|
+
},
|
|
19437
|
+
"Add icon"
|
|
19290
19438
|
))
|
|
19291
19439
|
)),
|
|
19292
|
-
/* @__PURE__ */
|
|
19293
|
-
/* @__PURE__ */
|
|
19440
|
+
/* @__PURE__ */ React198.createElement("input", { ref: coverFileInputRef, type: "file", accept: "image/*", style: { display: "none" }, onChange: (e) => handleFileSelect(e, "cover") }),
|
|
19441
|
+
/* @__PURE__ */ React198.createElement("input", { ref: logoFileInputRef, type: "file", accept: "image/*", style: { display: "none" }, onChange: (e) => handleFileSelect(e, "logo") })
|
|
19294
19442
|
);
|
|
19295
19443
|
}
|
|
19296
19444
|
|
|
19297
19445
|
// src/mantine/components/PageHeader.tsx
|
|
19298
|
-
import
|
|
19446
|
+
import React199, { useState as useState70, useRef as useRef13, useEffect as useEffect55 } from "react";
|
|
19299
19447
|
function PageHeader({
|
|
19300
19448
|
title = "New page",
|
|
19301
19449
|
icon,
|
|
@@ -19306,9 +19454,9 @@ function PageHeader({
|
|
|
19306
19454
|
isFavorited = false,
|
|
19307
19455
|
menuItems = []
|
|
19308
19456
|
}) {
|
|
19309
|
-
const [isMenuOpen, setIsMenuOpen] =
|
|
19310
|
-
const menuRef =
|
|
19311
|
-
|
|
19457
|
+
const [isMenuOpen, setIsMenuOpen] = useState70(false);
|
|
19458
|
+
const menuRef = useRef13(null);
|
|
19459
|
+
useEffect55(() => {
|
|
19312
19460
|
function handleClickOutside(event) {
|
|
19313
19461
|
if (menuRef.current && !menuRef.current.contains(event.target)) {
|
|
19314
19462
|
setIsMenuOpen(false);
|
|
@@ -19327,14 +19475,14 @@ function PageHeader({
|
|
|
19327
19475
|
setIsMenuOpen(false);
|
|
19328
19476
|
}
|
|
19329
19477
|
};
|
|
19330
|
-
return /* @__PURE__ */
|
|
19478
|
+
return /* @__PURE__ */ React199.createElement("div", { style: styles.container }, /* @__PURE__ */ React199.createElement("div", { style: styles.leftSection }, /* @__PURE__ */ React199.createElement("span", { style: styles.icon }, icon || "\u{1F4C4}"), /* @__PURE__ */ React199.createElement("span", { style: styles.title }, title), isPrivate && /* @__PURE__ */ React199.createElement("button", { style: styles.privacyBadge }, /* @__PURE__ */ React199.createElement("span", { style: styles.lockIcon }, "\u{1F512}"), /* @__PURE__ */ React199.createElement("span", null, "Private"), /* @__PURE__ */ React199.createElement("span", { style: styles.chevron }, "\u25BE"))), /* @__PURE__ */ React199.createElement("div", { style: styles.rightSection }, lastEdited && /* @__PURE__ */ React199.createElement("span", { style: styles.editedText }, lastEdited), onShare && /* @__PURE__ */ React199.createElement("button", { style: styles.shareButton, onClick: onShare }, "Share"), onFavorite && /* @__PURE__ */ React199.createElement("button", { style: styles.iconButton, onClick: onFavorite }, isFavorited ? "\u2605" : "\u2606"), menuItems.length > 0 && /* @__PURE__ */ React199.createElement("div", { style: styles.menuContainer, ref: menuRef }, /* @__PURE__ */ React199.createElement(
|
|
19331
19479
|
"button",
|
|
19332
19480
|
{
|
|
19333
19481
|
style: styles.menuButton,
|
|
19334
19482
|
onClick: () => setIsMenuOpen(!isMenuOpen),
|
|
19335
19483
|
"aria-label": "Menu"
|
|
19336
19484
|
},
|
|
19337
|
-
/* @__PURE__ */
|
|
19485
|
+
/* @__PURE__ */ React199.createElement(
|
|
19338
19486
|
"svg",
|
|
19339
19487
|
{
|
|
19340
19488
|
width: "16",
|
|
@@ -19342,11 +19490,11 @@ function PageHeader({
|
|
|
19342
19490
|
viewBox: "0 0 16 16",
|
|
19343
19491
|
fill: "currentColor"
|
|
19344
19492
|
},
|
|
19345
|
-
/* @__PURE__ */
|
|
19346
|
-
/* @__PURE__ */
|
|
19347
|
-
/* @__PURE__ */
|
|
19493
|
+
/* @__PURE__ */ React199.createElement("circle", { cx: "3", cy: "8", r: "1.5" }),
|
|
19494
|
+
/* @__PURE__ */ React199.createElement("circle", { cx: "8", cy: "8", r: "1.5" }),
|
|
19495
|
+
/* @__PURE__ */ React199.createElement("circle", { cx: "13", cy: "8", r: "1.5" })
|
|
19348
19496
|
)
|
|
19349
|
-
), isMenuOpen && /* @__PURE__ */
|
|
19497
|
+
), isMenuOpen && /* @__PURE__ */ React199.createElement("div", { style: styles.dropdown }, menuItems.map((item, index) => /* @__PURE__ */ React199.createElement(React199.Fragment, { key: index }, item.divider && index > 0 && /* @__PURE__ */ React199.createElement("div", { style: styles.divider }), /* @__PURE__ */ React199.createElement(
|
|
19350
19498
|
"button",
|
|
19351
19499
|
{
|
|
19352
19500
|
style: {
|
|
@@ -19356,8 +19504,8 @@ function PageHeader({
|
|
|
19356
19504
|
onClick: () => handleMenuItemClick(item),
|
|
19357
19505
|
disabled: item.disabled
|
|
19358
19506
|
},
|
|
19359
|
-
item.icon && /* @__PURE__ */
|
|
19360
|
-
/* @__PURE__ */
|
|
19507
|
+
item.icon && /* @__PURE__ */ React199.createElement("span", { style: styles.menuItemIcon }, item.icon),
|
|
19508
|
+
/* @__PURE__ */ React199.createElement("span", null, item.label)
|
|
19361
19509
|
)))))));
|
|
19362
19510
|
}
|
|
19363
19511
|
var styles = {
|
|
@@ -19488,8 +19636,8 @@ var styles = {
|
|
|
19488
19636
|
};
|
|
19489
19637
|
|
|
19490
19638
|
// src/mantine/components/ExternalDropZone.tsx
|
|
19491
|
-
import
|
|
19492
|
-
import { Box as
|
|
19639
|
+
import React200, { useCallback as useCallback52, useEffect as useEffect56, useRef as useRef14, useState as useState71 } from "react";
|
|
19640
|
+
import { Box as Box39 } from "@mantine/core";
|
|
19493
19641
|
var SCROLL_ZONE_SIZE = 80;
|
|
19494
19642
|
var SCROLL_SPEED = 12;
|
|
19495
19643
|
var ExternalDropZone = ({
|
|
@@ -19501,14 +19649,14 @@ var ExternalDropZone = ({
|
|
|
19501
19649
|
onPlacementCancel,
|
|
19502
19650
|
children
|
|
19503
19651
|
}) => {
|
|
19504
|
-
const containerRef =
|
|
19505
|
-
const [isValidDrag, setIsValidDrag] =
|
|
19506
|
-
const [isHoveringInPlacementMode, setIsHoveringInPlacementMode] =
|
|
19507
|
-
const [indicatorStyle, setIndicatorStyle] =
|
|
19508
|
-
const dropPositionRef =
|
|
19509
|
-
const scrollAnimationRef =
|
|
19510
|
-
const scrollDirectionRef =
|
|
19511
|
-
const scrollContainerRef =
|
|
19652
|
+
const containerRef = useRef14(null);
|
|
19653
|
+
const [isValidDrag, setIsValidDrag] = useState71(false);
|
|
19654
|
+
const [isHoveringInPlacementMode, setIsHoveringInPlacementMode] = useState71(false);
|
|
19655
|
+
const [indicatorStyle, setIndicatorStyle] = useState71({});
|
|
19656
|
+
const dropPositionRef = useRef14(null);
|
|
19657
|
+
const scrollAnimationRef = useRef14(null);
|
|
19658
|
+
const scrollDirectionRef = useRef14(null);
|
|
19659
|
+
const scrollContainerRef = useRef14(null);
|
|
19512
19660
|
const getBlockElements = useCallback52(() => {
|
|
19513
19661
|
if (!containerRef.current) return [];
|
|
19514
19662
|
const blocks = containerRef.current.querySelectorAll('[data-node-type="blockContainer"]');
|
|
@@ -19664,7 +19812,7 @@ var ExternalDropZone = ({
|
|
|
19664
19812
|
},
|
|
19665
19813
|
[onDrop, stopAutoScroll]
|
|
19666
19814
|
);
|
|
19667
|
-
|
|
19815
|
+
useEffect56(() => {
|
|
19668
19816
|
const handleGlobalDragEnd = () => {
|
|
19669
19817
|
setIsValidDrag(false);
|
|
19670
19818
|
dropPositionRef.current = null;
|
|
@@ -19722,7 +19870,7 @@ var ExternalDropZone = ({
|
|
|
19722
19870
|
},
|
|
19723
19871
|
[getScrollContainer]
|
|
19724
19872
|
);
|
|
19725
|
-
|
|
19873
|
+
useEffect56(() => {
|
|
19726
19874
|
if (!isPlacementMode) return;
|
|
19727
19875
|
const handleKeyDown = (e) => {
|
|
19728
19876
|
if (e.key === "Escape") {
|
|
@@ -19745,13 +19893,13 @@ var ExternalDropZone = ({
|
|
|
19745
19893
|
document.removeEventListener("click", handleGlobalClick, true);
|
|
19746
19894
|
};
|
|
19747
19895
|
}, [isPlacementMode, onPlacementCancel]);
|
|
19748
|
-
|
|
19896
|
+
useEffect56(() => {
|
|
19749
19897
|
if (!isPlacementMode) {
|
|
19750
19898
|
setIsHoveringInPlacementMode(false);
|
|
19751
19899
|
dropPositionRef.current = null;
|
|
19752
19900
|
}
|
|
19753
19901
|
}, [isPlacementMode]);
|
|
19754
|
-
|
|
19902
|
+
useEffect56(() => {
|
|
19755
19903
|
const isActive = isValidDrag || isPlacementMode && isHoveringInPlacementMode;
|
|
19756
19904
|
if (isActive) {
|
|
19757
19905
|
document.body.classList.add("external-artifact-drag-active");
|
|
@@ -19762,19 +19910,19 @@ var ExternalDropZone = ({
|
|
|
19762
19910
|
document.body.classList.remove("external-artifact-drag-active");
|
|
19763
19911
|
};
|
|
19764
19912
|
}, [isValidDrag, isPlacementMode, isHoveringInPlacementMode]);
|
|
19765
|
-
|
|
19913
|
+
useEffect56(() => {
|
|
19766
19914
|
return () => {
|
|
19767
19915
|
if (scrollAnimationRef.current) {
|
|
19768
19916
|
cancelAnimationFrame(scrollAnimationRef.current);
|
|
19769
19917
|
}
|
|
19770
19918
|
};
|
|
19771
19919
|
}, []);
|
|
19772
|
-
const indicatorWithPosition = dropIndicator &&
|
|
19920
|
+
const indicatorWithPosition = dropIndicator && React200.isValidElement(dropIndicator) ? React200.cloneElement(dropIndicator, {
|
|
19773
19921
|
indicatorTop: typeof indicatorStyle.top === "number" ? indicatorStyle.top : void 0
|
|
19774
19922
|
}) : dropIndicator;
|
|
19775
19923
|
const shouldShowIndicator = isValidDrag || isPlacementMode && isHoveringInPlacementMode;
|
|
19776
|
-
return /* @__PURE__ */
|
|
19777
|
-
|
|
19924
|
+
return /* @__PURE__ */ React200.createElement(
|
|
19925
|
+
Box39,
|
|
19778
19926
|
{
|
|
19779
19927
|
ref: containerRef,
|
|
19780
19928
|
style: {
|
|
@@ -19789,8 +19937,8 @@ var ExternalDropZone = ({
|
|
|
19789
19937
|
"data-placement-mode": isPlacementMode ? "true" : void 0
|
|
19790
19938
|
},
|
|
19791
19939
|
children,
|
|
19792
|
-
isPlacementMode && /* @__PURE__ */
|
|
19793
|
-
|
|
19940
|
+
isPlacementMode && /* @__PURE__ */ React200.createElement(
|
|
19941
|
+
Box39,
|
|
19794
19942
|
{
|
|
19795
19943
|
style: {
|
|
19796
19944
|
position: "absolute",
|
|
@@ -19809,20 +19957,20 @@ var ExternalDropZone = ({
|
|
|
19809
19957
|
onWheel: handleOverlayWheel
|
|
19810
19958
|
}
|
|
19811
19959
|
),
|
|
19812
|
-
shouldShowIndicator && indicatorWithPosition && /* @__PURE__ */
|
|
19960
|
+
shouldShowIndicator && indicatorWithPosition && /* @__PURE__ */ React200.createElement(Box39, { style: { ...indicatorStyle, background: "none", border: "none", boxShadow: "none" } }, indicatorWithPosition)
|
|
19813
19961
|
);
|
|
19814
19962
|
};
|
|
19815
19963
|
|
|
19816
19964
|
// src/mantine/IxoEditor.tsx
|
|
19817
|
-
import
|
|
19965
|
+
import React202 from "react";
|
|
19818
19966
|
import { getDefaultReactSlashMenuItems, SuggestionMenuController } from "@blocknote/react";
|
|
19819
19967
|
import { BlockNoteView } from "@blocknote/mantine";
|
|
19820
19968
|
import { filterSuggestionItems } from "@blocknote/core";
|
|
19821
19969
|
import { MantineProvider } from "@mantine/core";
|
|
19822
19970
|
|
|
19823
19971
|
// src/mantine/components/PanelContent.tsx
|
|
19824
|
-
import
|
|
19825
|
-
import { Box as
|
|
19972
|
+
import React201 from "react";
|
|
19973
|
+
import { Box as Box40 } from "@mantine/core";
|
|
19826
19974
|
var panelStyles = {
|
|
19827
19975
|
light: {
|
|
19828
19976
|
backgroundColor: "#ffffff",
|
|
@@ -19851,8 +19999,8 @@ function PanelContent({ theme }) {
|
|
|
19851
19999
|
const { activePanel, registeredPanels } = usePanelStore();
|
|
19852
20000
|
const isOpen = activePanel !== null;
|
|
19853
20001
|
const content = activePanel ? registeredPanels.get(activePanel) : null;
|
|
19854
|
-
return /* @__PURE__ */
|
|
19855
|
-
|
|
20002
|
+
return /* @__PURE__ */ React201.createElement(
|
|
20003
|
+
Box40,
|
|
19856
20004
|
{
|
|
19857
20005
|
pos: "sticky",
|
|
19858
20006
|
right: 0,
|
|
@@ -19892,7 +20040,7 @@ function IxoEditorContent({
|
|
|
19892
20040
|
}) {
|
|
19893
20041
|
const { activePanel } = usePanelStore();
|
|
19894
20042
|
const isPanelOpen = activePanel !== null;
|
|
19895
|
-
const editorContent = /* @__PURE__ */
|
|
20043
|
+
const editorContent = /* @__PURE__ */ React202.createElement(
|
|
19896
20044
|
BlockNoteView,
|
|
19897
20045
|
{
|
|
19898
20046
|
editor,
|
|
@@ -19907,7 +20055,7 @@ function IxoEditorContent({
|
|
|
19907
20055
|
onChange,
|
|
19908
20056
|
onSelectionChange
|
|
19909
20057
|
},
|
|
19910
|
-
config.slashMenu && /* @__PURE__ */
|
|
20058
|
+
config.slashMenu && /* @__PURE__ */ React202.createElement(
|
|
19911
20059
|
SuggestionMenuController,
|
|
19912
20060
|
{
|
|
19913
20061
|
triggerCharacter: "/",
|
|
@@ -19920,7 +20068,7 @@ function IxoEditorContent({
|
|
|
19920
20068
|
),
|
|
19921
20069
|
children
|
|
19922
20070
|
);
|
|
19923
|
-
return /* @__PURE__ */
|
|
20071
|
+
return /* @__PURE__ */ React202.createElement("div", { style: { display: "flex", height: "100%", width: "100%", gap: 0 } }, /* @__PURE__ */ React202.createElement(
|
|
19924
20072
|
"div",
|
|
19925
20073
|
{
|
|
19926
20074
|
className: `ixo-editor ixo-editor--theme-${config.theme} ${className}`,
|
|
@@ -19929,9 +20077,9 @@ function IxoEditorContent({
|
|
|
19929
20077
|
transition: "width 0.2s ease"
|
|
19930
20078
|
}
|
|
19931
20079
|
},
|
|
19932
|
-
selfNav && /* @__PURE__ */
|
|
19933
|
-
/* @__PURE__ */
|
|
19934
|
-
(onExternalDrop || isPlacementMode) && isEditable ? /* @__PURE__ */
|
|
20080
|
+
selfNav && /* @__PURE__ */ React202.createElement(PageHeader, { ...pageHeaderProps }),
|
|
20081
|
+
/* @__PURE__ */ React202.createElement(CoverImage, { coverImageUrl, logoUrl }),
|
|
20082
|
+
(onExternalDrop || isPlacementMode) && isEditable ? /* @__PURE__ */ React202.createElement(
|
|
19935
20083
|
ExternalDropZone,
|
|
19936
20084
|
{
|
|
19937
20085
|
editor,
|
|
@@ -19944,7 +20092,7 @@ function IxoEditorContent({
|
|
|
19944
20092
|
},
|
|
19945
20093
|
editorContent
|
|
19946
20094
|
) : editorContent
|
|
19947
|
-
), isPanelVisible && /* @__PURE__ */
|
|
20095
|
+
), isPanelVisible && /* @__PURE__ */ React202.createElement(PanelContent, { theme: config.theme }));
|
|
19948
20096
|
}
|
|
19949
20097
|
function IxoEditor({
|
|
19950
20098
|
editor,
|
|
@@ -19984,7 +20132,7 @@ function IxoEditor({
|
|
|
19984
20132
|
tableHandles: true
|
|
19985
20133
|
};
|
|
19986
20134
|
const isEditable = editable;
|
|
19987
|
-
const editorContent = /* @__PURE__ */
|
|
20135
|
+
const editorContent = /* @__PURE__ */ React202.createElement(
|
|
19988
20136
|
BlocknoteProvider,
|
|
19989
20137
|
{
|
|
19990
20138
|
editor,
|
|
@@ -19996,7 +20144,7 @@ function IxoEditor({
|
|
|
19996
20144
|
dynamicListPanelRenderer,
|
|
19997
20145
|
domainCardRenderer
|
|
19998
20146
|
},
|
|
19999
|
-
/* @__PURE__ */
|
|
20147
|
+
/* @__PURE__ */ React202.createElement(
|
|
20000
20148
|
IxoEditorContent,
|
|
20001
20149
|
{
|
|
20002
20150
|
isPanelVisible,
|
|
@@ -20020,14 +20168,14 @@ function IxoEditor({
|
|
|
20020
20168
|
)
|
|
20021
20169
|
);
|
|
20022
20170
|
if (mantineTheme) {
|
|
20023
|
-
return /* @__PURE__ */
|
|
20171
|
+
return /* @__PURE__ */ React202.createElement(MantineProvider, { theme: mantineTheme }, editorContent);
|
|
20024
20172
|
}
|
|
20025
20173
|
return editorContent;
|
|
20026
20174
|
}
|
|
20027
20175
|
|
|
20028
20176
|
// src/mantine/components/EntitySigningSetup.tsx
|
|
20029
|
-
import
|
|
20030
|
-
import { Modal as Modal3, Stack as
|
|
20177
|
+
import React203, { useState as useState72 } from "react";
|
|
20178
|
+
import { Modal as Modal3, Stack as Stack127, Text as Text101, TextInput as TextInput7, Button as Button36, Alert as Alert26, Group as Group64 } from "@mantine/core";
|
|
20031
20179
|
import { IconAlertCircle as IconAlertCircle13, IconCheck as IconCheck7, IconKey as IconKey2 } from "@tabler/icons-react";
|
|
20032
20180
|
var EntitySigningSetup = ({
|
|
20033
20181
|
opened,
|
|
@@ -20036,11 +20184,11 @@ var EntitySigningSetup = ({
|
|
|
20036
20184
|
entityName,
|
|
20037
20185
|
onSetup
|
|
20038
20186
|
}) => {
|
|
20039
|
-
const [pin, setPin] =
|
|
20040
|
-
const [confirmPin, setConfirmPin] =
|
|
20041
|
-
const [loading, setLoading] =
|
|
20042
|
-
const [error, setError] =
|
|
20043
|
-
const [success, setSuccess] =
|
|
20187
|
+
const [pin, setPin] = useState72("");
|
|
20188
|
+
const [confirmPin, setConfirmPin] = useState72("");
|
|
20189
|
+
const [loading, setLoading] = useState72(false);
|
|
20190
|
+
const [error, setError] = useState72(null);
|
|
20191
|
+
const [success, setSuccess] = useState72(false);
|
|
20044
20192
|
const handleSetup = async () => {
|
|
20045
20193
|
if (pin.length < 4) {
|
|
20046
20194
|
setError("PIN must be at least 4 characters");
|
|
@@ -20080,16 +20228,16 @@ var EntitySigningSetup = ({
|
|
|
20080
20228
|
setSuccess(false);
|
|
20081
20229
|
}
|
|
20082
20230
|
};
|
|
20083
|
-
return /* @__PURE__ */
|
|
20231
|
+
return /* @__PURE__ */ React203.createElement(
|
|
20084
20232
|
Modal3,
|
|
20085
20233
|
{
|
|
20086
20234
|
opened,
|
|
20087
20235
|
onClose: handleClose,
|
|
20088
|
-
title: /* @__PURE__ */
|
|
20236
|
+
title: /* @__PURE__ */ React203.createElement(Group64, { gap: "xs" }, /* @__PURE__ */ React203.createElement(IconKey2, { size: 20 }), /* @__PURE__ */ React203.createElement(Text101, { fw: 600 }, "Entity Signing Setup")),
|
|
20089
20237
|
size: "md"
|
|
20090
20238
|
},
|
|
20091
|
-
/* @__PURE__ */
|
|
20092
|
-
|
|
20239
|
+
/* @__PURE__ */ React203.createElement(Stack127, { gap: "md" }, success ? /* @__PURE__ */ React203.createElement(Alert26, { color: "green", icon: /* @__PURE__ */ React203.createElement(IconCheck7, { size: 16 }) }, "Entity signing key set up successfully!") : /* @__PURE__ */ React203.createElement(React203.Fragment, null, /* @__PURE__ */ React203.createElement(Text101, { size: "sm", c: "dimmed" }, "Flow authorization requires a signing key for", " ", /* @__PURE__ */ React203.createElement(Text101, { span: true, fw: 500 }, entityName || entityDid), "."), /* @__PURE__ */ React203.createElement(Alert26, { color: "blue", variant: "light" }, /* @__PURE__ */ React203.createElement(Text101, { size: "sm" }, "This is a ", /* @__PURE__ */ React203.createElement("strong", null, "one-time setup"), " that allows flows to grant permissions without requiring wallet signatures for each delegation.")), /* @__PURE__ */ React203.createElement(Stack127, { gap: "xs" }, /* @__PURE__ */ React203.createElement(Text101, { size: "sm", fw: 500 }, "What happens:"), /* @__PURE__ */ React203.createElement(Text101, { size: "sm", c: "dimmed" }, "1. A new signing key is generated"), /* @__PURE__ */ React203.createElement(Text101, { size: "sm", c: "dimmed" }, "2. Key is registered on the entity's DID document (requires wallet)"), /* @__PURE__ */ React203.createElement(Text101, { size: "sm", c: "dimmed" }, "3. Key is stored encrypted in the entity's Matrix room")), /* @__PURE__ */ React203.createElement(
|
|
20240
|
+
TextInput7,
|
|
20093
20241
|
{
|
|
20094
20242
|
label: "Enter PIN to encrypt signing key",
|
|
20095
20243
|
description: "This PIN will be required when granting permissions",
|
|
@@ -20099,8 +20247,8 @@ var EntitySigningSetup = ({
|
|
|
20099
20247
|
onChange: (e) => setPin(e.currentTarget.value),
|
|
20100
20248
|
disabled: loading
|
|
20101
20249
|
}
|
|
20102
|
-
), /* @__PURE__ */
|
|
20103
|
-
|
|
20250
|
+
), /* @__PURE__ */ React203.createElement(
|
|
20251
|
+
TextInput7,
|
|
20104
20252
|
{
|
|
20105
20253
|
label: "Confirm PIN",
|
|
20106
20254
|
type: "password",
|
|
@@ -20109,12 +20257,12 @@ var EntitySigningSetup = ({
|
|
|
20109
20257
|
onChange: (e) => setConfirmPin(e.currentTarget.value),
|
|
20110
20258
|
disabled: loading
|
|
20111
20259
|
}
|
|
20112
|
-
), error && /* @__PURE__ */
|
|
20260
|
+
), error && /* @__PURE__ */ React203.createElement(Alert26, { color: "red", icon: /* @__PURE__ */ React203.createElement(IconAlertCircle13, { size: 16 }) }, error), /* @__PURE__ */ React203.createElement(Group64, { justify: "flex-end", mt: "md" }, /* @__PURE__ */ React203.createElement(Button36, { variant: "subtle", onClick: handleClose, disabled: loading }, "Cancel"), /* @__PURE__ */ React203.createElement(
|
|
20113
20261
|
Button36,
|
|
20114
20262
|
{
|
|
20115
20263
|
onClick: handleSetup,
|
|
20116
20264
|
loading,
|
|
20117
|
-
leftSection: /* @__PURE__ */
|
|
20265
|
+
leftSection: /* @__PURE__ */ React203.createElement(IconKey2, { size: 16 })
|
|
20118
20266
|
},
|
|
20119
20267
|
"Setup Entity Signing"
|
|
20120
20268
|
))))
|
|
@@ -20122,8 +20270,8 @@ var EntitySigningSetup = ({
|
|
|
20122
20270
|
};
|
|
20123
20271
|
|
|
20124
20272
|
// src/mantine/components/FlowPermissionsPanel.tsx
|
|
20125
|
-
import
|
|
20126
|
-
import { Stack as
|
|
20273
|
+
import React204, { useState as useState73, useEffect as useEffect57, useMemo as useMemo67 } from "react";
|
|
20274
|
+
import { Stack as Stack128, Text as Text102, Paper as Paper21, Group as Group65, Badge as Badge31, Button as Button37, ActionIcon as ActionIcon29, Loader as Loader26, Alert as Alert27, Divider as Divider12 } from "@mantine/core";
|
|
20127
20275
|
import { IconPlus as IconPlus5, IconTrash as IconTrash6, IconShieldCheck as IconShieldCheck2, IconUser as IconUser4, IconRobot as IconRobot3, IconBuilding } from "@tabler/icons-react";
|
|
20128
20276
|
var FlowPermissionsPanel = ({
|
|
20129
20277
|
editor,
|
|
@@ -20133,11 +20281,11 @@ var FlowPermissionsPanel = ({
|
|
|
20133
20281
|
onRevokePermission,
|
|
20134
20282
|
getUserDisplayName
|
|
20135
20283
|
}) => {
|
|
20136
|
-
const [delegations, setDelegations] =
|
|
20137
|
-
const [loading, setLoading] =
|
|
20138
|
-
const [revoking, setRevoking] =
|
|
20139
|
-
const rootCapability =
|
|
20140
|
-
|
|
20284
|
+
const [delegations, setDelegations] = useState73([]);
|
|
20285
|
+
const [loading, setLoading] = useState73(true);
|
|
20286
|
+
const [revoking, setRevoking] = useState73(null);
|
|
20287
|
+
const rootCapability = useMemo67(() => editor.getRootCapability?.(), [editor]);
|
|
20288
|
+
useEffect57(() => {
|
|
20141
20289
|
const loadDelegations = async () => {
|
|
20142
20290
|
setLoading(true);
|
|
20143
20291
|
const allDelegations = editor.getAllDelegations?.() || [];
|
|
@@ -20176,11 +20324,11 @@ var FlowPermissionsPanel = ({
|
|
|
20176
20324
|
const getIcon2 = (type) => {
|
|
20177
20325
|
switch (type) {
|
|
20178
20326
|
case "oracle":
|
|
20179
|
-
return /* @__PURE__ */
|
|
20327
|
+
return /* @__PURE__ */ React204.createElement(IconRobot3, { size: 16 });
|
|
20180
20328
|
case "entity":
|
|
20181
|
-
return /* @__PURE__ */
|
|
20329
|
+
return /* @__PURE__ */ React204.createElement(IconBuilding, { size: 16 });
|
|
20182
20330
|
default:
|
|
20183
|
-
return /* @__PURE__ */
|
|
20331
|
+
return /* @__PURE__ */ React204.createElement(IconUser4, { size: 16 });
|
|
20184
20332
|
}
|
|
20185
20333
|
};
|
|
20186
20334
|
const formatCapabilities = (caps) => {
|
|
@@ -20199,7 +20347,7 @@ var FlowPermissionsPanel = ({
|
|
|
20199
20347
|
if (date < /* @__PURE__ */ new Date()) return "Expired";
|
|
20200
20348
|
return date.toLocaleDateString();
|
|
20201
20349
|
};
|
|
20202
|
-
return /* @__PURE__ */
|
|
20350
|
+
return /* @__PURE__ */ React204.createElement(Stack128, { gap: "md" }, /* @__PURE__ */ React204.createElement(Stack128, { gap: "xs" }, /* @__PURE__ */ React204.createElement(Text102, { fw: 600, size: "sm" }, "Root Authority"), /* @__PURE__ */ React204.createElement(Paper21, { p: "sm", withBorder: true }, /* @__PURE__ */ React204.createElement(Group65, { gap: "xs" }, /* @__PURE__ */ React204.createElement(IconShieldCheck2, { size: 20, color: "var(--mantine-color-green-6)" }), /* @__PURE__ */ React204.createElement(Stack128, { gap: 2, style: { flex: 1 } }, /* @__PURE__ */ React204.createElement(Text102, { size: "sm", fw: 500 }, entityName || entityDid), /* @__PURE__ */ React204.createElement(Text102, { size: "xs", c: "dimmed" }, rootCapability ? `Granted: ${new Date(rootCapability.issuedAt).toLocaleDateString()}` : "Root capability not set up")), /* @__PURE__ */ React204.createElement(Badge31, { color: "green", variant: "light" }, "Entity")))), /* @__PURE__ */ React204.createElement(Divider12, { label: "Delegated Permissions", labelPosition: "center" }), loading ? /* @__PURE__ */ React204.createElement(Group65, { justify: "center", py: "xl" }, /* @__PURE__ */ React204.createElement(Loader26, { size: "sm" })) : delegations.length === 0 ? /* @__PURE__ */ React204.createElement(Alert27, { color: "gray", variant: "light" }, /* @__PURE__ */ React204.createElement(Text102, { size: "sm" }, "No permissions have been granted yet.")) : /* @__PURE__ */ React204.createElement(Stack128, { gap: "xs" }, delegations.map(({ capability, displayName, type }) => /* @__PURE__ */ React204.createElement(Paper21, { key: capability.id, p: "sm", withBorder: true }, /* @__PURE__ */ React204.createElement(Group65, { justify: "space-between" }, /* @__PURE__ */ React204.createElement(Group65, { gap: "xs" }, getIcon2(type), /* @__PURE__ */ React204.createElement(Stack128, { gap: 2 }, /* @__PURE__ */ React204.createElement(Text102, { size: "sm", fw: 500 }, displayName), /* @__PURE__ */ React204.createElement(Text102, { size: "xs", c: "dimmed" }, formatCapabilities(capability.capabilities)), /* @__PURE__ */ React204.createElement(Group65, { gap: "xs" }, /* @__PURE__ */ React204.createElement(Text102, { size: "xs", c: "dimmed" }, "Expires: ", formatExpiration(capability.expiration)), /* @__PURE__ */ React204.createElement(Text102, { size: "xs", c: "dimmed" }, "\u2022"), /* @__PURE__ */ React204.createElement(Text102, { size: "xs", c: "dimmed" }, "Granted by: ", capability.issuer === entityDid ? "Entity" : capability.issuer.slice(-8))))), /* @__PURE__ */ React204.createElement(
|
|
20203
20351
|
ActionIcon29,
|
|
20204
20352
|
{
|
|
20205
20353
|
color: "red",
|
|
@@ -20208,11 +20356,11 @@ var FlowPermissionsPanel = ({
|
|
|
20208
20356
|
loading: revoking === capability.id,
|
|
20209
20357
|
disabled: !!revoking
|
|
20210
20358
|
},
|
|
20211
|
-
/* @__PURE__ */
|
|
20212
|
-
))))), /* @__PURE__ */
|
|
20359
|
+
/* @__PURE__ */ React204.createElement(IconTrash6, { size: 16 })
|
|
20360
|
+
))))), /* @__PURE__ */ React204.createElement(
|
|
20213
20361
|
Button37,
|
|
20214
20362
|
{
|
|
20215
|
-
leftSection: /* @__PURE__ */
|
|
20363
|
+
leftSection: /* @__PURE__ */ React204.createElement(IconPlus5, { size: 16 }),
|
|
20216
20364
|
variant: "light",
|
|
20217
20365
|
onClick: onGrantPermission
|
|
20218
20366
|
},
|
|
@@ -20221,14 +20369,14 @@ var FlowPermissionsPanel = ({
|
|
|
20221
20369
|
};
|
|
20222
20370
|
|
|
20223
20371
|
// src/mantine/components/GrantPermissionModal.tsx
|
|
20224
|
-
import
|
|
20372
|
+
import React205, { useState as useState74, useCallback as useCallback53 } from "react";
|
|
20225
20373
|
import {
|
|
20226
20374
|
Modal as Modal4,
|
|
20227
|
-
Stack as
|
|
20228
|
-
Text as
|
|
20229
|
-
TextInput as
|
|
20375
|
+
Stack as Stack129,
|
|
20376
|
+
Text as Text103,
|
|
20377
|
+
TextInput as TextInput8,
|
|
20230
20378
|
Button as Button38,
|
|
20231
|
-
Group as
|
|
20379
|
+
Group as Group66,
|
|
20232
20380
|
Radio as Radio6,
|
|
20233
20381
|
Checkbox as Checkbox12,
|
|
20234
20382
|
Alert as Alert28,
|
|
@@ -20239,7 +20387,7 @@ import {
|
|
|
20239
20387
|
Divider as Divider13,
|
|
20240
20388
|
NumberInput as NumberInput3
|
|
20241
20389
|
} from "@mantine/core";
|
|
20242
|
-
import { IconSearch as
|
|
20390
|
+
import { IconSearch as IconSearch6, IconUser as IconUser5, IconRobot as IconRobot4, IconX as IconX9, IconShieldPlus as IconShieldPlus3 } from "@tabler/icons-react";
|
|
20243
20391
|
var GrantPermissionModal = ({
|
|
20244
20392
|
opened,
|
|
20245
20393
|
onClose,
|
|
@@ -20253,20 +20401,20 @@ var GrantPermissionModal = ({
|
|
|
20253
20401
|
const singleBlockMode = !!targetBlockId || blocks.length === 1;
|
|
20254
20402
|
const fixedBlockId = targetBlockId || (blocks.length === 1 ? blocks[0].id : null);
|
|
20255
20403
|
const fixedBlock = fixedBlockId ? blocks.find((b) => b.id === fixedBlockId) || blocks[0] : null;
|
|
20256
|
-
const [recipientType, setRecipientType] =
|
|
20257
|
-
const [searchQuery, setSearchQuery] =
|
|
20258
|
-
const [searchResults, setSearchResults] =
|
|
20259
|
-
const [searching, setSearching] =
|
|
20260
|
-
const [selectedRecipient, setSelectedRecipient] =
|
|
20261
|
-
const [manualDid, setManualDid] =
|
|
20262
|
-
const [scopeType, setScopeType] =
|
|
20263
|
-
const [selectedBlocks, setSelectedBlocks] =
|
|
20264
|
-
const [expirationEnabled, setExpirationEnabled] =
|
|
20265
|
-
const [expirationDays, setExpirationDays] =
|
|
20266
|
-
const [canDelegate, setCanDelegate] =
|
|
20267
|
-
const [pin, setPin] =
|
|
20268
|
-
const [loading, setLoading] =
|
|
20269
|
-
const [error, setError] =
|
|
20404
|
+
const [recipientType, setRecipientType] = useState74("user");
|
|
20405
|
+
const [searchQuery, setSearchQuery] = useState74("");
|
|
20406
|
+
const [searchResults, setSearchResults] = useState74([]);
|
|
20407
|
+
const [searching, setSearching] = useState74(false);
|
|
20408
|
+
const [selectedRecipient, setSelectedRecipient] = useState74(null);
|
|
20409
|
+
const [manualDid, setManualDid] = useState74("");
|
|
20410
|
+
const [scopeType, setScopeType] = useState74("full");
|
|
20411
|
+
const [selectedBlocks, setSelectedBlocks] = useState74([]);
|
|
20412
|
+
const [expirationEnabled, setExpirationEnabled] = useState74(false);
|
|
20413
|
+
const [expirationDays, setExpirationDays] = useState74(30);
|
|
20414
|
+
const [canDelegate, setCanDelegate] = useState74(false);
|
|
20415
|
+
const [pin, setPin] = useState74("");
|
|
20416
|
+
const [loading, setLoading] = useState74(false);
|
|
20417
|
+
const [error, setError] = useState74(null);
|
|
20270
20418
|
const handleSearch = useCallback53(async () => {
|
|
20271
20419
|
if (searchQuery.length < 2) return;
|
|
20272
20420
|
setSearching(true);
|
|
@@ -20354,29 +20502,29 @@ var GrantPermissionModal = ({
|
|
|
20354
20502
|
resetForm();
|
|
20355
20503
|
}
|
|
20356
20504
|
};
|
|
20357
|
-
return /* @__PURE__ */
|
|
20505
|
+
return /* @__PURE__ */ React205.createElement(
|
|
20358
20506
|
Modal4,
|
|
20359
20507
|
{
|
|
20360
20508
|
opened,
|
|
20361
20509
|
onClose: handleClose,
|
|
20362
|
-
title: /* @__PURE__ */
|
|
20510
|
+
title: /* @__PURE__ */ React205.createElement(Group66, { gap: "xs" }, /* @__PURE__ */ React205.createElement(IconShieldPlus3, { size: 20 }), /* @__PURE__ */ React205.createElement(Text103, { fw: 600 }, "Grant Permission")),
|
|
20363
20511
|
size: "lg"
|
|
20364
20512
|
},
|
|
20365
|
-
/* @__PURE__ */
|
|
20513
|
+
/* @__PURE__ */ React205.createElement(Stack129, { gap: "md" }, /* @__PURE__ */ React205.createElement(Stack129, { gap: "xs" }, /* @__PURE__ */ React205.createElement(Text103, { size: "sm", fw: 500 }, "Recipient Type"), /* @__PURE__ */ React205.createElement(Radio6.Group, { value: recipientType, onChange: (v) => {
|
|
20366
20514
|
setRecipientType(v);
|
|
20367
20515
|
setSelectedRecipient(null);
|
|
20368
20516
|
setSearchResults([]);
|
|
20369
|
-
} }, /* @__PURE__ */
|
|
20370
|
-
|
|
20517
|
+
} }, /* @__PURE__ */ React205.createElement(Group66, null, /* @__PURE__ */ React205.createElement(Radio6, { value: "user", label: "User" }), /* @__PURE__ */ React205.createElement(Radio6, { value: "oracle", label: "Oracle" }), /* @__PURE__ */ React205.createElement(Radio6, { value: "manual", label: "Enter DID" })))), recipientType !== "manual" ? /* @__PURE__ */ React205.createElement(Stack129, { gap: "xs" }, /* @__PURE__ */ React205.createElement(
|
|
20518
|
+
TextInput8,
|
|
20371
20519
|
{
|
|
20372
20520
|
placeholder: recipientType === "oracle" ? "Search oracles..." : "Search users...",
|
|
20373
|
-
leftSection: /* @__PURE__ */
|
|
20374
|
-
rightSection: searching ? /* @__PURE__ */
|
|
20521
|
+
leftSection: /* @__PURE__ */ React205.createElement(IconSearch6, { size: 16 }),
|
|
20522
|
+
rightSection: searching ? /* @__PURE__ */ React205.createElement(Loader27, { size: 14 }) : null,
|
|
20375
20523
|
value: searchQuery,
|
|
20376
20524
|
onChange: (e) => setSearchQuery(e.currentTarget.value),
|
|
20377
20525
|
onKeyDown: (e) => e.key === "Enter" && handleSearch()
|
|
20378
20526
|
}
|
|
20379
|
-
), selectedRecipient ? /* @__PURE__ */
|
|
20527
|
+
), selectedRecipient ? /* @__PURE__ */ React205.createElement(Paper22, { p: "sm", withBorder: true }, /* @__PURE__ */ React205.createElement(Group66, { justify: "space-between" }, /* @__PURE__ */ React205.createElement(Group66, { gap: "xs" }, recipientType === "oracle" ? /* @__PURE__ */ React205.createElement(IconRobot4, { size: 16 }) : /* @__PURE__ */ React205.createElement(IconUser5, { size: 16 }), /* @__PURE__ */ React205.createElement(Text103, { size: "sm" }, selectedRecipient.displayName), /* @__PURE__ */ React205.createElement(Badge32, { size: "xs", variant: "light" }, selectedRecipient.did.slice(-12))), /* @__PURE__ */ React205.createElement(ActionIcon30, { size: "sm", variant: "subtle", onClick: () => setSelectedRecipient(null) }, /* @__PURE__ */ React205.createElement(IconX9, { size: 14 })))) : searchResults.length > 0 ? /* @__PURE__ */ React205.createElement(Paper22, { p: "xs", withBorder: true, style: { maxHeight: 150, overflow: "auto" } }, /* @__PURE__ */ React205.createElement(Stack129, { gap: 4 }, searchResults.map((result) => /* @__PURE__ */ React205.createElement(
|
|
20380
20528
|
Button38,
|
|
20381
20529
|
{
|
|
20382
20530
|
key: result.did,
|
|
@@ -20386,20 +20534,20 @@ var GrantPermissionModal = ({
|
|
|
20386
20534
|
onClick: () => setSelectedRecipient(result)
|
|
20387
20535
|
},
|
|
20388
20536
|
result.displayName
|
|
20389
|
-
)))) : null) : /* @__PURE__ */
|
|
20390
|
-
|
|
20537
|
+
)))) : null) : /* @__PURE__ */ React205.createElement(
|
|
20538
|
+
TextInput8,
|
|
20391
20539
|
{
|
|
20392
20540
|
label: "Recipient DID",
|
|
20393
20541
|
placeholder: "did:ixo:...",
|
|
20394
20542
|
value: manualDid,
|
|
20395
20543
|
onChange: (e) => setManualDid(e.currentTarget.value)
|
|
20396
20544
|
}
|
|
20397
|
-
), /* @__PURE__ */
|
|
20545
|
+
), /* @__PURE__ */ React205.createElement(Divider13, null), /* @__PURE__ */ React205.createElement(Stack129, { gap: "xs" }, /* @__PURE__ */ React205.createElement(Text103, { size: "sm", fw: 500 }, "Permission Scope"), singleBlockMode && fixedBlock ? (
|
|
20398
20546
|
// Single block mode: show fixed block info
|
|
20399
|
-
/* @__PURE__ */
|
|
20547
|
+
/* @__PURE__ */ React205.createElement(Paper22, { p: "sm", withBorder: true }, /* @__PURE__ */ React205.createElement(Group66, { gap: "xs" }, /* @__PURE__ */ React205.createElement(Badge32, { variant: "light", color: "blue" }, fixedBlock.type), /* @__PURE__ */ React205.createElement(Text103, { size: "sm" }, fixedBlock.name || `Block ${fixedBlock.id.slice(-8)}`)), /* @__PURE__ */ React205.createElement(Text103, { size: "xs", c: "dimmed", mt: "xs" }, "Permission will be granted to execute this specific block."))
|
|
20400
20548
|
) : (
|
|
20401
20549
|
// Multi-block mode: show scope selection
|
|
20402
|
-
/* @__PURE__ */
|
|
20550
|
+
/* @__PURE__ */ React205.createElement(React205.Fragment, null, /* @__PURE__ */ React205.createElement(Radio6.Group, { value: scopeType, onChange: (v) => setScopeType(v) }, /* @__PURE__ */ React205.createElement(Stack129, { gap: "xs" }, /* @__PURE__ */ React205.createElement(Radio6, { value: "full", label: "Full flow access (can execute any block)" }), /* @__PURE__ */ React205.createElement(Radio6, { value: "blocks", label: "Specific blocks only" }))), scopeType === "blocks" && /* @__PURE__ */ React205.createElement(Paper22, { p: "sm", withBorder: true, style: { maxHeight: 150, overflow: "auto" } }, /* @__PURE__ */ React205.createElement(Stack129, { gap: "xs" }, blocks.map((block) => /* @__PURE__ */ React205.createElement(
|
|
20403
20551
|
Checkbox12,
|
|
20404
20552
|
{
|
|
20405
20553
|
key: block.id,
|
|
@@ -20414,14 +20562,14 @@ var GrantPermissionModal = ({
|
|
|
20414
20562
|
}
|
|
20415
20563
|
}
|
|
20416
20564
|
)))))
|
|
20417
|
-
)), /* @__PURE__ */
|
|
20565
|
+
)), /* @__PURE__ */ React205.createElement(Divider13, null), /* @__PURE__ */ React205.createElement(Stack129, { gap: "xs" }, /* @__PURE__ */ React205.createElement(
|
|
20418
20566
|
Checkbox12,
|
|
20419
20567
|
{
|
|
20420
20568
|
label: "Set expiration",
|
|
20421
20569
|
checked: expirationEnabled,
|
|
20422
20570
|
onChange: (e) => setExpirationEnabled(e.currentTarget.checked)
|
|
20423
20571
|
}
|
|
20424
|
-
), expirationEnabled && /* @__PURE__ */
|
|
20572
|
+
), expirationEnabled && /* @__PURE__ */ React205.createElement(
|
|
20425
20573
|
NumberInput3,
|
|
20426
20574
|
{
|
|
20427
20575
|
label: "Expires in (days)",
|
|
@@ -20431,7 +20579,7 @@ var GrantPermissionModal = ({
|
|
|
20431
20579
|
min: 1,
|
|
20432
20580
|
max: 365
|
|
20433
20581
|
}
|
|
20434
|
-
)), /* @__PURE__ */
|
|
20582
|
+
)), /* @__PURE__ */ React205.createElement(
|
|
20435
20583
|
Checkbox12,
|
|
20436
20584
|
{
|
|
20437
20585
|
label: "Recipient can grant permissions to others",
|
|
@@ -20439,8 +20587,8 @@ var GrantPermissionModal = ({
|
|
|
20439
20587
|
checked: canDelegate,
|
|
20440
20588
|
onChange: (e) => setCanDelegate(e.currentTarget.checked)
|
|
20441
20589
|
}
|
|
20442
|
-
), /* @__PURE__ */
|
|
20443
|
-
|
|
20590
|
+
), /* @__PURE__ */ React205.createElement(Divider13, null), /* @__PURE__ */ React205.createElement(
|
|
20591
|
+
TextInput8,
|
|
20444
20592
|
{
|
|
20445
20593
|
label: "Enter your PIN to sign this delegation",
|
|
20446
20594
|
type: "password",
|
|
@@ -20448,7 +20596,7 @@ var GrantPermissionModal = ({
|
|
|
20448
20596
|
value: pin,
|
|
20449
20597
|
onChange: (e) => setPin(e.currentTarget.value)
|
|
20450
20598
|
}
|
|
20451
|
-
), error && /* @__PURE__ */
|
|
20599
|
+
), error && /* @__PURE__ */ React205.createElement(Alert28, { color: "red" }, error), /* @__PURE__ */ React205.createElement(Group66, { justify: "flex-end" }, /* @__PURE__ */ React205.createElement(Button38, { variant: "subtle", onClick: handleClose, disabled: loading }, "Cancel"), /* @__PURE__ */ React205.createElement(Button38, { onClick: handleGrant, loading }, "Grant Permission")))
|
|
20452
20600
|
);
|
|
20453
20601
|
};
|
|
20454
20602
|
|
|
@@ -20543,6 +20691,7 @@ export {
|
|
|
20543
20691
|
getExtraSlashMenuItems,
|
|
20544
20692
|
useCreateIxoEditor,
|
|
20545
20693
|
useCreateCollaborativeIxoEditor,
|
|
20694
|
+
BaseIconPicker,
|
|
20546
20695
|
CoverImage,
|
|
20547
20696
|
PageHeader,
|
|
20548
20697
|
ExternalDropZone,
|
|
@@ -20554,4 +20703,4 @@ export {
|
|
|
20554
20703
|
ixoGraphQLClient,
|
|
20555
20704
|
getEntity
|
|
20556
20705
|
};
|
|
20557
|
-
//# sourceMappingURL=chunk-
|
|
20706
|
+
//# sourceMappingURL=chunk-7ROKCOSH.mjs.map
|