@ixo/editor 1.11.0 → 1.13.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.
|
@@ -24,29 +24,34 @@ var BlocknoteProvider = ({ children, editor, handlers, blockRequirements, editab
|
|
|
24
24
|
const sharedProposalsRef = useRef({});
|
|
25
25
|
const [activeDrawerId, setActiveDrawerId] = useState(null);
|
|
26
26
|
const [drawerContent, setDrawerContent] = useState(null);
|
|
27
|
-
const
|
|
27
|
+
const initialDocType = editor?.getDocType?.() || "flow";
|
|
28
|
+
console.log("[BlocknoteContext] Initial docType from editor:", initialDocType);
|
|
29
|
+
const [docType, setDocType] = useState(initialDocType);
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
console.log("[BlocknoteContext] docType state updated to:", docType);
|
|
32
|
+
}, [docType]);
|
|
28
33
|
useEffect(() => {
|
|
29
34
|
if (!editor?._yRoot) {
|
|
30
|
-
console.log("[BlocknoteContext] No editor._yRoot, skipping
|
|
35
|
+
console.log("[BlocknoteContext] No editor._yRoot, skipping observer setup");
|
|
31
36
|
return;
|
|
32
37
|
}
|
|
33
38
|
const updateDocType = () => {
|
|
34
39
|
const newDocType = editor.getDocType?.() || "flow";
|
|
35
|
-
console.log("[BlocknoteContext]
|
|
36
|
-
|
|
37
|
-
console.log("[BlocknoteContext]
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
+
console.log("[BlocknoteContext] updateDocType() called, newDocType:", newDocType, "current docType:", docType);
|
|
41
|
+
if (newDocType !== docType) {
|
|
42
|
+
console.log("[BlocknoteContext] docType changed from", docType, "to", newDocType);
|
|
43
|
+
setDocType(newDocType);
|
|
44
|
+
}
|
|
40
45
|
};
|
|
41
|
-
console.log("[BlocknoteContext] Setting up
|
|
46
|
+
console.log("[BlocknoteContext] Setting up observer, calling updateDocType() initially");
|
|
42
47
|
updateDocType();
|
|
43
48
|
const observer = () => {
|
|
44
|
-
console.log("[BlocknoteContext] YMap observer
|
|
49
|
+
console.log("[BlocknoteContext] YMap observer triggered, calling updateDocType()");
|
|
45
50
|
updateDocType();
|
|
46
51
|
};
|
|
47
52
|
editor._yRoot?.observe(observer);
|
|
48
53
|
return () => {
|
|
49
|
-
console.log("[BlocknoteContext]
|
|
54
|
+
console.log("[BlocknoteContext] Unobserving YMap");
|
|
50
55
|
editor._yRoot?.unobserve(observer);
|
|
51
56
|
};
|
|
52
57
|
}, [editor]);
|
|
@@ -466,12 +471,6 @@ function PropertyValueInput({ property, value, onChange, disabled = false }) {
|
|
|
466
471
|
|
|
467
472
|
// src/mantine/blocks/components/ConditionBuilder/ConditionRow.tsx
|
|
468
473
|
function ConditionRow({ condition, availableBlocks, onUpdate, onDelete }) {
|
|
469
|
-
console.log("[ConditionRow] Props:", {
|
|
470
|
-
conditionId: condition.id,
|
|
471
|
-
sourceBlockId: condition.sourceBlockId,
|
|
472
|
-
sourceBlockType: condition.sourceBlockType,
|
|
473
|
-
availableBlocks: availableBlocks.length
|
|
474
|
-
});
|
|
475
474
|
const availableProperties = useMemo(() => {
|
|
476
475
|
if (!condition.sourceBlockType) return [];
|
|
477
476
|
return getConditionableProperties(condition.sourceBlockType);
|
|
@@ -507,11 +506,6 @@ function ConditionRow({ condition, availableBlocks, onUpdate, onDelete }) {
|
|
|
507
506
|
);
|
|
508
507
|
const handleSourceBlockChange = useCallback3(
|
|
509
508
|
(value) => {
|
|
510
|
-
console.log("[ConditionRow] Block selection changed:", {
|
|
511
|
-
oldValue: `${condition.sourceBlockType}:${condition.sourceBlockId}`,
|
|
512
|
-
newValue: value,
|
|
513
|
-
conditionId: condition.id
|
|
514
|
-
});
|
|
515
509
|
if (!value) {
|
|
516
510
|
const updatedCondition2 = {
|
|
517
511
|
...condition,
|
|
@@ -519,7 +513,6 @@ function ConditionRow({ condition, availableBlocks, onUpdate, onDelete }) {
|
|
|
519
513
|
sourceBlockType: "",
|
|
520
514
|
rule: { ...condition.rule, property: "", value: "" }
|
|
521
515
|
};
|
|
522
|
-
console.log("[ConditionRow] Calling onUpdate with cleared condition:", updatedCondition2);
|
|
523
516
|
onUpdate(updatedCondition2);
|
|
524
517
|
return;
|
|
525
518
|
}
|
|
@@ -530,7 +523,6 @@ function ConditionRow({ condition, availableBlocks, onUpdate, onDelete }) {
|
|
|
530
523
|
sourceBlockType: blockType,
|
|
531
524
|
rule: { ...condition.rule, property: "", value: "" }
|
|
532
525
|
};
|
|
533
|
-
console.log("[ConditionRow] Calling onUpdate with new block selection:", updatedCondition);
|
|
534
526
|
onUpdate(updatedCondition);
|
|
535
527
|
},
|
|
536
528
|
[condition, onUpdate]
|
|
@@ -646,21 +638,11 @@ function ConditionRow({ condition, availableBlocks, onUpdate, onDelete }) {
|
|
|
646
638
|
|
|
647
639
|
// src/mantine/components/ConditionsTab.tsx
|
|
648
640
|
function ConditionsTab({ block, editor }) {
|
|
649
|
-
console.log("[ConditionsTab] Raw block.props.conditions:", block.props.conditions);
|
|
650
641
|
const currentConditions = parseConditionConfig(block.props.conditions);
|
|
651
642
|
const availableBlocks = getAvailableBlocks(editor?.document || [], block.id);
|
|
652
|
-
console.log("[ConditionsTab] Debug info:", {
|
|
653
|
-
blockId: block?.id,
|
|
654
|
-
blockType: block?.type,
|
|
655
|
-
editorDocument: editor?.document,
|
|
656
|
-
availableBlocks,
|
|
657
|
-
currentConditions
|
|
658
|
-
});
|
|
659
643
|
const updateConditions = useCallback5(
|
|
660
644
|
(newConfig) => {
|
|
661
|
-
console.log("[ConditionsTab] updateConditions called with:", newConfig);
|
|
662
645
|
const conditionsString = stringifyConditionConfig(newConfig);
|
|
663
|
-
console.log("[ConditionsTab] Stringified conditions:", conditionsString);
|
|
664
646
|
editor.updateBlock(block, {
|
|
665
647
|
props: {
|
|
666
648
|
...block.props,
|
|
@@ -680,33 +662,23 @@ function ConditionsTab({ block, editor }) {
|
|
|
680
662
|
[currentConditions, updateConditions]
|
|
681
663
|
);
|
|
682
664
|
const handleAddCondition = useCallback5(() => {
|
|
683
|
-
console.log("[ConditionsTab] handleAddCondition called");
|
|
684
|
-
console.log("[ConditionsTab] Current conditions before adding:", currentConditions);
|
|
685
665
|
const newCondition = createDefaultCondition();
|
|
686
|
-
console.log("[ConditionsTab] Created new condition:", newCondition);
|
|
687
666
|
const newConfig = {
|
|
688
667
|
...currentConditions,
|
|
689
668
|
enabled: true,
|
|
690
669
|
// Auto-enable when adding first condition
|
|
691
670
|
conditions: [...currentConditions.conditions, newCondition]
|
|
692
671
|
};
|
|
693
|
-
console.log("[ConditionsTab] New config to be saved:", newConfig);
|
|
694
672
|
updateConditions(newConfig);
|
|
695
673
|
}, [currentConditions, updateConditions]);
|
|
696
674
|
const handleUpdateCondition = useCallback5(
|
|
697
675
|
(index, updatedCondition) => {
|
|
698
|
-
console.log("[ConditionsTab] Updating condition at index:", {
|
|
699
|
-
index,
|
|
700
|
-
updatedCondition,
|
|
701
|
-
currentConditions: currentConditions.conditions.length
|
|
702
|
-
});
|
|
703
676
|
const newConditions = [...currentConditions.conditions];
|
|
704
677
|
newConditions[index] = updatedCondition;
|
|
705
678
|
const newConfig = {
|
|
706
679
|
...currentConditions,
|
|
707
680
|
conditions: newConditions
|
|
708
681
|
};
|
|
709
|
-
console.log("[ConditionsTab] New config being sent:", newConfig);
|
|
710
682
|
updateConditions(newConfig);
|
|
711
683
|
},
|
|
712
684
|
[currentConditions, updateConditions]
|
|
@@ -740,14 +712,7 @@ function ConditionsTab({ block, editor }) {
|
|
|
740
712
|
onChange: handleModeChange,
|
|
741
713
|
fullWidth: true
|
|
742
714
|
}
|
|
743
|
-
)), /* @__PURE__ */ React5.createElement(Stack4, { gap: "sm" }, (() => {
|
|
744
|
-
console.log("[ConditionsTab] Rendering conditions:", {
|
|
745
|
-
conditionsCount: currentConditions.conditions.length,
|
|
746
|
-
conditions: currentConditions.conditions
|
|
747
|
-
});
|
|
748
|
-
return null;
|
|
749
|
-
})(), currentConditions.conditions.map((condition, index) => {
|
|
750
|
-
console.log("[ConditionsTab] Rendering condition at index:", index, condition);
|
|
715
|
+
)), /* @__PURE__ */ React5.createElement(Stack4, { gap: "sm" }, currentConditions.conditions.map((condition, index) => {
|
|
751
716
|
return /* @__PURE__ */ React5.createElement(
|
|
752
717
|
ConditionRow,
|
|
753
718
|
{
|
|
@@ -1258,7 +1223,6 @@ function useBlockConditions(block, editor, currentUser) {
|
|
|
1258
1223
|
function CheckboxBlock({ editor, block }) {
|
|
1259
1224
|
const { docType } = useBlocknoteContext();
|
|
1260
1225
|
const { actions } = useBlockConditions(block, editor);
|
|
1261
|
-
console.log("Rendering CheckboxBlock with actions:", actions);
|
|
1262
1226
|
if (docType === "template") {
|
|
1263
1227
|
return /* @__PURE__ */ React12.createElement(CheckboxTemplateView, { editor, block });
|
|
1264
1228
|
}
|
|
@@ -1267,19 +1231,11 @@ function CheckboxBlock({ editor, block }) {
|
|
|
1267
1231
|
const showActionExists = actions.some((a) => a.action === "show");
|
|
1268
1232
|
const shouldHide = hasVisibility && !showActionExists;
|
|
1269
1233
|
if (shouldHide) {
|
|
1270
|
-
console.log("[CheckboxBlock] Hiding block - visibility conditions exist but none passed");
|
|
1271
1234
|
return null;
|
|
1272
1235
|
}
|
|
1273
1236
|
const hasEnable = hasEnableConditions(conditionConfig);
|
|
1274
1237
|
const enableActionExists = actions.some((a) => a.action === "enable");
|
|
1275
1238
|
const shouldDisable = hasEnable && !enableActionExists;
|
|
1276
|
-
console.log("[CheckboxBlock] Enable state:", {
|
|
1277
|
-
blockId: block.id,
|
|
1278
|
-
hasEnable,
|
|
1279
|
-
enableActionExists,
|
|
1280
|
-
shouldDisable,
|
|
1281
|
-
actions
|
|
1282
|
-
});
|
|
1283
1239
|
return /* @__PURE__ */ React12.createElement(
|
|
1284
1240
|
CheckboxFlowView,
|
|
1285
1241
|
{
|
|
@@ -1473,7 +1429,7 @@ var collectionsConfigFields = [
|
|
|
1473
1429
|
label: "Relayed Node DID",
|
|
1474
1430
|
description: "The DID of the relayed node to fetch collections from",
|
|
1475
1431
|
type: "text",
|
|
1476
|
-
required:
|
|
1432
|
+
required: false
|
|
1477
1433
|
}
|
|
1478
1434
|
];
|
|
1479
1435
|
var collectionsSortFields = [
|
|
@@ -2331,7 +2287,7 @@ var CollectionsList = ({ items, mods, isItemChecked, onItemCheck }) => {
|
|
|
2331
2287
|
if (!items || items.length === 0) {
|
|
2332
2288
|
return /* @__PURE__ */ React23.createElement(Text11, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No collections found");
|
|
2333
2289
|
}
|
|
2334
|
-
const rows = items.map((collection) => /* @__PURE__ */ React23.createElement(ListItemContainer, { key: collection.did }, /* @__PURE__ */ React23.createElement(Flex5, { align: "center", gap: "sm" }, /* @__PURE__ */ React23.createElement(Image2, { radius: 16, w: 32, h: 32, src: collection.icon }), /* @__PURE__ */ React23.createElement(Stack13, { gap: 0 }, /* @__PURE__ */ React23.createElement(Text11, { size: "sm" }, collection.name
|
|
2290
|
+
const rows = items.map((collection) => /* @__PURE__ */ React23.createElement(ListItemContainer, { key: collection.did }, /* @__PURE__ */ React23.createElement(Flex5, { align: "center", gap: "sm" }, /* @__PURE__ */ React23.createElement(Image2, { radius: 16, w: 32, h: 32, src: collection.icon }), /* @__PURE__ */ React23.createElement(Stack13, { gap: 0 }, /* @__PURE__ */ React23.createElement(Text11, { size: "sm" }, collection.name), /* @__PURE__ */ React23.createElement(Text11, { size: "sm", c: "dimmed" }, collection.brand))), /* @__PURE__ */ React23.createElement(Flex5, { align: "center", gap: "md" }, /* @__PURE__ */ React23.createElement(Stack13, { ta: "right", gap: 0 }, /* @__PURE__ */ React23.createElement(Text11, { size: "sm" }, collection.totalAssets, " Assets"), /* @__PURE__ */ React23.createElement(Text11, { size: "sm", c: "dimmed" }, collection.currency, collection.price)), mods && /* @__PURE__ */ React23.createElement(
|
|
2335
2291
|
ListItemCheckbox,
|
|
2336
2292
|
{
|
|
2337
2293
|
ariaLabel: `Select collection ${collection.did}`,
|
|
@@ -2440,7 +2396,6 @@ var ListActionsMenu = ({ options, selectionMode, onSelectActionClick, value, onC
|
|
|
2440
2396
|
key: `${opt.key}-${direction}`,
|
|
2441
2397
|
leftSection: /* @__PURE__ */ React31.createElement(Icon, { size: 16 }),
|
|
2442
2398
|
onClick: () => {
|
|
2443
|
-
console.log("Changing sort: ", direction);
|
|
2444
2399
|
onChange({ key: opt.key, direction });
|
|
2445
2400
|
},
|
|
2446
2401
|
"data-active": isActive
|
|
@@ -2883,6 +2838,7 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
2883
2838
|
try {
|
|
2884
2839
|
let result;
|
|
2885
2840
|
let did;
|
|
2841
|
+
let relayerDid;
|
|
2886
2842
|
let groupIds;
|
|
2887
2843
|
let userAddress;
|
|
2888
2844
|
switch (listType) {
|
|
@@ -2906,39 +2862,39 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
2906
2862
|
setData({ items: result.data });
|
|
2907
2863
|
break;
|
|
2908
2864
|
case "collections":
|
|
2909
|
-
|
|
2910
|
-
if (!
|
|
2911
|
-
result = await handlers.getCollections(listConfig.relayedNodeDid ||
|
|
2865
|
+
relayerDid = handlers.getRelayerDid();
|
|
2866
|
+
if (!relayerDid && !listConfig.relayedNodeDid) throw new Error("Relayer is required");
|
|
2867
|
+
result = await handlers.getCollections(listConfig.relayedNodeDid || relayerDid, page);
|
|
2912
2868
|
setData({ items: result.data });
|
|
2913
2869
|
break;
|
|
2914
2870
|
case "investments":
|
|
2915
|
-
|
|
2916
|
-
if (!
|
|
2917
|
-
result = await handlers.getInvestments(listConfig.relayedNodeDid ||
|
|
2871
|
+
relayerDid = handlers.getRelayerDid();
|
|
2872
|
+
if (!relayerDid && !listConfig.relayedNodeDid) throw new Error("Relayer is required");
|
|
2873
|
+
result = await handlers.getInvestments(listConfig.relayedNodeDid || relayerDid, page);
|
|
2918
2874
|
setData({ items: result.data });
|
|
2919
2875
|
break;
|
|
2920
2876
|
case "oracles":
|
|
2921
|
-
|
|
2922
|
-
if (!
|
|
2923
|
-
result = await handlers.getOracles(listConfig.relayedNodeDid ||
|
|
2877
|
+
relayerDid = handlers.getRelayerDid();
|
|
2878
|
+
if (!relayerDid && !listConfig.relayedNodeDid) throw new Error("Relayer is required");
|
|
2879
|
+
result = await handlers.getOracles(listConfig.relayedNodeDid || relayerDid, page);
|
|
2924
2880
|
setData({ items: result.data });
|
|
2925
2881
|
break;
|
|
2926
2882
|
case "pods":
|
|
2927
|
-
|
|
2928
|
-
if (!
|
|
2929
|
-
result = await handlers.getPODs(listConfig.relayedNodeDid ||
|
|
2883
|
+
relayerDid = handlers.getRelayerDid();
|
|
2884
|
+
if (!relayerDid && !listConfig.relayedNodeDid) throw new Error("Relayer is required");
|
|
2885
|
+
result = await handlers.getPODs(listConfig.relayedNodeDid || relayerDid, page);
|
|
2930
2886
|
setData({ items: result.data });
|
|
2931
2887
|
break;
|
|
2932
2888
|
case "proposals":
|
|
2933
|
-
|
|
2934
|
-
if (!
|
|
2935
|
-
result = await handlers.getProposals(listConfig.relayedNodeDid ||
|
|
2889
|
+
relayerDid = handlers.getRelayerDid();
|
|
2890
|
+
if (!relayerDid && !listConfig.relayedNodeDid) throw new Error("Relayer is required");
|
|
2891
|
+
result = await handlers.getProposals(listConfig.relayedNodeDid || relayerDid, page);
|
|
2936
2892
|
setData({ items: result.data });
|
|
2937
2893
|
break;
|
|
2938
2894
|
case "requests":
|
|
2939
|
-
|
|
2940
|
-
if (!
|
|
2941
|
-
result = await handlers.getRequests(listConfig.relayedNodeDid ||
|
|
2895
|
+
relayerDid = handlers.getRelayerDid();
|
|
2896
|
+
if (!relayerDid && !listConfig.relayedNodeDid) throw new Error("Relayer is required");
|
|
2897
|
+
result = await handlers.getRequests(listConfig.relayedNodeDid || relayerDid, page);
|
|
2942
2898
|
setData({ items: result.data });
|
|
2943
2899
|
break;
|
|
2944
2900
|
case "group_members":
|
|
@@ -2948,9 +2904,9 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
2948
2904
|
setData({ items: result.data });
|
|
2949
2905
|
break;
|
|
2950
2906
|
case "validators":
|
|
2951
|
-
|
|
2952
|
-
if (!
|
|
2953
|
-
result = await handlers.getValidators(listConfig.relayedNodeDid ||
|
|
2907
|
+
relayerDid = handlers.getRelayerDid();
|
|
2908
|
+
if (!relayerDid && !listConfig.relayedNodeDid) throw new Error("Relayer is required");
|
|
2909
|
+
result = await handlers.getValidators(listConfig.relayedNodeDid || relayerDid, page);
|
|
2954
2910
|
setData({ items: result.data });
|
|
2955
2911
|
break;
|
|
2956
2912
|
case "dao_members":
|
|
@@ -2972,7 +2928,6 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
2972
2928
|
}, [handlers, page, listType, listConfig]);
|
|
2973
2929
|
useEffect6(() => {
|
|
2974
2930
|
if (listType && listConfig) {
|
|
2975
|
-
console.log("[ListFlowView] useEffect", listType, listConfig);
|
|
2976
2931
|
fetchData();
|
|
2977
2932
|
}
|
|
2978
2933
|
}, [listType, page, listConfig]);
|
|
@@ -2999,7 +2954,6 @@ var ListFlowView = ({ block, editor }) => {
|
|
|
2999
2954
|
}, [data?.items, sortedData, listFilterConfig]);
|
|
3000
2955
|
const renderListComponent = () => {
|
|
3001
2956
|
if (!filteredData || !listType) return null;
|
|
3002
|
-
console.log("[ListFlowView] renderListComponent", data, listType);
|
|
3003
2957
|
switch (listType) {
|
|
3004
2958
|
case "linked_resources":
|
|
3005
2959
|
return /* @__PURE__ */ React37.createElement(LinkedResourcesList, { items: filteredData, config: listConfig, mods: selectionMode, isItemChecked, onItemCheck });
|
|
@@ -3239,16 +3193,37 @@ import { Paper as Paper6, CloseButton as CloseButton4, Title as Title4 } from "@
|
|
|
3239
3193
|
|
|
3240
3194
|
// src/mantine/blocks/proposal/template/GeneralTab.tsx
|
|
3241
3195
|
import React41, { useEffect as useEffect8, useState as useState8 } from "react";
|
|
3242
|
-
import { Stack as Stack25, Text as Text25, TextInput as TextInput5, Textarea as Textarea2 } from "@mantine/core";
|
|
3243
|
-
var GeneralTab3 = ({ title, description, onTitleChange, onDescriptionChange }) => {
|
|
3196
|
+
import { Stack as Stack25, Text as Text25, TextInput as TextInput5, Textarea as Textarea2, Select as Select3, Loader as Loader3 } from "@mantine/core";
|
|
3197
|
+
var GeneralTab3 = ({ title, description, coreAddress, onTitleChange, onDescriptionChange, onGroupChange }) => {
|
|
3198
|
+
const handlers = useBlocknoteHandlers();
|
|
3244
3199
|
const [localTitle, setLocalTitle] = useState8(title || "");
|
|
3245
3200
|
const [localDescription, setLocalDescription] = useState8(description || "");
|
|
3201
|
+
const [groups, setGroups] = useState8([]);
|
|
3202
|
+
const [loadingGroups, setLoadingGroups] = useState8(false);
|
|
3246
3203
|
useEffect8(() => {
|
|
3247
3204
|
setLocalTitle(title || "");
|
|
3248
3205
|
}, [title]);
|
|
3249
3206
|
useEffect8(() => {
|
|
3250
3207
|
setLocalDescription(description || "");
|
|
3251
3208
|
}, [description]);
|
|
3209
|
+
useEffect8(() => {
|
|
3210
|
+
const fetchGroups = async () => {
|
|
3211
|
+
if (!handlers?.getDAOGroups) {
|
|
3212
|
+
console.warn("getDAOGroups handler not available");
|
|
3213
|
+
return;
|
|
3214
|
+
}
|
|
3215
|
+
setLoadingGroups(true);
|
|
3216
|
+
try {
|
|
3217
|
+
const daoGroups = await handlers.getDAOGroups();
|
|
3218
|
+
setGroups(daoGroups);
|
|
3219
|
+
} catch (error) {
|
|
3220
|
+
console.error("Failed to fetch DAO groups:", error);
|
|
3221
|
+
} finally {
|
|
3222
|
+
setLoadingGroups(false);
|
|
3223
|
+
}
|
|
3224
|
+
};
|
|
3225
|
+
fetchGroups();
|
|
3226
|
+
}, [handlers]);
|
|
3252
3227
|
return /* @__PURE__ */ React41.createElement(Stack25, { gap: "lg" }, /* @__PURE__ */ React41.createElement(Stack25, { gap: "xs" }, /* @__PURE__ */ React41.createElement(Text25, { size: "sm", fw: 600 }, "Title"), /* @__PURE__ */ React41.createElement(
|
|
3253
3228
|
TextInput5,
|
|
3254
3229
|
{
|
|
@@ -3272,6 +3247,27 @@ var GeneralTab3 = ({ title, description, onTitleChange, onDescriptionChange }) =
|
|
|
3272
3247
|
onDescriptionChange(newDescription);
|
|
3273
3248
|
}
|
|
3274
3249
|
}
|
|
3250
|
+
)), /* @__PURE__ */ React41.createElement(Stack25, { gap: "xs" }, /* @__PURE__ */ React41.createElement(Text25, { size: "sm", fw: 600 }, "Group"), /* @__PURE__ */ React41.createElement(
|
|
3251
|
+
Select3,
|
|
3252
|
+
{
|
|
3253
|
+
placeholder: loadingGroups ? "Loading groups..." : "Select a DAO group",
|
|
3254
|
+
value: groups.find((g) => g.coreAddress === coreAddress)?.id || null,
|
|
3255
|
+
onChange: (value) => {
|
|
3256
|
+
if (value) {
|
|
3257
|
+
const selectedGroup = groups.find((g) => g.id === value);
|
|
3258
|
+
if (selectedGroup) {
|
|
3259
|
+
onGroupChange(selectedGroup.coreAddress);
|
|
3260
|
+
}
|
|
3261
|
+
}
|
|
3262
|
+
},
|
|
3263
|
+
data: groups.map((group) => ({
|
|
3264
|
+
value: group.id,
|
|
3265
|
+
label: group.name
|
|
3266
|
+
})),
|
|
3267
|
+
disabled: loadingGroups,
|
|
3268
|
+
rightSection: loadingGroups ? /* @__PURE__ */ React41.createElement(Loader3, { size: "xs" }) : void 0,
|
|
3269
|
+
searchable: true
|
|
3270
|
+
}
|
|
3275
3271
|
)));
|
|
3276
3272
|
};
|
|
3277
3273
|
|
|
@@ -3574,7 +3570,7 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
|
|
|
3574
3570
|
|
|
3575
3571
|
// src/mantine/blocks/proposal/actions-components/StakeActionForm.tsx
|
|
3576
3572
|
import React45 from "react";
|
|
3577
|
-
import { Stack as Stack29, TextInput as TextInput8, Select as
|
|
3573
|
+
import { Stack as Stack29, TextInput as TextInput8, Select as Select4, NumberInput as NumberInput3 } from "@mantine/core";
|
|
3578
3574
|
var stakeTypeOptions = [
|
|
3579
3575
|
{ value: StakeType.Delegate, label: "Delegate" },
|
|
3580
3576
|
{ value: StakeType.Undelegate, label: "Undelegate" },
|
|
@@ -3620,7 +3616,7 @@ var StakeActionForm = ({ data, onChange }) => {
|
|
|
3620
3616
|
const isRedelegate = data.stakeType === StakeType.Redelegate;
|
|
3621
3617
|
const needsAmount = data.stakeType !== StakeType.WithdrawDelegatorReward;
|
|
3622
3618
|
return /* @__PURE__ */ React45.createElement(Stack29, { gap: "md" }, /* @__PURE__ */ React45.createElement(
|
|
3623
|
-
|
|
3619
|
+
Select4,
|
|
3624
3620
|
{
|
|
3625
3621
|
label: "Stake Type",
|
|
3626
3622
|
value: data.stakeType,
|
|
@@ -3662,7 +3658,7 @@ var StakeActionForm = ({ data, onChange }) => {
|
|
|
3662
3658
|
styles: inputStyles
|
|
3663
3659
|
}
|
|
3664
3660
|
), /* @__PURE__ */ React45.createElement(
|
|
3665
|
-
|
|
3661
|
+
Select4,
|
|
3666
3662
|
{
|
|
3667
3663
|
label: "Denomination",
|
|
3668
3664
|
value: data.denom,
|
|
@@ -3892,7 +3888,7 @@ Example Stargate message:
|
|
|
3892
3888
|
|
|
3893
3889
|
// src/mantine/blocks/proposal/actions-components/forms/AuthzExecActionForm.tsx
|
|
3894
3890
|
import React50 from "react";
|
|
3895
|
-
import { Stack as Stack34, Select as
|
|
3891
|
+
import { Stack as Stack34, Select as Select5, TextInput as TextInput12, Textarea as Textarea5 } from "@mantine/core";
|
|
3896
3892
|
var inputStyles6 = {
|
|
3897
3893
|
label: { color: "#adb5bd" },
|
|
3898
3894
|
input: {
|
|
@@ -3928,7 +3924,7 @@ var AuthzExecActionForm = ({ data, onChange }) => {
|
|
|
3928
3924
|
}
|
|
3929
3925
|
};
|
|
3930
3926
|
return /* @__PURE__ */ React50.createElement(Stack34, { gap: "md" }, /* @__PURE__ */ React50.createElement(
|
|
3931
|
-
|
|
3927
|
+
Select5,
|
|
3932
3928
|
{
|
|
3933
3929
|
label: "Action Type",
|
|
3934
3930
|
placeholder: "Select action type",
|
|
@@ -4750,7 +4746,7 @@ var CreateEntityActionForm = ({ data, onChange }) => {
|
|
|
4750
4746
|
|
|
4751
4747
|
// src/mantine/blocks/proposal/actions-components/forms/UpdateVotingConfigActionForm.tsx
|
|
4752
4748
|
import React65 from "react";
|
|
4753
|
-
import { Stack as Stack49, Checkbox as Checkbox6, Select as
|
|
4749
|
+
import { Stack as Stack49, Checkbox as Checkbox6, Select as Select6, NumberInput as NumberInput7, Group as Group18 } from "@mantine/core";
|
|
4754
4750
|
var inputStyles21 = {
|
|
4755
4751
|
label: { color: "#adb5bd" },
|
|
4756
4752
|
input: {
|
|
@@ -4775,7 +4771,7 @@ var UpdateVotingConfigActionForm = ({ data, onChange }) => {
|
|
|
4775
4771
|
}
|
|
4776
4772
|
}
|
|
4777
4773
|
), /* @__PURE__ */ React65.createElement(
|
|
4778
|
-
|
|
4774
|
+
Select6,
|
|
4779
4775
|
{
|
|
4780
4776
|
label: "Threshold Type",
|
|
4781
4777
|
value: data.thresholdType,
|
|
@@ -4810,7 +4806,7 @@ var UpdateVotingConfigActionForm = ({ data, onChange }) => {
|
|
|
4810
4806
|
}
|
|
4811
4807
|
}
|
|
4812
4808
|
), data.quorumEnabled && /* @__PURE__ */ React65.createElement(React65.Fragment, null, /* @__PURE__ */ React65.createElement(
|
|
4813
|
-
|
|
4809
|
+
Select6,
|
|
4814
4810
|
{
|
|
4815
4811
|
label: "Quorum Type",
|
|
4816
4812
|
value: data.quorumType,
|
|
@@ -4844,7 +4840,7 @@ var UpdateVotingConfigActionForm = ({ data, onChange }) => {
|
|
|
4844
4840
|
styles: inputStyles21
|
|
4845
4841
|
}
|
|
4846
4842
|
), /* @__PURE__ */ React65.createElement(
|
|
4847
|
-
|
|
4843
|
+
Select6,
|
|
4848
4844
|
{
|
|
4849
4845
|
label: "Duration Units",
|
|
4850
4846
|
value: data.proposalDurationUnits,
|
|
@@ -4873,7 +4869,7 @@ var UpdateVotingConfigActionForm = ({ data, onChange }) => {
|
|
|
4873
4869
|
|
|
4874
4870
|
// src/mantine/blocks/proposal/actions-components/forms/UpdatePreProposeConfigActionForm.tsx
|
|
4875
4871
|
import React66 from "react";
|
|
4876
|
-
import { Stack as Stack50, Checkbox as Checkbox7, TextInput as TextInput26, Select as
|
|
4872
|
+
import { Stack as Stack50, Checkbox as Checkbox7, TextInput as TextInput26, Select as Select7, Textarea as Textarea14 } from "@mantine/core";
|
|
4877
4873
|
var inputStyles22 = {
|
|
4878
4874
|
label: { color: "#adb5bd" },
|
|
4879
4875
|
input: {
|
|
@@ -4922,7 +4918,7 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
|
|
|
4922
4918
|
styles: inputStyles22
|
|
4923
4919
|
}
|
|
4924
4920
|
), /* @__PURE__ */ React66.createElement(
|
|
4925
|
-
|
|
4921
|
+
Select7,
|
|
4926
4922
|
{
|
|
4927
4923
|
label: "Deposit Type",
|
|
4928
4924
|
value: data.depositInfo.type,
|
|
@@ -4987,7 +4983,7 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
|
|
|
4987
4983
|
|
|
4988
4984
|
// src/mantine/blocks/proposal/actions-components/forms/GovernanceVoteActionForm.tsx
|
|
4989
4985
|
import React67 from "react";
|
|
4990
|
-
import { Stack as Stack51, TextInput as TextInput27, Select as
|
|
4986
|
+
import { Stack as Stack51, TextInput as TextInput27, Select as Select8 } from "@mantine/core";
|
|
4991
4987
|
var inputStyles23 = {
|
|
4992
4988
|
label: { color: "#adb5bd" },
|
|
4993
4989
|
input: {
|
|
@@ -5017,7 +5013,7 @@ var GovernanceVoteActionForm = ({ data, onChange }) => {
|
|
|
5017
5013
|
styles: inputStyles23
|
|
5018
5014
|
}
|
|
5019
5015
|
), /* @__PURE__ */ React67.createElement(
|
|
5020
|
-
|
|
5016
|
+
Select8,
|
|
5021
5017
|
{
|
|
5022
5018
|
label: "Vote Option",
|
|
5023
5019
|
value: data.vote?.toString() || "1",
|
|
@@ -5217,7 +5213,7 @@ var SendGroupTokenActionForm = ({ data, onChange }) => {
|
|
|
5217
5213
|
|
|
5218
5214
|
// src/mantine/blocks/proposal/actions-components/forms/ValidatorActionsActionForm.tsx
|
|
5219
5215
|
import React72 from "react";
|
|
5220
|
-
import { Stack as Stack56, Select as
|
|
5216
|
+
import { Stack as Stack56, Select as Select9, Textarea as Textarea16 } from "@mantine/core";
|
|
5221
5217
|
var inputStyles28 = {
|
|
5222
5218
|
label: { color: "#adb5bd" },
|
|
5223
5219
|
input: {
|
|
@@ -5237,7 +5233,7 @@ var ValidatorActionsActionForm = ({ data, onChange }) => {
|
|
|
5237
5233
|
{ value: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission" /* WithdrawValidatorCommission */, label: "Withdraw Commission" }
|
|
5238
5234
|
];
|
|
5239
5235
|
return /* @__PURE__ */ React72.createElement(Stack56, { gap: "md" }, /* @__PURE__ */ React72.createElement(
|
|
5240
|
-
|
|
5236
|
+
Select9,
|
|
5241
5237
|
{
|
|
5242
5238
|
label: "Validator Action Type",
|
|
5243
5239
|
value: data.validatorActionType,
|
|
@@ -6227,8 +6223,10 @@ var TemplateConfig3 = ({ editor, block }) => {
|
|
|
6227
6223
|
{
|
|
6228
6224
|
title: block.props.title || "",
|
|
6229
6225
|
description: block.props.description || "",
|
|
6226
|
+
coreAddress: block.props.coreAddress || "",
|
|
6230
6227
|
onTitleChange: (value) => updateProp("title", value),
|
|
6231
|
-
onDescriptionChange: (value) => updateProp("description", value)
|
|
6228
|
+
onDescriptionChange: (value) => updateProp("description", value),
|
|
6229
|
+
onGroupChange: (coreAddress) => updateProp("coreAddress", coreAddress)
|
|
6232
6230
|
}
|
|
6233
6231
|
)
|
|
6234
6232
|
},
|
|
@@ -6364,8 +6362,6 @@ var parseStatus = (value) => {
|
|
|
6364
6362
|
return isChainStatus(value) ? value : null;
|
|
6365
6363
|
};
|
|
6366
6364
|
var useFlowBusinessLogic = ({ block, editor }) => {
|
|
6367
|
-
const { blockRequirements } = useBlocknoteContext();
|
|
6368
|
-
const coreAddress = blockRequirements?.proposal?.coreAddress;
|
|
6369
6365
|
const [proposalContractAddress, setProposalContractAddress] = useState17(null);
|
|
6370
6366
|
const [isExecuting, setIsExecuting] = useState17(false);
|
|
6371
6367
|
const [executionError, setExecutionError] = useState17(null);
|
|
@@ -6381,6 +6377,7 @@ var useFlowBusinessLogic = ({ block, editor }) => {
|
|
|
6381
6377
|
const icon = props.icon || "\u{1F4DD}";
|
|
6382
6378
|
const proposalId = props.proposalId || "";
|
|
6383
6379
|
const status = parseStatus(props.status);
|
|
6380
|
+
const coreAddress = props.coreAddress || "";
|
|
6384
6381
|
const shouldFetch = !!proposalId && !!status && !!proposalContractAddress;
|
|
6385
6382
|
const {
|
|
6386
6383
|
proposal,
|
|
@@ -6461,24 +6458,14 @@ var useFlowBusinessLogic = ({ block, editor }) => {
|
|
|
6461
6458
|
let actions = [];
|
|
6462
6459
|
try {
|
|
6463
6460
|
const actionsJson = block.props.actions;
|
|
6464
|
-
console.log("[createProposal] Raw actions from block.props:", actionsJson);
|
|
6465
6461
|
if (actionsJson) {
|
|
6466
6462
|
actions = JSON.parse(actionsJson);
|
|
6467
|
-
console.log("[createProposal] Parsed actions:", actions);
|
|
6468
6463
|
}
|
|
6469
6464
|
} catch (error) {
|
|
6470
|
-
console.error("[createProposal] Failed to parse actions:", error);
|
|
6471
6465
|
}
|
|
6472
6466
|
const { preProposalContractAddress } = await handlers.getPreProposalContractAddress({
|
|
6473
6467
|
coreAddress: coreAddress2
|
|
6474
6468
|
});
|
|
6475
|
-
console.log("[createProposal] Creating proposal with params:", {
|
|
6476
|
-
title: localTitle,
|
|
6477
|
-
description: localDescription,
|
|
6478
|
-
actionsCount: actions.length,
|
|
6479
|
-
actions,
|
|
6480
|
-
coreAddress: coreAddress2
|
|
6481
|
-
});
|
|
6482
6469
|
const { groupContractAddress } = await handlers.getGroupContractAddress({
|
|
6483
6470
|
coreAddress: coreAddress2
|
|
6484
6471
|
});
|
|
@@ -6517,8 +6504,6 @@ var useFlowBusinessLogic = ({ block, editor }) => {
|
|
|
6517
6504
|
// src/mantine/blocks/proposal/flow/useVoteBusinessLogic.ts
|
|
6518
6505
|
import { useState as useState18, useEffect as useEffect13 } from "react";
|
|
6519
6506
|
var useVoteBusinessLogic = ({ block, editor }) => {
|
|
6520
|
-
const { blockRequirements } = useBlocknoteContext();
|
|
6521
|
-
const coreAddress = blockRequirements?.proposal?.coreAddress;
|
|
6522
6507
|
const [localError, setLocalError] = useState18(null);
|
|
6523
6508
|
const [userVote, setUserVote] = useState18(null);
|
|
6524
6509
|
const [proposalContractAddress, setProposalContractAddress] = useState18(null);
|
|
@@ -6532,6 +6517,7 @@ var useVoteBusinessLogic = ({ block, editor }) => {
|
|
|
6532
6517
|
const title = block.props.title || "";
|
|
6533
6518
|
const description = block.props.description || "";
|
|
6534
6519
|
const status = block.props.status || "draft";
|
|
6520
|
+
const coreAddress = block.props.coreAddress || "";
|
|
6535
6521
|
useEffect13(() => {
|
|
6536
6522
|
if (!handlers || !coreAddress || !proposalId) {
|
|
6537
6523
|
setProposalContractAddress(null);
|
|
@@ -6946,8 +6932,7 @@ var ActionsTab2 = ({ actions, onActionsChange, editor, block, isProposalCreated
|
|
|
6946
6932
|
// src/mantine/blocks/proposal/flow/FlowConfig.tsx
|
|
6947
6933
|
var FlowConfig = ({ editor, block }) => {
|
|
6948
6934
|
const { closePanel } = usePanelStore();
|
|
6949
|
-
const
|
|
6950
|
-
const coreAddress = blockRequirements?.proposal?.coreAddress;
|
|
6935
|
+
const coreAddress = block.props.coreAddress || "";
|
|
6951
6936
|
const [errors, setErrors] = useState21({});
|
|
6952
6937
|
const [isCreating, setIsCreating] = useState21(false);
|
|
6953
6938
|
const { createProposal, title, description, proposalId } = useFlowBusinessLogic({
|
|
@@ -7119,9 +7104,12 @@ var ProposalFlowView = ({ block, editor }) => {
|
|
|
7119
7104
|
// src/mantine/blocks/proposal/ProposalBlock.tsx
|
|
7120
7105
|
function ProposalBlock({ editor, block }) {
|
|
7121
7106
|
const { docType } = useBlocknoteContext();
|
|
7107
|
+
console.log("[ProposalBlock] Rendering with docType:", docType);
|
|
7122
7108
|
if (docType === "template") {
|
|
7109
|
+
console.log("[ProposalBlock] Rendering ProposalTemplateView (docType is template)");
|
|
7123
7110
|
return /* @__PURE__ */ React83.createElement(ProposalTemplateView, { editor, block });
|
|
7124
7111
|
}
|
|
7112
|
+
console.log("[ProposalBlock] Rendering ProposalFlowView (docType is flow)");
|
|
7125
7113
|
return /* @__PURE__ */ React83.createElement(ProposalFlowView, { block, editor });
|
|
7126
7114
|
}
|
|
7127
7115
|
|
|
@@ -7169,6 +7157,9 @@ var ProposalBlockSpec = createReactBlockSpec4(
|
|
|
7169
7157
|
proposalContractAddress: {
|
|
7170
7158
|
default: ""
|
|
7171
7159
|
},
|
|
7160
|
+
coreAddress: {
|
|
7161
|
+
default: ""
|
|
7162
|
+
},
|
|
7172
7163
|
conditions: {
|
|
7173
7164
|
default: ""
|
|
7174
7165
|
}
|
|
@@ -7199,7 +7190,7 @@ import { Paper as Paper9, CloseButton as CloseButton6, Title as Title6 } from "@
|
|
|
7199
7190
|
|
|
7200
7191
|
// src/mantine/blocks/apiRequest/template/GeneralTab.tsx
|
|
7201
7192
|
import React85, { useEffect as useEffect15, useState as useState22 } from "react";
|
|
7202
|
-
import { Divider as Divider5, Select as
|
|
7193
|
+
import { Divider as Divider5, Select as Select10, Stack as Stack65, Text as Text40, TextInput as TextInput34, Textarea as Textarea19, Button as Button17, Group as Group23, ActionIcon as ActionIcon9, Paper as Paper8 } from "@mantine/core";
|
|
7203
7194
|
import { IconTrash, IconPlus } from "@tabler/icons-react";
|
|
7204
7195
|
var GeneralTab4 = ({
|
|
7205
7196
|
title,
|
|
@@ -7283,7 +7274,7 @@ var GeneralTab4 = ({
|
|
|
7283
7274
|
}
|
|
7284
7275
|
}
|
|
7285
7276
|
)), /* @__PURE__ */ React85.createElement(Divider5, { variant: "dashed" }), /* @__PURE__ */ React85.createElement(Stack65, { gap: "xs" }, /* @__PURE__ */ React85.createElement(Text40, { size: "sm", fw: 600 }, "HTTP Method"), /* @__PURE__ */ React85.createElement(
|
|
7286
|
-
|
|
7277
|
+
Select10,
|
|
7287
7278
|
{
|
|
7288
7279
|
value: localMethod,
|
|
7289
7280
|
onChange: (value) => {
|
|
@@ -7469,7 +7460,7 @@ var ApiRequestTemplateView = ({ editor, block }) => {
|
|
|
7469
7460
|
|
|
7470
7461
|
// src/mantine/blocks/apiRequest/flow/FlowView.tsx
|
|
7471
7462
|
import React88, { useState as useState23 } from "react";
|
|
7472
|
-
import { Card as Card20, Group as Group25, Stack as Stack67, Text as Text42, ActionIcon as ActionIcon11, Tooltip as Tooltip4, Button as Button18, Badge as Badge11, Collapse, Code, Loader as
|
|
7463
|
+
import { Card as Card20, Group as Group25, Stack as Stack67, Text as Text42, ActionIcon as ActionIcon11, Tooltip as Tooltip4, Button as Button18, Badge as Badge11, Collapse, Code, Loader as Loader4, Alert as Alert9 } from "@mantine/core";
|
|
7473
7464
|
import { IconSend, IconChevronDown, IconChevronUp } from "@tabler/icons-react";
|
|
7474
7465
|
var ApiRequestFlowView = ({ editor, block, isDisabled }) => {
|
|
7475
7466
|
const disabled = isDisabled?.isDisabled === "disable";
|
|
@@ -7593,7 +7584,7 @@ var ApiRequestFlowView = ({ editor, block, isDisabled }) => {
|
|
|
7593
7584
|
size: "sm",
|
|
7594
7585
|
variant: "light",
|
|
7595
7586
|
color: getMethodColor(method),
|
|
7596
|
-
leftSection: isLoading ? /* @__PURE__ */ React88.createElement(
|
|
7587
|
+
leftSection: isLoading ? /* @__PURE__ */ React88.createElement(Loader4, { size: 14 }) : /* @__PURE__ */ React88.createElement(IconSend, { size: 14 }),
|
|
7597
7588
|
onClick: handleExecuteRequest,
|
|
7598
7589
|
disabled: disabled || isLoading || !endpoint,
|
|
7599
7590
|
style: { flexShrink: 0 }
|
|
@@ -7640,13 +7631,7 @@ var ApiRequestFlowView = ({ editor, block, isDisabled }) => {
|
|
|
7640
7631
|
function ApiRequestBlock({ editor, block }) {
|
|
7641
7632
|
const { docType } = useBlocknoteContext();
|
|
7642
7633
|
const { actions } = useBlockConditions(block, editor);
|
|
7643
|
-
console.log("[ApiRequestBlock] Rendering with:", {
|
|
7644
|
-
blockId: block.id,
|
|
7645
|
-
docType,
|
|
7646
|
-
actions
|
|
7647
|
-
});
|
|
7648
7634
|
if (docType === "template") {
|
|
7649
|
-
console.log("[ApiRequestBlock] Rendering template view for block:", block.id);
|
|
7650
7635
|
return /* @__PURE__ */ React89.createElement(ApiRequestTemplateView, { editor, block });
|
|
7651
7636
|
}
|
|
7652
7637
|
const conditionConfig = parseConditionConfig(block.props.conditions);
|
|
@@ -7654,19 +7639,11 @@ function ApiRequestBlock({ editor, block }) {
|
|
|
7654
7639
|
const showActionExists = actions.some((a) => a.action === "show");
|
|
7655
7640
|
const shouldHide = hasVisibility && !showActionExists;
|
|
7656
7641
|
if (shouldHide) {
|
|
7657
|
-
console.log("[ApiRequestBlock] Hiding block - visibility conditions exist but none passed");
|
|
7658
7642
|
return null;
|
|
7659
7643
|
}
|
|
7660
7644
|
const hasEnable = hasEnableConditions(conditionConfig);
|
|
7661
7645
|
const enableActionExists = actions.some((a) => a.action === "enable");
|
|
7662
7646
|
const shouldDisable = hasEnable && !enableActionExists;
|
|
7663
|
-
console.log("[ApiRequestBlock] Enable state:", {
|
|
7664
|
-
blockId: block.id,
|
|
7665
|
-
hasEnable,
|
|
7666
|
-
enableActionExists,
|
|
7667
|
-
shouldDisable,
|
|
7668
|
-
actions
|
|
7669
|
-
});
|
|
7670
7647
|
return /* @__PURE__ */ React89.createElement(
|
|
7671
7648
|
ApiRequestFlowView,
|
|
7672
7649
|
{
|
|
@@ -7953,7 +7930,7 @@ var EnumChecklistPreviewStep = ({ listType, onAddToBlock, onPrev }) => {
|
|
|
7953
7930
|
|
|
7954
7931
|
// src/mantine/blocks/enumChecklist/EnumChecklistConfigurationStep.tsx
|
|
7955
7932
|
import React95 from "react";
|
|
7956
|
-
import { Stack as Stack72, TextInput as TextInput35, Text as Text47, Button as Button22, Group as Group28, Switch as Switch4, Select as
|
|
7933
|
+
import { Stack as Stack72, TextInput as TextInput35, Text as Text47, Button as Button22, Group as Group28, Switch as Switch4, Select as Select11 } from "@mantine/core";
|
|
7957
7934
|
var EnumChecklistConfigurationStep = ({ enumChecklistType: listType, config, onConfigChange, onPrev, onNext, isValid }) => {
|
|
7958
7935
|
const typeConfig = ENUM_LIST_CONFIG[listType];
|
|
7959
7936
|
const configFields = getEnumListTypesConfigFields(listType);
|
|
@@ -7983,7 +7960,7 @@ var EnumChecklistConfigurationStep = ({ enumChecklistType: listType, config, onC
|
|
|
7983
7960
|
);
|
|
7984
7961
|
case "select":
|
|
7985
7962
|
return /* @__PURE__ */ React95.createElement(
|
|
7986
|
-
|
|
7963
|
+
Select11,
|
|
7987
7964
|
{
|
|
7988
7965
|
label: field.label,
|
|
7989
7966
|
description: field.description,
|
|
@@ -8244,7 +8221,7 @@ import { Paper as Paper11, CloseButton as CloseButton7, Title as Title7 } from "
|
|
|
8244
8221
|
|
|
8245
8222
|
// src/mantine/blocks/notify/template/GeneralTab.tsx
|
|
8246
8223
|
import React98, { useEffect as useEffect17, useState as useState26 } from "react";
|
|
8247
|
-
import { Divider as Divider6, Select as
|
|
8224
|
+
import { Divider as Divider6, Select as Select12, Stack as Stack74, Text as Text49, TextInput as TextInput36, Textarea as Textarea20, Button as Button24, Group as Group30, ActionIcon as ActionIcon13, Paper as Paper10 } from "@mantine/core";
|
|
8248
8225
|
import { IconTrash as IconTrash2, IconPlus as IconPlus2 } from "@tabler/icons-react";
|
|
8249
8226
|
var GeneralTab5 = ({
|
|
8250
8227
|
title,
|
|
@@ -8341,7 +8318,7 @@ var GeneralTab5 = ({
|
|
|
8341
8318
|
}
|
|
8342
8319
|
}
|
|
8343
8320
|
)), /* @__PURE__ */ React98.createElement(Divider6, { variant: "dashed" }), /* @__PURE__ */ React98.createElement(Stack74, { gap: "xs" }, /* @__PURE__ */ React98.createElement(Text49, { size: "sm", fw: 600 }, "Channel"), /* @__PURE__ */ React98.createElement(
|
|
8344
|
-
|
|
8321
|
+
Select12,
|
|
8345
8322
|
{
|
|
8346
8323
|
value: localChannel,
|
|
8347
8324
|
onChange: (value) => {
|
|
@@ -8406,7 +8383,7 @@ var GeneralTab5 = ({
|
|
|
8406
8383
|
}
|
|
8407
8384
|
}
|
|
8408
8385
|
)), /* @__PURE__ */ React98.createElement(Stack74, { gap: "xs" }, /* @__PURE__ */ React98.createElement(Text49, { size: "sm", fw: 600 }, "Body Type"), /* @__PURE__ */ React98.createElement(
|
|
8409
|
-
|
|
8386
|
+
Select12,
|
|
8410
8387
|
{
|
|
8411
8388
|
value: localBodyType,
|
|
8412
8389
|
onChange: (value) => {
|
|
@@ -8585,7 +8562,7 @@ var NotifyTemplateView = ({ editor, block }) => {
|
|
|
8585
8562
|
|
|
8586
8563
|
// src/mantine/blocks/notify/flow/FlowView.tsx
|
|
8587
8564
|
import React101, { useState as useState27 } from "react";
|
|
8588
|
-
import { Card as Card23, Group as Group32, Stack as Stack76, Text as Text51, ActionIcon as ActionIcon15, Tooltip as Tooltip5, Button as Button25, Badge as Badge13, Collapse as Collapse2, Alert as Alert10, Loader as
|
|
8565
|
+
import { Card as Card23, Group as Group32, Stack as Stack76, Text as Text51, ActionIcon as ActionIcon15, Tooltip as Tooltip5, Button as Button25, Badge as Badge13, Collapse as Collapse2, Alert as Alert10, Loader as Loader5, Code as Code2 } from "@mantine/core";
|
|
8589
8566
|
import { IconSend as IconSend2, IconChevronDown as IconChevronDown2, IconChevronUp as IconChevronUp2, IconCheck, IconX } from "@tabler/icons-react";
|
|
8590
8567
|
var NotifyFlowView = ({ editor, block, isDisabled }) => {
|
|
8591
8568
|
const disabled = isDisabled?.isDisabled === "disable";
|
|
@@ -8697,7 +8674,7 @@ var NotifyFlowView = ({ editor, block, isDisabled }) => {
|
|
|
8697
8674
|
size: "sm",
|
|
8698
8675
|
variant: "light",
|
|
8699
8676
|
color: getChannelColor(channel),
|
|
8700
|
-
leftSection: isLoading ? /* @__PURE__ */ React101.createElement(
|
|
8677
|
+
leftSection: isLoading ? /* @__PURE__ */ React101.createElement(Loader5, { size: 14 }) : status === "sent" ? /* @__PURE__ */ React101.createElement(IconCheck, { size: 14 }) : /* @__PURE__ */ React101.createElement(IconSend2, { size: 14 }),
|
|
8701
8678
|
onClick: handleSendNotification,
|
|
8702
8679
|
disabled: !canSend,
|
|
8703
8680
|
style: { flexShrink: 0 }
|
|
@@ -9487,12 +9464,17 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
9487
9464
|
ixoEditor.getFlow = () => {
|
|
9488
9465
|
return flowArray.toArray();
|
|
9489
9466
|
};
|
|
9490
|
-
ixoEditor.getDocType = () =>
|
|
9467
|
+
ixoEditor.getDocType = () => {
|
|
9468
|
+
const docType = root.get("docType") || "";
|
|
9469
|
+
console.log("[useCollaborativeIxoEditor] getDocType() called, returning:", docType);
|
|
9470
|
+
return docType;
|
|
9471
|
+
};
|
|
9491
9472
|
ixoEditor.setDocType = (value) => {
|
|
9492
9473
|
if (!permissions.write) {
|
|
9493
9474
|
console.warn("Cannot set doc type: write permission denied");
|
|
9494
9475
|
return;
|
|
9495
9476
|
}
|
|
9477
|
+
console.log("[useCollaborativeIxoEditor] setDocType() called, setting docType to:", value);
|
|
9496
9478
|
root.set("docType", value);
|
|
9497
9479
|
};
|
|
9498
9480
|
}
|
|
@@ -9519,6 +9501,7 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
9519
9501
|
root.set("createdAt", (/* @__PURE__ */ new Date()).toISOString());
|
|
9520
9502
|
root.set("createdBy", memoizedUser.id || "anonymous");
|
|
9521
9503
|
root.set("docType", "");
|
|
9504
|
+
console.log("[useCollaborativeIxoEditor] Initializing docType to empty string for new document");
|
|
9522
9505
|
if (titleText.length === 0 && options.title) {
|
|
9523
9506
|
titleText.insert(0, options.title);
|
|
9524
9507
|
}
|
|
@@ -9709,4 +9692,4 @@ export {
|
|
|
9709
9692
|
ixoGraphQLClient,
|
|
9710
9693
|
getEntity
|
|
9711
9694
|
};
|
|
9712
|
-
//# sourceMappingURL=chunk-
|
|
9695
|
+
//# sourceMappingURL=chunk-3LUJTQVK.mjs.map
|