@ixo/editor 5.5.0 → 5.7.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-RUH3RMOE.mjs → chunk-4QAMDIPO.mjs} +178 -118
- package/dist/{chunk-RUH3RMOE.mjs.map → chunk-4QAMDIPO.mjs.map} +1 -1
- package/dist/{graphql-client-DgBW5XCE.d.ts → graphql-client-DE9Dyji4.d.ts} +3 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/mantine/index.d.ts +2 -2
- package/dist/mantine/index.mjs +1 -1
- package/package.json +2 -2
|
@@ -26205,7 +26205,7 @@ var BidConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
26205
26205
|
};
|
|
26206
26206
|
|
|
26207
26207
|
// src/mantine/blocks/action/actionTypes/bid/BidFlowDetail.tsx
|
|
26208
|
-
import React260, { useCallback as useCallback90, useEffect as useEffect91, useMemo as useMemo96, useState as useState112 } from "react";
|
|
26208
|
+
import React260, { useCallback as useCallback90, useEffect as useEffect91, useMemo as useMemo96, useRef as useRef26, useState as useState112 } from "react";
|
|
26209
26209
|
import { Alert as Alert46, Loader as Loader43, Stack as Stack178, Text as Text156 } from "@mantine/core";
|
|
26210
26210
|
import { IconPlayerPlay as IconPlayerPlay3 } from "@tabler/icons-react";
|
|
26211
26211
|
import { SurveyModel as SurveyModel9 } from "@ixo/surveys";
|
|
@@ -26227,6 +26227,10 @@ var BidFlowDetail = ({
|
|
|
26227
26227
|
registerRuntimeInputs
|
|
26228
26228
|
}) => {
|
|
26229
26229
|
const handlers = useBlocknoteHandlers();
|
|
26230
|
+
const handlersRef = useRef26(handlers);
|
|
26231
|
+
useEffect91(() => {
|
|
26232
|
+
handlersRef.current = handlers;
|
|
26233
|
+
}, [handlers]);
|
|
26230
26234
|
const services = useMemo96(() => buildServicesFromHandlers(handlers), [handlers]);
|
|
26231
26235
|
const flowNode = useMemo96(() => buildFlowNodeFromBlock(block), [block]);
|
|
26232
26236
|
const runtimeManager = useMemo96(() => createRuntimeStateManager(editor), [editor]);
|
|
@@ -26302,10 +26306,11 @@ var BidFlowDetail = ({
|
|
|
26302
26306
|
setError("Collection is required in template configuration.");
|
|
26303
26307
|
return;
|
|
26304
26308
|
}
|
|
26309
|
+
const handlers2 = handlersRef.current;
|
|
26305
26310
|
setLoadingSurvey(true);
|
|
26306
26311
|
setError(null);
|
|
26307
26312
|
try {
|
|
26308
|
-
const result = role === "service_agent" ? await
|
|
26313
|
+
const result = role === "service_agent" ? await handlers2.getBidContributorSurveyTemplate(deedDid, collectionId) : await handlers2.getBidEvaluatorSurveyTemplate(deedDid, collectionId);
|
|
26309
26314
|
if (!result?.surveyTemplate) {
|
|
26310
26315
|
setSurveyJson(null);
|
|
26311
26316
|
setError("No survey template found for the selected role.");
|
|
@@ -26318,7 +26323,7 @@ var BidFlowDetail = ({
|
|
|
26318
26323
|
} finally {
|
|
26319
26324
|
setLoadingSurvey(false);
|
|
26320
26325
|
}
|
|
26321
|
-
}, [
|
|
26326
|
+
}, [role, deedDid, collectionId]);
|
|
26322
26327
|
useEffect91(() => {
|
|
26323
26328
|
setSurveyJson(null);
|
|
26324
26329
|
setError(null);
|
|
@@ -26332,10 +26337,11 @@ var BidFlowDetail = ({
|
|
|
26332
26337
|
setUserRole(null);
|
|
26333
26338
|
return;
|
|
26334
26339
|
}
|
|
26340
|
+
const handlers2 = handlersRef.current;
|
|
26335
26341
|
setStatusLoading(true);
|
|
26336
26342
|
try {
|
|
26337
26343
|
const formattedDid = actorDid.startsWith("did:ixo:") ? actorDid : `did:ixo:${actorDid}`;
|
|
26338
|
-
const [bidResponse, collectionsResponse] = await Promise.all([
|
|
26344
|
+
const [bidResponse, collectionsResponse] = await Promise.all([handlers2.queryBidsByDid({ collectionId, did: formattedDid }), handlers2.getClaimCollections(deedDid)]);
|
|
26339
26345
|
if (!mounted) return;
|
|
26340
26346
|
const bid = Array.isArray(bidResponse?.data) && bidResponse.data.length > 0 ? bidResponse.data[0] : null;
|
|
26341
26347
|
setUserBid(bid);
|
|
@@ -26344,7 +26350,7 @@ var BidFlowDetail = ({
|
|
|
26344
26350
|
setUserRole(null);
|
|
26345
26351
|
return;
|
|
26346
26352
|
}
|
|
26347
|
-
const roles = await
|
|
26353
|
+
const roles = await handlers2.getUserRoles({
|
|
26348
26354
|
userAddress: actorDid,
|
|
26349
26355
|
adminAddress,
|
|
26350
26356
|
deedDid,
|
|
@@ -26365,7 +26371,7 @@ var BidFlowDetail = ({
|
|
|
26365
26371
|
return () => {
|
|
26366
26372
|
mounted = false;
|
|
26367
26373
|
};
|
|
26368
|
-
}, [
|
|
26374
|
+
}, [deedDid, collectionId, actorDid]);
|
|
26369
26375
|
const isApproved = userRole === "SA" /* ServiceProvider */ || userRole === "EA" /* Evaluator */;
|
|
26370
26376
|
const isPending = !isApproved && !!userBid;
|
|
26371
26377
|
const canSubmit = !isPending && !isApproved;
|
|
@@ -26664,8 +26670,8 @@ var EvaluateBidConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
26664
26670
|
};
|
|
26665
26671
|
|
|
26666
26672
|
// src/mantine/blocks/action/actionTypes/evaluateBid/EvaluateBidFlowDetail.tsx
|
|
26667
|
-
import React263, { useCallback as useCallback92, useEffect as useEffect93, useMemo as useMemo98, useState as useState115 } from "react";
|
|
26668
|
-
import { ActionIcon as ActionIcon39, Alert as Alert48, Badge as Badge49, Box as Box53, Button as Button52, Divider as Divider21, Group as Group101, Loader as Loader45, Stack as Stack180, Text as Text158, UnstyledButton as UnstyledButton4 } from "@mantine/core";
|
|
26673
|
+
import React263, { useCallback as useCallback92, useEffect as useEffect93, useMemo as useMemo98, useRef as useRef27, useState as useState115 } from "react";
|
|
26674
|
+
import { ActionIcon as ActionIcon39, Alert as Alert48, Badge as Badge49, Box as Box53, Button as Button52, Divider as Divider21, Group as Group101, JsonInput, Loader as Loader45, Stack as Stack180, Text as Text158, UnstyledButton as UnstyledButton4 } from "@mantine/core";
|
|
26669
26675
|
import { IconArrowLeft as IconArrowLeft7, IconCheck as IconCheck20, IconFilter } from "@tabler/icons-react";
|
|
26670
26676
|
|
|
26671
26677
|
// src/mantine/components/CollapsibleSection.tsx
|
|
@@ -26754,6 +26760,10 @@ var EvaluateBidFlowDetail = ({
|
|
|
26754
26760
|
registerRuntimeInputs
|
|
26755
26761
|
}) => {
|
|
26756
26762
|
const handlers = useBlocknoteHandlers();
|
|
26763
|
+
const handlersRef = useRef27(handlers);
|
|
26764
|
+
useEffect93(() => {
|
|
26765
|
+
handlersRef.current = handlers;
|
|
26766
|
+
}, [handlers]);
|
|
26757
26767
|
const services = useMemo98(() => buildServicesFromHandlers(handlers), [handlers]);
|
|
26758
26768
|
const flowNode = useMemo98(() => buildFlowNodeFromBlock(block), [block]);
|
|
26759
26769
|
const runtimeManager = useMemo98(() => createRuntimeStateManager(editor), [editor]);
|
|
@@ -26799,10 +26809,11 @@ var EvaluateBidFlowDetail = ({
|
|
|
26799
26809
|
}, [bids, activeFilter]);
|
|
26800
26810
|
const refreshBids = useCallback92(async () => {
|
|
26801
26811
|
if (!deedDid || !collectionId) return;
|
|
26812
|
+
const handlers2 = handlersRef.current;
|
|
26802
26813
|
setLoadingBids(true);
|
|
26803
26814
|
setError(null);
|
|
26804
26815
|
try {
|
|
26805
|
-
const [bidsResponse, collectionsResponse] = await Promise.all([
|
|
26816
|
+
const [bidsResponse, collectionsResponse] = await Promise.all([handlers2.queryBids({ collectionId }), handlers2.getClaimCollections(deedDid)]);
|
|
26806
26817
|
const fetchedBids = Array.isArray(bidsResponse?.data) ? bidsResponse.data : [];
|
|
26807
26818
|
setBids(fetchedBids);
|
|
26808
26819
|
if (selectedBidId && !fetchedBids.some((bid) => bid.id === selectedBidId)) {
|
|
@@ -26817,7 +26828,7 @@ var EvaluateBidFlowDetail = ({
|
|
|
26817
26828
|
} finally {
|
|
26818
26829
|
setLoadingBids(false);
|
|
26819
26830
|
}
|
|
26820
|
-
}, [
|
|
26831
|
+
}, [deedDid, collectionId, selectedBidId]);
|
|
26821
26832
|
useEffect93(() => {
|
|
26822
26833
|
setSelectedBidId("");
|
|
26823
26834
|
setRejectReason("");
|
|
@@ -26841,10 +26852,11 @@ var EvaluateBidFlowDetail = ({
|
|
|
26841
26852
|
mounted = false;
|
|
26842
26853
|
};
|
|
26843
26854
|
const loadProfiles = async () => {
|
|
26855
|
+
const handlers2 = handlersRef.current;
|
|
26844
26856
|
const results = await Promise.all(
|
|
26845
26857
|
missing.map(async (did) => {
|
|
26846
26858
|
try {
|
|
26847
|
-
const profile = await
|
|
26859
|
+
const profile = await handlers2.getMatrixInfoPerDid(did);
|
|
26848
26860
|
return [did, profile];
|
|
26849
26861
|
} catch {
|
|
26850
26862
|
return [did, null];
|
|
@@ -26866,7 +26878,7 @@ var EvaluateBidFlowDetail = ({
|
|
|
26866
26878
|
return () => {
|
|
26867
26879
|
mounted = false;
|
|
26868
26880
|
};
|
|
26869
|
-
}, [bids,
|
|
26881
|
+
}, [bids, profilesByDid]);
|
|
26870
26882
|
const addPaymentRow = useCallback92(() => {
|
|
26871
26883
|
setPaymentRows((prev) => [...prev, createPaymentRow()]);
|
|
26872
26884
|
}, []);
|
|
@@ -27048,7 +27060,27 @@ var EvaluateBidFlowDetail = ({
|
|
|
27048
27060
|
}
|
|
27049
27061
|
},
|
|
27050
27062
|
selectedBidProfile?.avatarUrl ? null : selectedAvatarLabel
|
|
27051
|
-
), /* @__PURE__ */ React263.createElement(Stack180, { gap: 0, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React263.createElement(Text158, { fw: 500, size: "md", truncate: true }, selectedDisplayName), /* @__PURE__ */ React263.createElement(Text158, { size: "xs", c: "dimmed", truncate: true }, truncateAddress2(selectedBid.address))), /* @__PURE__ */ React263.createElement(Stack180, { gap: 0, align: "flex-end", style: { flexShrink: 0 } }, /* @__PURE__ */ React263.createElement(Text158, { fw: 500, size: "md", c: bidStatus.color === "green" ? "green" : bidStatus.color === "red" ? "red" : void 0 }, bidStatus.color === "green" && /* @__PURE__ */ React263.createElement(IconCheck20, { size: 14, style: { verticalAlign: "middle", marginRight: 4 } }), bidStatus.label), /* @__PURE__ */ React263.createElement(Text158, { size: "xs", c: "dimmed" }, getTimeAgo(selectedBid.created || "")))), /* @__PURE__ */ React263.createElement(CollapsibleSection, { title: "Details" }, /* @__PURE__ */ React263.createElement(Stack180, { gap: "xs" }, /* @__PURE__ */ React263.createElement(Group101, { justify: "space-between" }, /* @__PURE__ */ React263.createElement(Text158, { size: "xs", c: "dimmed" }, "Bid ID"), /* @__PURE__ */ React263.createElement(Text158, { size: "xs", truncate: true }, selectedBid.id)), /* @__PURE__ */ React263.createElement(Group101, { justify: "space-between" }, /* @__PURE__ */ React263.createElement(Text158, { size: "xs", c: "dimmed" }, "Collection"), /* @__PURE__ */ React263.createElement(Text158, { size: "xs" }, selectedBid.collection || collectionId)), /* @__PURE__ */ React263.createElement(Group101, { justify: "space-between" }, /* @__PURE__ */ React263.createElement(Text158, { size: "xs", c: "dimmed" }, "Role"), /* @__PURE__ */ React263.createElement(Badge49, { size: "xs", variant: "light", color: getRoleColor2(selectedBid.role) }, getRoleLabel2(selectedBid.role))), /* @__PURE__ */ React263.createElement(Group101, { justify: "space-between" }, /* @__PURE__ */ React263.createElement(Text158, { size: "xs", c: "dimmed" }, "Address"), /* @__PURE__ */ React263.createElement(Text158, { size: "xs" }, selectedBid.address)))), /* @__PURE__ */ React263.createElement(CollapsibleSection, { title: "Inputs" },
|
|
27063
|
+
), /* @__PURE__ */ React263.createElement(Stack180, { gap: 0, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React263.createElement(Text158, { fw: 500, size: "md", truncate: true }, selectedDisplayName), /* @__PURE__ */ React263.createElement(Text158, { size: "xs", c: "dimmed", truncate: true }, truncateAddress2(selectedBid.address))), /* @__PURE__ */ React263.createElement(Stack180, { gap: 0, align: "flex-end", style: { flexShrink: 0 } }, /* @__PURE__ */ React263.createElement(Text158, { fw: 500, size: "md", c: bidStatus.color === "green" ? "green" : bidStatus.color === "red" ? "red" : void 0 }, bidStatus.color === "green" && /* @__PURE__ */ React263.createElement(IconCheck20, { size: 14, style: { verticalAlign: "middle", marginRight: 4 } }), bidStatus.label), /* @__PURE__ */ React263.createElement(Text158, { size: "xs", c: "dimmed" }, getTimeAgo(selectedBid.created || "")))), /* @__PURE__ */ React263.createElement(CollapsibleSection, { title: "Details" }, /* @__PURE__ */ React263.createElement(Stack180, { gap: "xs" }, /* @__PURE__ */ React263.createElement(Group101, { justify: "space-between" }, /* @__PURE__ */ React263.createElement(Text158, { size: "xs", c: "dimmed" }, "Bid ID"), /* @__PURE__ */ React263.createElement(Text158, { size: "xs", truncate: true }, selectedBid.id)), /* @__PURE__ */ React263.createElement(Group101, { justify: "space-between" }, /* @__PURE__ */ React263.createElement(Text158, { size: "xs", c: "dimmed" }, "Collection"), /* @__PURE__ */ React263.createElement(Text158, { size: "xs" }, selectedBid.collection || collectionId)), /* @__PURE__ */ React263.createElement(Group101, { justify: "space-between" }, /* @__PURE__ */ React263.createElement(Text158, { size: "xs", c: "dimmed" }, "Role"), /* @__PURE__ */ React263.createElement(Badge49, { size: "xs", variant: "light", color: getRoleColor2(selectedBid.role) }, getRoleLabel2(selectedBid.role))), /* @__PURE__ */ React263.createElement(Group101, { justify: "space-between" }, /* @__PURE__ */ React263.createElement(Text158, { size: "xs", c: "dimmed" }, "Address"), /* @__PURE__ */ React263.createElement(Text158, { size: "xs" }, selectedBid.address)))), /* @__PURE__ */ React263.createElement(CollapsibleSection, { title: "Inputs" }, bidData && typeof bidData === "object" ? /* @__PURE__ */ React263.createElement(
|
|
27064
|
+
JsonInput,
|
|
27065
|
+
{
|
|
27066
|
+
value: JSON.stringify(bidData, null, 2),
|
|
27067
|
+
readOnly: true,
|
|
27068
|
+
autosize: true,
|
|
27069
|
+
minRows: 6,
|
|
27070
|
+
maxRows: 20,
|
|
27071
|
+
radius: "md",
|
|
27072
|
+
styles: {
|
|
27073
|
+
input: {
|
|
27074
|
+
fontFamily: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",
|
|
27075
|
+
fontSize: 12,
|
|
27076
|
+
lineHeight: 1.5,
|
|
27077
|
+
background: "var(--mantine-color-neutralColor-3)",
|
|
27078
|
+
border: "1px solid var(--mantine-color-neutralColor-5)",
|
|
27079
|
+
color: "var(--mantine-color-neutralColor-8)"
|
|
27080
|
+
}
|
|
27081
|
+
}
|
|
27082
|
+
}
|
|
27083
|
+
) : /* @__PURE__ */ React263.createElement(Text158, { size: "xs", c: "dimmed" }, "No input data available.")), /* @__PURE__ */ React263.createElement(
|
|
27052
27084
|
BaseSelect,
|
|
27053
27085
|
{
|
|
27054
27086
|
label: "Decision",
|
|
@@ -27155,7 +27187,7 @@ registerActionTypeUI("qi/bid.evaluate", {
|
|
|
27155
27187
|
});
|
|
27156
27188
|
|
|
27157
27189
|
// src/mantine/blocks/action/actionTypes/claim/ClaimConfig.tsx
|
|
27158
|
-
import React264, { useCallback as useCallback93, useEffect as useEffect94, useMemo as useMemo99, useRef as
|
|
27190
|
+
import React264, { useCallback as useCallback93, useEffect as useEffect94, useMemo as useMemo99, useRef as useRef28, useState as useState116 } from "react";
|
|
27159
27191
|
import { Alert as Alert49, Button as Button53, Loader as Loader46, Stack as Stack181, Text as Text159 } from "@mantine/core";
|
|
27160
27192
|
|
|
27161
27193
|
// src/mantine/blocks/action/actionTypes/claim/types.ts
|
|
@@ -27186,7 +27218,7 @@ var ClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
27186
27218
|
const [collections, setCollections] = useState116([]);
|
|
27187
27219
|
const [loadingCollections, setLoadingCollections] = useState116(false);
|
|
27188
27220
|
const [error, setError] = useState116(null);
|
|
27189
|
-
const localRef =
|
|
27221
|
+
const localRef = useRef28(local);
|
|
27190
27222
|
useEffect94(() => {
|
|
27191
27223
|
localRef.current = local;
|
|
27192
27224
|
}, [local]);
|
|
@@ -27206,7 +27238,7 @@ var ClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
27206
27238
|
);
|
|
27207
27239
|
const [schemaLoading, setSchemaLoading] = useState116(false);
|
|
27208
27240
|
const [schemaError, setSchemaError] = useState116(null);
|
|
27209
|
-
const fetchGenRef =
|
|
27241
|
+
const fetchGenRef = useRef28(0);
|
|
27210
27242
|
const materialiseSurveySchema = useCallback93(
|
|
27211
27243
|
async (deedDid, collectionId) => {
|
|
27212
27244
|
if (!deedDid || !collectionId) return;
|
|
@@ -27312,7 +27344,7 @@ var ClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
27312
27344
|
};
|
|
27313
27345
|
|
|
27314
27346
|
// src/mantine/blocks/action/actionTypes/claim/ClaimFlowDetail.tsx
|
|
27315
|
-
import React265, { useCallback as useCallback94, useEffect as useEffect95, useMemo as useMemo100, useState as useState117 } from "react";
|
|
27347
|
+
import React265, { useCallback as useCallback94, useEffect as useEffect95, useMemo as useMemo100, useRef as useRef29, useState as useState117 } from "react";
|
|
27316
27348
|
import { ActionIcon as ActionIcon40, Alert as Alert50, Box as Box54, Group as Group102, Loader as Loader47, Stack as Stack182, Text as Text160 } from "@mantine/core";
|
|
27317
27349
|
import { IconArrowLeft as IconArrowLeft8, IconCheck as IconCheck21, IconPlayerPlay as IconPlayerPlay4 } from "@tabler/icons-react";
|
|
27318
27350
|
import { SurveyModel as SurveyModel10 } from "@ixo/surveys";
|
|
@@ -27356,6 +27388,10 @@ var ClaimFlowDetail = ({
|
|
|
27356
27388
|
registerRuntimeInputs
|
|
27357
27389
|
}) => {
|
|
27358
27390
|
const handlers = useBlocknoteHandlers();
|
|
27391
|
+
const handlersRef = useRef29(handlers);
|
|
27392
|
+
useEffect95(() => {
|
|
27393
|
+
handlersRef.current = handlers;
|
|
27394
|
+
}, [handlers]);
|
|
27359
27395
|
const services = useMemo100(() => buildServicesFromHandlers(handlers), [handlers]);
|
|
27360
27396
|
const flowNode = useMemo100(() => buildFlowNodeFromBlock(block), [block]);
|
|
27361
27397
|
const runtimeManager = useMemo100(() => createRuntimeStateManager(editor), [editor]);
|
|
@@ -27465,12 +27501,13 @@ var ClaimFlowDetail = ({
|
|
|
27465
27501
|
}, [provideSigningHandler, surveyModel]);
|
|
27466
27502
|
const fetchClaimsAndAdmin = useCallback94(async () => {
|
|
27467
27503
|
if (!deedDid || !collectionId || !actorDid) return;
|
|
27504
|
+
const handlers2 = handlersRef.current;
|
|
27468
27505
|
setLoadingClaims(true);
|
|
27469
27506
|
setError(null);
|
|
27470
27507
|
try {
|
|
27471
27508
|
const [claimsResponse, collectionsResponse] = await Promise.all([
|
|
27472
|
-
|
|
27473
|
-
|
|
27509
|
+
handlers2.getClaimsPerUserAddress({ collectionId, userAddress: actorDid }),
|
|
27510
|
+
handlers2.getClaimCollections(deedDid)
|
|
27474
27511
|
]);
|
|
27475
27512
|
const fetchedClaims = Array.isArray(claimsResponse) ? claimsResponse : [];
|
|
27476
27513
|
console.log(
|
|
@@ -27492,7 +27529,7 @@ var ClaimFlowDetail = ({
|
|
|
27492
27529
|
} finally {
|
|
27493
27530
|
setLoadingClaims(false);
|
|
27494
27531
|
}
|
|
27495
|
-
}, [
|
|
27532
|
+
}, [deedDid, collectionId, actorDid]);
|
|
27496
27533
|
useEffect95(() => {
|
|
27497
27534
|
setSurveyJson(null);
|
|
27498
27535
|
setPrefillData(null);
|
|
@@ -27512,10 +27549,11 @@ var ClaimFlowDetail = ({
|
|
|
27512
27549
|
mounted = false;
|
|
27513
27550
|
};
|
|
27514
27551
|
const loadProfiles = async () => {
|
|
27552
|
+
const handlers2 = handlersRef.current;
|
|
27515
27553
|
const results = await Promise.all(
|
|
27516
27554
|
missing.map(async (did) => {
|
|
27517
27555
|
try {
|
|
27518
|
-
const profile = await
|
|
27556
|
+
const profile = await handlers2.getMatrixInfoPerDid(did);
|
|
27519
27557
|
return [did, profile];
|
|
27520
27558
|
} catch {
|
|
27521
27559
|
return [did, null];
|
|
@@ -27537,10 +27575,11 @@ var ClaimFlowDetail = ({
|
|
|
27537
27575
|
return () => {
|
|
27538
27576
|
mounted = false;
|
|
27539
27577
|
};
|
|
27540
|
-
}, [claims,
|
|
27578
|
+
}, [claims, profilesByDid]);
|
|
27541
27579
|
useEffect95(() => {
|
|
27542
27580
|
let mounted = true;
|
|
27543
27581
|
const checkServiceAgentAuthorization = async () => {
|
|
27582
|
+
const handlers2 = handlersRef.current;
|
|
27544
27583
|
if (!deedDid || !collectionId || !adminAddress || !actorDid) {
|
|
27545
27584
|
if (mounted) {
|
|
27546
27585
|
setIsServiceAgentAuthorized(false);
|
|
@@ -27549,7 +27588,7 @@ var ClaimFlowDetail = ({
|
|
|
27549
27588
|
}
|
|
27550
27589
|
return;
|
|
27551
27590
|
}
|
|
27552
|
-
if (typeof
|
|
27591
|
+
if (typeof handlers2.getUserRoles !== "function") {
|
|
27553
27592
|
if (mounted) {
|
|
27554
27593
|
setIsServiceAgentAuthorized(false);
|
|
27555
27594
|
setAuthError(null);
|
|
@@ -27560,7 +27599,7 @@ var ClaimFlowDetail = ({
|
|
|
27560
27599
|
setAuthChecking(true);
|
|
27561
27600
|
setAuthError(null);
|
|
27562
27601
|
try {
|
|
27563
|
-
const roles = await
|
|
27602
|
+
const roles = await handlers2.getUserRoles({
|
|
27564
27603
|
userAddress: actorDid,
|
|
27565
27604
|
adminAddress,
|
|
27566
27605
|
deedDid,
|
|
@@ -27586,7 +27625,7 @@ var ClaimFlowDetail = ({
|
|
|
27586
27625
|
return () => {
|
|
27587
27626
|
mounted = false;
|
|
27588
27627
|
};
|
|
27589
|
-
}, [
|
|
27628
|
+
}, [actorDid, adminAddress, deedDid, collectionId, authRetryKey]);
|
|
27590
27629
|
useEffect95(() => {
|
|
27591
27630
|
if (!selectedClaim) {
|
|
27592
27631
|
setSelectedClaimData(null);
|
|
@@ -27595,12 +27634,13 @@ var ClaimFlowDetail = ({
|
|
|
27595
27634
|
}
|
|
27596
27635
|
let cancelled = false;
|
|
27597
27636
|
const loadDetail = async () => {
|
|
27637
|
+
const handlers2 = handlersRef.current;
|
|
27598
27638
|
setLoadingClaimDetail(true);
|
|
27599
27639
|
setError(null);
|
|
27600
27640
|
try {
|
|
27601
27641
|
const [claimDataResult, templateResult] = await Promise.all([
|
|
27602
|
-
|
|
27603
|
-
surveyJson ? Promise.resolve({ surveyTemplate: surveyJson }) :
|
|
27642
|
+
handlers2.getClaimData(collectionId, selectedClaim.claimId),
|
|
27643
|
+
surveyJson ? Promise.resolve({ surveyTemplate: surveyJson }) : handlers2.getDeedSurveyTemplate(deedDid, collectionId)
|
|
27604
27644
|
]);
|
|
27605
27645
|
if (cancelled) return;
|
|
27606
27646
|
setSelectedClaimData(claimDataResult || null);
|
|
@@ -27612,10 +27652,10 @@ var ClaimFlowDetail = ({
|
|
|
27612
27652
|
} finally {
|
|
27613
27653
|
if (!cancelled) setLoadingClaimDetail(false);
|
|
27614
27654
|
}
|
|
27615
|
-
if (getClaimStatusInfo(selectedClaim).key === "disputed" && typeof
|
|
27655
|
+
if (getClaimStatusInfo(selectedClaim).key === "disputed" && typeof handlers2.getClaimDisputeDetails === "function") {
|
|
27616
27656
|
setLoadingDispute(true);
|
|
27617
27657
|
try {
|
|
27618
|
-
const details = await
|
|
27658
|
+
const details = await handlers2.getClaimDisputeDetails(selectedClaim.claimId);
|
|
27619
27659
|
if (!cancelled) setDisputeDetails(details);
|
|
27620
27660
|
} catch {
|
|
27621
27661
|
if (!cancelled) setDisputeDetails(null);
|
|
@@ -27630,7 +27670,7 @@ var ClaimFlowDetail = ({
|
|
|
27630
27670
|
return () => {
|
|
27631
27671
|
cancelled = true;
|
|
27632
27672
|
};
|
|
27633
|
-
}, [selectedClaim, collectionId, deedDid,
|
|
27673
|
+
}, [selectedClaim, collectionId, deedDid, surveyJson]);
|
|
27634
27674
|
const amendAndResubmit = useCallback94(() => {
|
|
27635
27675
|
if (!selectedClaimData) return;
|
|
27636
27676
|
setPrefillData(selectedClaimData);
|
|
@@ -27638,11 +27678,12 @@ var ClaimFlowDetail = ({
|
|
|
27638
27678
|
}, [selectedClaimData]);
|
|
27639
27679
|
const startSurvey = useCallback94(async () => {
|
|
27640
27680
|
if (!deedDid) return;
|
|
27681
|
+
const handlers2 = handlersRef.current;
|
|
27641
27682
|
setLoadingSurvey(true);
|
|
27642
27683
|
setError(null);
|
|
27643
27684
|
setPrefillData(null);
|
|
27644
27685
|
try {
|
|
27645
|
-
const template = await
|
|
27686
|
+
const template = await handlers2.getDeedSurveyTemplate(deedDid, collectionId);
|
|
27646
27687
|
if (!template?.surveyTemplate) {
|
|
27647
27688
|
setSurveyJson(null);
|
|
27648
27689
|
setError("No survey template found for this DID");
|
|
@@ -27655,7 +27696,7 @@ var ClaimFlowDetail = ({
|
|
|
27655
27696
|
} finally {
|
|
27656
27697
|
setLoadingSurvey(false);
|
|
27657
27698
|
}
|
|
27658
|
-
}, [
|
|
27699
|
+
}, [deedDid, collectionId]);
|
|
27659
27700
|
const handleSurveyComplete = useCallback94(
|
|
27660
27701
|
async (sender) => {
|
|
27661
27702
|
if (authChecking || !isServiceAgentAuthorized) {
|
|
@@ -27859,7 +27900,7 @@ registerActionTypeUI("qi/claim.submit", {
|
|
|
27859
27900
|
});
|
|
27860
27901
|
|
|
27861
27902
|
// src/mantine/blocks/action/actionTypes/evaluateClaim/EvaluateClaimConfig.tsx
|
|
27862
|
-
import React266, { useCallback as useCallback95, useEffect as useEffect96, useMemo as useMemo101, useRef as
|
|
27903
|
+
import React266, { useCallback as useCallback95, useEffect as useEffect96, useMemo as useMemo101, useRef as useRef30, useState as useState118 } from "react";
|
|
27863
27904
|
import { Alert as Alert51, Button as Button54, Loader as Loader48, Stack as Stack183, Text as Text161 } from "@mantine/core";
|
|
27864
27905
|
|
|
27865
27906
|
// src/mantine/blocks/action/actionTypes/evaluateClaim/types.ts
|
|
@@ -27894,7 +27935,7 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
27894
27935
|
const [collections, setCollections] = useState118([]);
|
|
27895
27936
|
const [loadingCollections, setLoadingCollections] = useState118(false);
|
|
27896
27937
|
const [error, setError] = useState118(null);
|
|
27897
|
-
const localRef =
|
|
27938
|
+
const localRef = useRef30(local);
|
|
27898
27939
|
useEffect96(() => {
|
|
27899
27940
|
localRef.current = local;
|
|
27900
27941
|
}, [local]);
|
|
@@ -27914,7 +27955,7 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
27914
27955
|
);
|
|
27915
27956
|
const [schemaLoading, setSchemaLoading] = useState118(false);
|
|
27916
27957
|
const [schemaError, setSchemaError] = useState118(null);
|
|
27917
|
-
const fetchGenRef =
|
|
27958
|
+
const fetchGenRef = useRef30(0);
|
|
27918
27959
|
const materialiseSurveySchema = useCallback95(
|
|
27919
27960
|
async (deedDid, collectionId) => {
|
|
27920
27961
|
if (!deedDid || !collectionId) return;
|
|
@@ -28057,13 +28098,13 @@ function buildBlockOptions(editorDocument, actionType, excludeBlockId) {
|
|
|
28057
28098
|
}
|
|
28058
28099
|
|
|
28059
28100
|
// src/mantine/blocks/action/actionTypes/evaluateClaim/EvaluateClaimFlowDetail.tsx
|
|
28060
|
-
import React269, { useCallback as useCallback97, useEffect as useEffect98, useMemo as useMemo103, useState as useState120 } from "react";
|
|
28101
|
+
import React269, { useCallback as useCallback97, useEffect as useEffect98, useMemo as useMemo103, useRef as useRef32, useState as useState120 } from "react";
|
|
28061
28102
|
import { ActionIcon as ActionIcon41, Alert as Alert52, Box as Box57, Button as Button55, Checkbox as Checkbox13, Divider as Divider22, Group as Group105, Loader as Loader50, ScrollArea as ScrollArea8, Stack as Stack186, Text as Text164, UnstyledButton as UnstyledButton6 } from "@mantine/core";
|
|
28062
28103
|
import { IconArrowLeft as IconArrowLeft9, IconCheck as IconCheck22, IconFilter as IconFilter2 } from "@tabler/icons-react";
|
|
28063
28104
|
import { SurveyModel as SurveyModel11 } from "@ixo/surveys";
|
|
28064
28105
|
|
|
28065
28106
|
// src/mantine/blocks/action/actionTypes/evaluateClaim/ClaimAttachments.tsx
|
|
28066
|
-
import React268, { useCallback as useCallback96, useEffect as useEffect97, useMemo as useMemo102, useRef as
|
|
28107
|
+
import React268, { useCallback as useCallback96, useEffect as useEffect97, useMemo as useMemo102, useRef as useRef31, useState as useState119 } from "react";
|
|
28067
28108
|
import { Box as Box56, Group as Group104, Loader as Loader49, SimpleGrid as SimpleGrid4, Stack as Stack185, Text as Text163, Tooltip as Tooltip24, UnstyledButton as UnstyledButton5 } from "@mantine/core";
|
|
28068
28109
|
import { IconFile as IconFile5, IconFileText as IconFileText6, IconMusic, IconPhoto as IconPhoto5, IconVideo } from "@tabler/icons-react";
|
|
28069
28110
|
|
|
@@ -28260,8 +28301,8 @@ var ClaimAttachments = ({ surveyModel, credentialSubject }) => {
|
|
|
28260
28301
|
const [resolved, setResolved] = useState119({});
|
|
28261
28302
|
const [pending, setPending] = useState119({});
|
|
28262
28303
|
const [openingKey, setOpeningKey] = useState119(null);
|
|
28263
|
-
const cacheRef =
|
|
28264
|
-
const inflightRef =
|
|
28304
|
+
const cacheRef = useRef31(/* @__PURE__ */ new Map());
|
|
28305
|
+
const inflightRef = useRef31(/* @__PURE__ */ new Map());
|
|
28265
28306
|
useEffect97(() => {
|
|
28266
28307
|
return () => {
|
|
28267
28308
|
for (const blobUrl of cacheRef.current.values()) URL.revokeObjectURL(blobUrl);
|
|
@@ -28456,6 +28497,10 @@ var EvaluateClaimFlowDetail = ({
|
|
|
28456
28497
|
registerRuntimeInputs
|
|
28457
28498
|
}) => {
|
|
28458
28499
|
const handlers = useBlocknoteHandlers();
|
|
28500
|
+
const handlersRef = useRef32(handlers);
|
|
28501
|
+
useEffect98(() => {
|
|
28502
|
+
handlersRef.current = handlers;
|
|
28503
|
+
}, [handlers]);
|
|
28459
28504
|
const services = useMemo103(() => buildServicesFromHandlers(handlers), [handlers]);
|
|
28460
28505
|
const flowNode = useMemo103(() => buildFlowNodeFromBlock(block), [block]);
|
|
28461
28506
|
const runtimeManager = useMemo103(() => createRuntimeStateManager(editor), [editor]);
|
|
@@ -28698,10 +28743,11 @@ var EvaluateClaimFlowDetail = ({
|
|
|
28698
28743
|
}, [outcomeTemplateJson]);
|
|
28699
28744
|
const refreshClaims = useCallback97(async () => {
|
|
28700
28745
|
if (!deedDid || !collectionId) return;
|
|
28746
|
+
const handlers2 = handlersRef.current;
|
|
28701
28747
|
setLoadingClaims(true);
|
|
28702
28748
|
setError(null);
|
|
28703
28749
|
try {
|
|
28704
|
-
const [claimsResponse, collectionsResponse] = await Promise.all([
|
|
28750
|
+
const [claimsResponse, collectionsResponse] = await Promise.all([handlers2.getClaimsPerCollectionId({ collectionId }), handlers2.getClaimCollections(deedDid)]);
|
|
28705
28751
|
const fetchedClaims = Array.isArray(claimsResponse) ? claimsResponse : [];
|
|
28706
28752
|
setClaims(fetchedClaims);
|
|
28707
28753
|
if (selectedClaimId && !fetchedClaims.some((claim) => claim.claimId === selectedClaimId)) {
|
|
@@ -28716,22 +28762,23 @@ var EvaluateClaimFlowDetail = ({
|
|
|
28716
28762
|
} finally {
|
|
28717
28763
|
setLoadingClaims(false);
|
|
28718
28764
|
}
|
|
28719
|
-
}, [
|
|
28765
|
+
}, [deedDid, collectionId, selectedClaimId]);
|
|
28720
28766
|
const loadClaimDetail = useCallback97(
|
|
28721
28767
|
async (claim) => {
|
|
28768
|
+
const handlers2 = handlersRef.current;
|
|
28722
28769
|
setSurveyLoading(true);
|
|
28723
28770
|
setEvaluationLoading(false);
|
|
28724
28771
|
setEvaluationResult(null);
|
|
28725
28772
|
setError(null);
|
|
28726
28773
|
try {
|
|
28727
|
-
const claimDataResult = await
|
|
28774
|
+
const claimDataResult = await handlers2.getClaimData(collectionId, claim.claimId);
|
|
28728
28775
|
setClaimData(claimDataResult || null);
|
|
28729
|
-
const surveyResult = await
|
|
28776
|
+
const surveyResult = await handlers2.getDeedSurveyTemplate(deedDid, collectionId);
|
|
28730
28777
|
setSurveyJson(surveyResult?.surveyTemplate || null);
|
|
28731
|
-
if (
|
|
28778
|
+
if (handlers2.getEvaluationTemplate) {
|
|
28732
28779
|
setOutcomeTemplateLoading(true);
|
|
28733
28780
|
try {
|
|
28734
|
-
const evalTemplateResult = await
|
|
28781
|
+
const evalTemplateResult = await handlers2.getEvaluationTemplate(deedDid);
|
|
28735
28782
|
setOutcomeTemplateJson(evalTemplateResult?.surveyTemplate || null);
|
|
28736
28783
|
} catch {
|
|
28737
28784
|
setOutcomeTemplateJson(null);
|
|
@@ -28739,12 +28786,12 @@ var EvaluateClaimFlowDetail = ({
|
|
|
28739
28786
|
setOutcomeTemplateLoading(false);
|
|
28740
28787
|
}
|
|
28741
28788
|
}
|
|
28742
|
-
if (
|
|
28789
|
+
if (handlers2.getDeedRubric && handlers2.evaluateWithRubric && claimDataResult) {
|
|
28743
28790
|
setEvaluationLoading(true);
|
|
28744
28791
|
try {
|
|
28745
|
-
const rubric = await
|
|
28792
|
+
const rubric = await handlers2.getDeedRubric(deedDid);
|
|
28746
28793
|
if (rubric) {
|
|
28747
|
-
const evalResult = await
|
|
28794
|
+
const evalResult = await handlers2.evaluateWithRubric({
|
|
28748
28795
|
rubric: typeof rubric.rubric === "string" ? rubric.rubric : JSON.stringify(rubric.rubric),
|
|
28749
28796
|
claim: claimDataResult
|
|
28750
28797
|
});
|
|
@@ -28770,7 +28817,7 @@ var EvaluateClaimFlowDetail = ({
|
|
|
28770
28817
|
setSurveyLoading(false);
|
|
28771
28818
|
}
|
|
28772
28819
|
},
|
|
28773
|
-
[
|
|
28820
|
+
[collectionId, deedDid]
|
|
28774
28821
|
);
|
|
28775
28822
|
useEffect98(() => {
|
|
28776
28823
|
setSelectedClaimId("");
|
|
@@ -28850,10 +28897,11 @@ var EvaluateClaimFlowDetail = ({
|
|
|
28850
28897
|
mounted = false;
|
|
28851
28898
|
};
|
|
28852
28899
|
const loadProfiles = async () => {
|
|
28900
|
+
const handlers2 = handlersRef.current;
|
|
28853
28901
|
const results = await Promise.all(
|
|
28854
28902
|
missing.map(async (did) => {
|
|
28855
28903
|
try {
|
|
28856
|
-
const profile = await
|
|
28904
|
+
const profile = await handlers2.getMatrixInfoPerDid(did);
|
|
28857
28905
|
return [did, profile];
|
|
28858
28906
|
} catch {
|
|
28859
28907
|
return [did, null];
|
|
@@ -28875,10 +28923,11 @@ var EvaluateClaimFlowDetail = ({
|
|
|
28875
28923
|
return () => {
|
|
28876
28924
|
mounted = false;
|
|
28877
28925
|
};
|
|
28878
|
-
}, [claims,
|
|
28926
|
+
}, [claims, profilesByDid]);
|
|
28879
28927
|
useEffect98(() => {
|
|
28880
28928
|
let mounted = true;
|
|
28881
28929
|
const checkEvaluatorAuthorization = async () => {
|
|
28930
|
+
const handlers2 = handlersRef.current;
|
|
28882
28931
|
if (!deedDid || !collectionId || !adminAddress || !actorDid) {
|
|
28883
28932
|
if (mounted) {
|
|
28884
28933
|
setIsEvaluatorAuthorized(false);
|
|
@@ -28887,7 +28936,7 @@ var EvaluateClaimFlowDetail = ({
|
|
|
28887
28936
|
}
|
|
28888
28937
|
return;
|
|
28889
28938
|
}
|
|
28890
|
-
if (typeof
|
|
28939
|
+
if (typeof handlers2.getUserRoles !== "function") {
|
|
28891
28940
|
if (mounted) {
|
|
28892
28941
|
setIsEvaluatorAuthorized(false);
|
|
28893
28942
|
setAuthError(null);
|
|
@@ -28898,7 +28947,7 @@ var EvaluateClaimFlowDetail = ({
|
|
|
28898
28947
|
setAuthChecking(true);
|
|
28899
28948
|
setAuthError(null);
|
|
28900
28949
|
try {
|
|
28901
|
-
const roles = await
|
|
28950
|
+
const roles = await handlers2.getUserRoles({
|
|
28902
28951
|
userAddress: actorDid,
|
|
28903
28952
|
adminAddress,
|
|
28904
28953
|
deedDid,
|
|
@@ -28924,7 +28973,7 @@ var EvaluateClaimFlowDetail = ({
|
|
|
28924
28973
|
return () => {
|
|
28925
28974
|
mounted = false;
|
|
28926
28975
|
};
|
|
28927
|
-
}, [
|
|
28976
|
+
}, [actorDid, adminAddress, deedDid, collectionId, authRetryKey]);
|
|
28928
28977
|
useEffect98(() => {
|
|
28929
28978
|
if (!selectedClaim) {
|
|
28930
28979
|
setClaimData(null);
|
|
@@ -28933,6 +28982,7 @@ var EvaluateClaimFlowDetail = ({
|
|
|
28933
28982
|
setDisputeDetails(null);
|
|
28934
28983
|
return void 0;
|
|
28935
28984
|
}
|
|
28985
|
+
const handlers2 = handlersRef.current;
|
|
28936
28986
|
setDecision("");
|
|
28937
28987
|
setDisputeReason("");
|
|
28938
28988
|
setPaymentRows([createPaymentRow2()]);
|
|
@@ -28940,10 +28990,10 @@ var EvaluateClaimFlowDetail = ({
|
|
|
28940
28990
|
setOutcomeComplete(false);
|
|
28941
28991
|
loadClaimDetail(selectedClaim);
|
|
28942
28992
|
const isDisputed = getClaimStatusInfo(selectedClaim).key === "disputed";
|
|
28943
|
-
if (isDisputed && typeof
|
|
28993
|
+
if (isDisputed && typeof handlers2.getClaimDisputeDetails === "function") {
|
|
28944
28994
|
let cancelled = false;
|
|
28945
28995
|
setLoadingDispute(true);
|
|
28946
|
-
|
|
28996
|
+
handlers2.getClaimDisputeDetails(selectedClaim.claimId).then((details) => {
|
|
28947
28997
|
if (!cancelled) setDisputeDetails(details);
|
|
28948
28998
|
}).catch(() => {
|
|
28949
28999
|
if (!cancelled) setDisputeDetails(null);
|
|
@@ -28956,7 +29006,7 @@ var EvaluateClaimFlowDetail = ({
|
|
|
28956
29006
|
}
|
|
28957
29007
|
setDisputeDetails(null);
|
|
28958
29008
|
return void 0;
|
|
28959
|
-
}, [selectedClaim, loadClaimDetail
|
|
29009
|
+
}, [selectedClaim, loadClaimDetail]);
|
|
28960
29010
|
const isClaimAlreadyEvaluated = useMemo103(() => {
|
|
28961
29011
|
if (!selectedClaim) return false;
|
|
28962
29012
|
return isClaimEvaluated(selectedClaim);
|
|
@@ -36722,7 +36772,7 @@ var OracleStoreSecretsConfig = ({ inputs, onInputsChange }) => {
|
|
|
36722
36772
|
};
|
|
36723
36773
|
|
|
36724
36774
|
// src/mantine/blocks/action/actionTypes/oracleStoreSecrets/OracleStoreSecretsFlowDetail.tsx
|
|
36725
|
-
import React325, { useCallback as useCallback150, useEffect as useEffect134, useMemo as useMemo133, useRef as
|
|
36775
|
+
import React325, { useCallback as useCallback150, useEffect as useEffect134, useMemo as useMemo133, useRef as useRef33, useState as useState163 } from "react";
|
|
36726
36776
|
import { Alert as Alert79, Button as Button74, Collapse as Collapse11, Divider as Divider36, Group as Group127, Loader as Loader72, Stack as Stack242, Text as Text215 } from "@mantine/core";
|
|
36727
36777
|
import { IconAlertCircle as IconAlertCircle33, IconCheck as IconCheck35, IconChevronDown as IconChevronDown11, IconChevronUp as IconChevronUp5, IconLock as IconLock2 } from "@tabler/icons-react";
|
|
36728
36778
|
var EXPECTED_SECRETS = ["SECP_MNEMONIC", "MATRIX_ORACLE_ADMIN_PASSWORD", "MATRIX_ORACLE_ADMIN_ACCESS_TOKEN", "MATRIX_RECOVERY_PHRASE", "MATRIX_VALUE_PIN", "OPEN_ROUTER_API_KEY"];
|
|
@@ -36799,7 +36849,7 @@ var OracleStoreSecretsFlowDetail = ({ inputs, editor, block, runtime, updateRunt
|
|
|
36799
36849
|
const [showAdditional, setShowAdditional] = useState163(false);
|
|
36800
36850
|
const [networkConstants, setNetworkConstants] = useState163(null);
|
|
36801
36851
|
const [isLoadingConstants, setIsLoadingConstants] = useState163(false);
|
|
36802
|
-
const constantsFetchRef =
|
|
36852
|
+
const constantsFetchRef = useRef33(false);
|
|
36803
36853
|
const handleSaveOpenRouter = useCallback150(async () => {
|
|
36804
36854
|
if (!openRouterDraft) return;
|
|
36805
36855
|
if (!resolvedInputs.publicKeyMultibase) {
|
|
@@ -36917,7 +36967,7 @@ var OracleStoreSecretsFlowDetail = ({ inputs, editor, block, runtime, updateRunt
|
|
|
36917
36967
|
schemaVersion,
|
|
36918
36968
|
missingFields
|
|
36919
36969
|
]);
|
|
36920
|
-
const idempotencyCheckRef =
|
|
36970
|
+
const idempotencyCheckRef = useRef33(false);
|
|
36921
36971
|
useEffect134(() => {
|
|
36922
36972
|
if (idempotencyCheckRef.current) return;
|
|
36923
36973
|
if (!inputsReady) return;
|
|
@@ -37596,7 +37646,7 @@ var OracleStoreSecretsAndConfigConfig = ({ inputs, onInputsChange }) => {
|
|
|
37596
37646
|
};
|
|
37597
37647
|
|
|
37598
37648
|
// src/mantine/blocks/action/actionTypes/oracleStoreSecretsAndConfig/OracleStoreSecretsAndConfigFlowDetail.tsx
|
|
37599
|
-
import React329, { useCallback as useCallback154, useEffect as useEffect137, useMemo as useMemo135, useRef as
|
|
37649
|
+
import React329, { useCallback as useCallback154, useEffect as useEffect137, useMemo as useMemo135, useRef as useRef34, useState as useState166 } from "react";
|
|
37600
37650
|
import { Alert as Alert81, Button as Button76, Collapse as Collapse12, Divider as Divider39, Group as Group129, Loader as Loader74, Stack as Stack246, Text as Text219 } from "@mantine/core";
|
|
37601
37651
|
import { IconAlertCircle as IconAlertCircle35, IconCheck as IconCheck37, IconChevronDown as IconChevronDown12, IconChevronUp as IconChevronUp6, IconLock as IconLock3 } from "@tabler/icons-react";
|
|
37602
37652
|
var EXPECTED_SECRETS2 = ["SECP_MNEMONIC", "MATRIX_ORACLE_ADMIN_PASSWORD", "MATRIX_ORACLE_ADMIN_ACCESS_TOKEN", "MATRIX_RECOVERY_PHRASE", "MATRIX_VALUE_PIN", "OPEN_ROUTER_API_KEY"];
|
|
@@ -37692,7 +37742,7 @@ var OracleStoreSecretsAndConfigFlowDetail = ({ inputs, editor, block, runtime, u
|
|
|
37692
37742
|
const [showAdditional, setShowAdditional] = useState166(false);
|
|
37693
37743
|
const [networkConstants, setNetworkConstants] = useState166(null);
|
|
37694
37744
|
const [isLoadingConstants, setIsLoadingConstants] = useState166(false);
|
|
37695
|
-
const constantsFetchRef =
|
|
37745
|
+
const constantsFetchRef = useRef34(false);
|
|
37696
37746
|
const handleSaveOpenRouter = useCallback154(async () => {
|
|
37697
37747
|
if (!openRouterDraft) return;
|
|
37698
37748
|
if (!resolvedInputs.publicKeyMultibase) return;
|
|
@@ -37803,7 +37853,7 @@ var OracleStoreSecretsAndConfigFlowDetail = ({ inputs, editor, block, runtime, u
|
|
|
37803
37853
|
schemaVersion,
|
|
37804
37854
|
missingFields
|
|
37805
37855
|
]);
|
|
37806
|
-
const idempotencyCheckRef =
|
|
37856
|
+
const idempotencyCheckRef = useRef34(false);
|
|
37807
37857
|
useEffect137(() => {
|
|
37808
37858
|
if (idempotencyCheckRef.current) return;
|
|
37809
37859
|
if (!inputsReady) return;
|
|
@@ -38143,7 +38193,7 @@ var OracleConfigureOracleConfig = ({ inputs, onInputsChange }) => {
|
|
|
38143
38193
|
};
|
|
38144
38194
|
|
|
38145
38195
|
// src/mantine/blocks/action/actionTypes/oracleConfigureOracle/OracleConfigureOracleFlowDetail.tsx
|
|
38146
|
-
import React331, { useCallback as useCallback156, useEffect as useEffect139, useMemo as useMemo136, useRef as
|
|
38196
|
+
import React331, { useCallback as useCallback156, useEffect as useEffect139, useMemo as useMemo136, useRef as useRef35, useState as useState168 } from "react";
|
|
38147
38197
|
import { Alert as Alert82, Button as Button77, Collapse as Collapse13, Divider as Divider41, Group as Group130, Loader as Loader75, Stack as Stack248, Text as Text221 } from "@mantine/core";
|
|
38148
38198
|
import { IconAlertCircle as IconAlertCircle36, IconCheck as IconCheck38, IconChevronDown as IconChevronDown13, IconChevronUp as IconChevronUp7, IconLock as IconLock4 } from "@tabler/icons-react";
|
|
38149
38199
|
var EXPECTED_SECRETS3 = ["SECP_MNEMONIC", "MATRIX_ORACLE_ADMIN_PASSWORD", "MATRIX_ORACLE_ADMIN_ACCESS_TOKEN", "MATRIX_RECOVERY_PHRASE", "MATRIX_VALUE_PIN", "OPEN_ROUTER_API_KEY"];
|
|
@@ -38259,7 +38309,7 @@ var OracleConfigureOracleFlowDetail = ({ inputs, editor, block, runtime, updateR
|
|
|
38259
38309
|
const [showAdditional, setShowAdditional] = useState168(false);
|
|
38260
38310
|
const [networkConstants, setNetworkConstants] = useState168(null);
|
|
38261
38311
|
const [isLoadingConstants, setIsLoadingConstants] = useState168(false);
|
|
38262
|
-
const constantsFetchRef =
|
|
38312
|
+
const constantsFetchRef = useRef35(false);
|
|
38263
38313
|
const handleSaveOpenRouter = useCallback156(async () => {
|
|
38264
38314
|
if (!openRouterDraft) return;
|
|
38265
38315
|
if (!resolvedInputs.publicKeyMultibase) return;
|
|
@@ -38371,7 +38421,7 @@ var OracleConfigureOracleFlowDetail = ({ inputs, editor, block, runtime, updateR
|
|
|
38371
38421
|
schemaVersion,
|
|
38372
38422
|
missingFields
|
|
38373
38423
|
]);
|
|
38374
|
-
const idempotencyCheckRef =
|
|
38424
|
+
const idempotencyCheckRef = useRef35(false);
|
|
38375
38425
|
useEffect139(() => {
|
|
38376
38426
|
if (idempotencyCheckRef.current) return;
|
|
38377
38427
|
if (!inputsReady) return;
|
|
@@ -39190,7 +39240,7 @@ import React342, { useCallback as useCallback161 } from "react";
|
|
|
39190
39240
|
import { IconSettings as IconSettings19 } from "@tabler/icons-react";
|
|
39191
39241
|
|
|
39192
39242
|
// src/mantine/blocks/location/template/GeneralTab.tsx
|
|
39193
|
-
import React341, { useEffect as useEffect141, useRef as
|
|
39243
|
+
import React341, { useEffect as useEffect141, useRef as useRef36, useState as useState171 } from "react";
|
|
39194
39244
|
import { Box as Box63, Divider as Divider42, Stack as Stack255, Text as Text228 } from "@mantine/core";
|
|
39195
39245
|
|
|
39196
39246
|
// src/core/hooks/useUnlMap.ts
|
|
@@ -39367,10 +39417,10 @@ var GeneralTab17 = ({ title, description, latitude, longitude, onTitleChange, on
|
|
|
39367
39417
|
const [mapError, setMapError] = useState171(null);
|
|
39368
39418
|
const { status, UnlSdk } = useUnlMap();
|
|
39369
39419
|
const { mapConfig } = useBlocknoteContext();
|
|
39370
|
-
const markerRef =
|
|
39371
|
-
const mapRef =
|
|
39372
|
-
const wrapperRef =
|
|
39373
|
-
const containerRef =
|
|
39420
|
+
const markerRef = useRef36(null);
|
|
39421
|
+
const mapRef = useRef36(null);
|
|
39422
|
+
const wrapperRef = useRef36(null);
|
|
39423
|
+
const containerRef = useRef36(null);
|
|
39374
39424
|
useEffect141(() => {
|
|
39375
39425
|
setLocalTitle(title);
|
|
39376
39426
|
}, [title]);
|
|
@@ -39503,15 +39553,15 @@ var TemplateConfig17 = ({ editor, block }) => {
|
|
|
39503
39553
|
};
|
|
39504
39554
|
|
|
39505
39555
|
// src/mantine/blocks/location/components/LocationMap.tsx
|
|
39506
|
-
import React343, { useEffect as useEffect142, useRef as
|
|
39556
|
+
import React343, { useEffect as useEffect142, useRef as useRef37, useState as useState172 } from "react";
|
|
39507
39557
|
import { Box as Box64, Flex as Flex36, Loader as Loader79, Text as Text229 } from "@mantine/core";
|
|
39508
39558
|
var UnlMap = ({ w = "100%", h = 200, latitude, longitude, zoom = 5, showMarker = true, showTilesControl = false }) => {
|
|
39509
39559
|
const [mapError, setMapError] = useState172(null);
|
|
39510
39560
|
const { mapConfig } = useBlocknoteContext();
|
|
39511
|
-
const wrapperRef =
|
|
39512
|
-
const containerRef =
|
|
39513
|
-
const mapRef =
|
|
39514
|
-
const markerRef =
|
|
39561
|
+
const wrapperRef = useRef37(null);
|
|
39562
|
+
const containerRef = useRef37(null);
|
|
39563
|
+
const mapRef = useRef37(null);
|
|
39564
|
+
const markerRef = useRef37(null);
|
|
39515
39565
|
const { status, UnlSdk } = useUnlMap();
|
|
39516
39566
|
useEffect142(() => {
|
|
39517
39567
|
if (status !== "ready" || !UnlSdk || mapRef.current || !containerRef.current || !wrapperRef.current) return;
|
|
@@ -40124,7 +40174,7 @@ var SkillsTemplateView = ({ editor: _editor, block }) => {
|
|
|
40124
40174
|
// src/mantine/blocks/skills/flow/SkillsFlowView.tsx
|
|
40125
40175
|
import { ActionIcon as ActionIcon46, Badge as Badge57, Button as Button82, Collapse as Collapse15, Group as Group141, Loader as Loader80, Paper as Paper21, Stack as Stack263, Text as Text237, Tooltip as Tooltip30 } from "@mantine/core";
|
|
40126
40176
|
import { IconBrain as IconBrain3, IconCheck as IconCheck43, IconPencil, IconPlus as IconPlus11, IconTrash as IconTrash11, IconX as IconX15 } from "@tabler/icons-react";
|
|
40127
|
-
import React361, { useCallback as useCallback165, useEffect as useEffect144, useMemo as useMemo146, useRef as
|
|
40177
|
+
import React361, { useCallback as useCallback165, useEffect as useEffect144, useMemo as useMemo146, useRef as useRef38, useState as useState175 } from "react";
|
|
40128
40178
|
function parseSkills2(raw) {
|
|
40129
40179
|
try {
|
|
40130
40180
|
const parsed = JSON.parse(raw || "[]");
|
|
@@ -40156,7 +40206,7 @@ var SkillsFlowView = ({ editor, block }) => {
|
|
|
40156
40206
|
const [validatingUrls, setValidatingUrls] = useState175({});
|
|
40157
40207
|
const [capsules, setCapsules] = useState175([]);
|
|
40158
40208
|
const [loadingCapsules, setLoadingCapsules] = useState175(false);
|
|
40159
|
-
const capsulesFetchedRef =
|
|
40209
|
+
const capsulesFetchedRef = useRef38(false);
|
|
40160
40210
|
useEffect144(() => {
|
|
40161
40211
|
if (capsulesFetchedRef.current || !handlers.getSkills) return;
|
|
40162
40212
|
capsulesFetchedRef.current = true;
|
|
@@ -40164,7 +40214,7 @@ var SkillsFlowView = ({ editor, block }) => {
|
|
|
40164
40214
|
handlers.getSkills().then((r) => setCapsules(r.capsules || [])).catch((err) => console.error("[skills] Failed to fetch capsules:", err)).finally(() => setLoadingCapsules(false));
|
|
40165
40215
|
}, [handlers.getSkills]);
|
|
40166
40216
|
const [network, setNetwork] = useState175("");
|
|
40167
|
-
const networkFetchedRef =
|
|
40217
|
+
const networkFetchedRef = useRef38(false);
|
|
40168
40218
|
useEffect144(() => {
|
|
40169
40219
|
if (networkFetchedRef.current || !handlers.getNetwork) return;
|
|
40170
40220
|
networkFetchedRef.current = true;
|
|
@@ -41270,21 +41320,21 @@ import { useCreateBlockNote as useCreateBlockNote2 } from "@blocknote/react";
|
|
|
41270
41320
|
import { BlockNoteSchema as BlockNoteSchema2, defaultBlockSpecs as defaultBlockSpecs2, defaultInlineContentSpecs as defaultInlineContentSpecs2, defaultStyleSpecs as defaultStyleSpecs2 } from "@blocknote/core";
|
|
41271
41321
|
|
|
41272
41322
|
// src/core/hooks/useMatrixProvider.ts
|
|
41273
|
-
import { useEffect as useEffect146, useState as useState177, useRef as
|
|
41323
|
+
import { useEffect as useEffect146, useState as useState177, useRef as useRef39, useCallback as useCallback167, useMemo as useMemo149 } from "react";
|
|
41274
41324
|
import { MatrixProvider } from "@ixo/matrix-crdt";
|
|
41275
41325
|
function useMatrixProvider({ matrixClient, roomId, yDoc }) {
|
|
41276
41326
|
const [matrixProvider, setProvider] = useState177(null);
|
|
41277
41327
|
const [status, setStatus] = useState177("disconnected");
|
|
41278
|
-
const isMountedRef =
|
|
41279
|
-
const providerRef =
|
|
41280
|
-
const retryTimeoutRef =
|
|
41328
|
+
const isMountedRef = useRef39(true);
|
|
41329
|
+
const providerRef = useRef39(null);
|
|
41330
|
+
const retryTimeoutRef = useRef39(null);
|
|
41281
41331
|
const providerOptions = useMemo149(
|
|
41282
41332
|
() => ({
|
|
41283
41333
|
translator: {
|
|
41284
41334
|
updateEventType: "matrix-crdt.doc_update",
|
|
41285
41335
|
snapshotEventType: "matrix-crdt.doc_snapshot"
|
|
41286
41336
|
},
|
|
41287
|
-
enableExperimentalWebrtcSync:
|
|
41337
|
+
enableExperimentalWebrtcSync: true,
|
|
41288
41338
|
enableAwareness: true,
|
|
41289
41339
|
reader: { snapshotInterval: 10 },
|
|
41290
41340
|
writer: { flushInterval: 300, retryIfForbiddenInterval: 3e4 }
|
|
@@ -41375,7 +41425,7 @@ function useCollaborativeYDoc(_options) {
|
|
|
41375
41425
|
}
|
|
41376
41426
|
|
|
41377
41427
|
// src/mantine/hooks/useCollaborativeIxoEditor.ts
|
|
41378
|
-
import { useMemo as useMemo151, useEffect as useEffect148, useState as useState178, useRef as
|
|
41428
|
+
import { useMemo as useMemo151, useEffect as useEffect148, useState as useState178, useRef as useRef41 } from "react";
|
|
41379
41429
|
|
|
41380
41430
|
// src/core/lib/matrixMetadata.ts
|
|
41381
41431
|
var COVER_IMAGE_EVENT_TYPE = "ixo.page.cover_image";
|
|
@@ -41644,7 +41694,7 @@ function logInvocation(matrixClient, roomId, invocation) {
|
|
|
41644
41694
|
}
|
|
41645
41695
|
|
|
41646
41696
|
// src/mantine/hooks/useFlowLifecycle.ts
|
|
41647
|
-
import { useEffect as useEffect147, useCallback as useCallback168, useRef as
|
|
41697
|
+
import { useEffect as useEffect147, useCallback as useCallback168, useRef as useRef40 } from "react";
|
|
41648
41698
|
|
|
41649
41699
|
// src/mantine/hooks/useFlowTTLCleanup.ts
|
|
41650
41700
|
function performTTLCleanup(editor) {
|
|
@@ -41881,8 +41931,8 @@ function isBlockEnabledInFlow(block, editorDocument) {
|
|
|
41881
41931
|
// src/mantine/hooks/useFlowLifecycle.ts
|
|
41882
41932
|
var DEFAULT_INTERVAL_MS = 3e4;
|
|
41883
41933
|
function useFlowLifecycle({ editor, connectionStatus, enabled = true }) {
|
|
41884
|
-
const hasRunInitialRef =
|
|
41885
|
-
const runningRef =
|
|
41934
|
+
const hasRunInitialRef = useRef40(false);
|
|
41935
|
+
const runningRef = useRef40(false);
|
|
41886
41936
|
const runPipeline = useCallback168(async () => {
|
|
41887
41937
|
if (!editor || runningRef.current) return;
|
|
41888
41938
|
runningRef.current = true;
|
|
@@ -41984,7 +42034,6 @@ async function mirrorIconToRoomAvatar(matrixClient, roomId, iconValue) {
|
|
|
41984
42034
|
// src/mantine/hooks/useCollaborativeIxoEditor.ts
|
|
41985
42035
|
function useCreateCollaborativeIxoEditor(options) {
|
|
41986
42036
|
const yDoc = useCollaborativeYDoc(options);
|
|
41987
|
-
window.__yDoc = yDoc;
|
|
41988
42037
|
const {
|
|
41989
42038
|
theme = "light",
|
|
41990
42039
|
uploadFile,
|
|
@@ -42102,13 +42151,20 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
42102
42151
|
}),
|
|
42103
42152
|
[theme, editable, sideMenu, slashMenu, formattingToolbar, linkToolbar, filePanel, tableHandles]
|
|
42104
42153
|
);
|
|
42105
|
-
const
|
|
42106
|
-
|
|
42107
|
-
|
|
42108
|
-
|
|
42109
|
-
|
|
42110
|
-
|
|
42111
|
-
|
|
42154
|
+
const [providerReady, setProviderReady] = useState178(false);
|
|
42155
|
+
useEffect148(() => {
|
|
42156
|
+
if (matrixProvider && !providerReady) setProviderReady(true);
|
|
42157
|
+
}, [matrixProvider, providerReady]);
|
|
42158
|
+
const editor = useCreateBlockNote2(
|
|
42159
|
+
{
|
|
42160
|
+
schema,
|
|
42161
|
+
initialContent,
|
|
42162
|
+
uploadFile: defaultUploadFile,
|
|
42163
|
+
collaboration: collaborationConfig,
|
|
42164
|
+
pasteHandler: ixoPasteHandler
|
|
42165
|
+
},
|
|
42166
|
+
[providerReady]
|
|
42167
|
+
);
|
|
42112
42168
|
const titleText = useMemo151(() => yDoc.getText("title"), [yDoc]);
|
|
42113
42169
|
let ixoEditor;
|
|
42114
42170
|
if (editor) {
|
|
@@ -42334,7 +42390,7 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
42334
42390
|
}
|
|
42335
42391
|
}, [connectionStatus, root, titleText, permissions.write, options.docId, options.title, memoizedUser.id]);
|
|
42336
42392
|
const [connectedUsers, setConnectedUsers] = useState178([]);
|
|
42337
|
-
const activeBlockIdRef =
|
|
42393
|
+
const activeBlockIdRef = useRef41(null);
|
|
42338
42394
|
const awarenessInstance = matrixProvider?.awarenessInstance ?? null;
|
|
42339
42395
|
useEffect148(() => {
|
|
42340
42396
|
if (!awarenessInstance || connectionStatus !== "connected") {
|
|
@@ -42450,7 +42506,7 @@ function sanitizeThemeForMantine7(theme) {
|
|
|
42450
42506
|
}
|
|
42451
42507
|
|
|
42452
42508
|
// src/mantine/components/CommandPalette.tsx
|
|
42453
|
-
import React364, { useEffect as useEffect149, useRef as
|
|
42509
|
+
import React364, { useEffect as useEffect149, useRef as useRef42, useState as useState179, useMemo as useMemo152, useCallback as useCallback169 } from "react";
|
|
42454
42510
|
import { Box as Box67, Text as Text238, Stack as Stack264 } from "@mantine/core";
|
|
42455
42511
|
var GROUP_ORDER = {
|
|
42456
42512
|
Headings: 0,
|
|
@@ -42464,7 +42520,7 @@ var GROUP_ORDER = {
|
|
|
42464
42520
|
Flows: 8
|
|
42465
42521
|
};
|
|
42466
42522
|
function PaletteItem({ item, isSelected, onClick, id }) {
|
|
42467
|
-
const ref =
|
|
42523
|
+
const ref = useRef42(null);
|
|
42468
42524
|
const [hovered, setHovered] = useState179(false);
|
|
42469
42525
|
useEffect149(() => {
|
|
42470
42526
|
if (isSelected && ref.current) {
|
|
@@ -42692,7 +42748,7 @@ function PanelContent({ theme: _theme }) {
|
|
|
42692
42748
|
}
|
|
42693
42749
|
|
|
42694
42750
|
// src/mantine/components/CoverImage.tsx
|
|
42695
|
-
import React370, { useState as useState183, useRef as
|
|
42751
|
+
import React370, { useState as useState183, useRef as useRef43, useEffect as useEffect152, useMemo as useMemo155 } from "react";
|
|
42696
42752
|
import { Box as Box72, Group as Group145 } from "@mantine/core";
|
|
42697
42753
|
import { IconMoodSmile, IconPhoto as IconPhoto6, IconSettings as IconSettings22, IconArrowsMove, IconTrash as IconTrash13, IconRefresh as IconRefresh10 } from "@tabler/icons-react";
|
|
42698
42754
|
|
|
@@ -43180,8 +43236,8 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
43180
43236
|
const [isHovering, setIsHovering] = useState183(false);
|
|
43181
43237
|
const [isRepositioning, setIsRepositioning] = useState183(false);
|
|
43182
43238
|
const [coverPosition, setCoverPosition] = useState183(() => editor?.getPageMetadata?.()?.coverPosition ?? 50);
|
|
43183
|
-
const coverFileInputRef =
|
|
43184
|
-
const logoFileInputRef =
|
|
43239
|
+
const coverFileInputRef = useRef43(null);
|
|
43240
|
+
const logoFileInputRef = useRef43(null);
|
|
43185
43241
|
const [opened, { open, close }] = useDisclosure8(false);
|
|
43186
43242
|
const [metadata, setMetadata] = useState183(() => editor?.getPageMetadata?.() || null);
|
|
43187
43243
|
const settingsPanelContent = useMemo155(() => editor ? /* @__PURE__ */ React370.createElement(FlowSettingsPanel, { editor }) : null, [editor]);
|
|
@@ -43476,7 +43532,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
43476
43532
|
}
|
|
43477
43533
|
|
|
43478
43534
|
// src/mantine/components/PageTitle.tsx
|
|
43479
|
-
import React371, { useState as useState184, useEffect as useEffect153, useRef as
|
|
43535
|
+
import React371, { useState as useState184, useEffect as useEffect153, useRef as useRef44, useCallback as useCallback171 } from "react";
|
|
43480
43536
|
import { Box as Box73 } from "@mantine/core";
|
|
43481
43537
|
var DEFAULT_TITLE = "New page";
|
|
43482
43538
|
function isUserTitle(name) {
|
|
@@ -43494,8 +43550,8 @@ function cleanEmptyEditable(el) {
|
|
|
43494
43550
|
function PageTitle({ editor, editable }) {
|
|
43495
43551
|
const [title, setTitle] = useState184("");
|
|
43496
43552
|
const [hasIcon, setHasIcon] = useState184(false);
|
|
43497
|
-
const titleRef =
|
|
43498
|
-
const isComposing =
|
|
43553
|
+
const titleRef = useRef44(null);
|
|
43554
|
+
const isComposing = useRef44(false);
|
|
43499
43555
|
useEffect153(() => {
|
|
43500
43556
|
if (!editor?._metadataManager) return;
|
|
43501
43557
|
const metadata = editor._metadataManager.getMetadata();
|
|
@@ -43646,7 +43702,7 @@ if (typeof document !== "undefined") {
|
|
|
43646
43702
|
}
|
|
43647
43703
|
|
|
43648
43704
|
// src/mantine/components/ExternalDropZone.tsx
|
|
43649
|
-
import React372, { useCallback as useCallback172, useEffect as useEffect154, useRef as
|
|
43705
|
+
import React372, { useCallback as useCallback172, useEffect as useEffect154, useRef as useRef45, useState as useState185 } from "react";
|
|
43650
43706
|
import { Box as Box74 } from "@mantine/core";
|
|
43651
43707
|
var SCROLL_ZONE_SIZE = 80;
|
|
43652
43708
|
var SCROLL_SPEED = 12;
|
|
@@ -43659,14 +43715,14 @@ var ExternalDropZone = ({
|
|
|
43659
43715
|
onPlacementCancel,
|
|
43660
43716
|
children
|
|
43661
43717
|
}) => {
|
|
43662
|
-
const containerRef =
|
|
43718
|
+
const containerRef = useRef45(null);
|
|
43663
43719
|
const [isValidDrag, setIsValidDrag] = useState185(false);
|
|
43664
43720
|
const [isHoveringInPlacementMode, setIsHoveringInPlacementMode] = useState185(false);
|
|
43665
43721
|
const [indicatorStyle, setIndicatorStyle] = useState185({});
|
|
43666
|
-
const dropPositionRef =
|
|
43667
|
-
const scrollAnimationRef =
|
|
43668
|
-
const scrollDirectionRef =
|
|
43669
|
-
const scrollContainerRef =
|
|
43722
|
+
const dropPositionRef = useRef45(null);
|
|
43723
|
+
const scrollAnimationRef = useRef45(null);
|
|
43724
|
+
const scrollDirectionRef = useRef45(null);
|
|
43725
|
+
const scrollContainerRef = useRef45(null);
|
|
43670
43726
|
const getBlockElements = useCallback172(() => {
|
|
43671
43727
|
if (!containerRef.current) return [];
|
|
43672
43728
|
const blocks = containerRef.current.querySelectorAll('[data-node-type="blockContainer"]');
|
|
@@ -44010,7 +44066,8 @@ function IxoEditorContent({
|
|
|
44010
44066
|
externalDropType,
|
|
44011
44067
|
dropIndicator,
|
|
44012
44068
|
isPlacementMode,
|
|
44013
|
-
onPlacementCancel
|
|
44069
|
+
onPlacementCancel,
|
|
44070
|
+
belowTitleSlot
|
|
44014
44071
|
}) {
|
|
44015
44072
|
const { activePanel } = usePanelStore();
|
|
44016
44073
|
const isPanelOpen = activePanel !== null;
|
|
@@ -44065,6 +44122,7 @@ function IxoEditorContent({
|
|
|
44065
44122
|
},
|
|
44066
44123
|
/* @__PURE__ */ React373.createElement(CoverImage, { coverImageUrl, logoUrl }),
|
|
44067
44124
|
/* @__PURE__ */ React373.createElement(PageTitle, { editor, editable: isEditable }),
|
|
44125
|
+
belowTitleSlot,
|
|
44068
44126
|
(onExternalDrop || isPlacementMode) && isEditable ? /* @__PURE__ */ React373.createElement(
|
|
44069
44127
|
ExternalDropZone,
|
|
44070
44128
|
{
|
|
@@ -44104,7 +44162,8 @@ function IxoEditor({
|
|
|
44104
44162
|
onPlacementCancel,
|
|
44105
44163
|
mapConfig,
|
|
44106
44164
|
connectedUsers,
|
|
44107
|
-
awarenessInstance
|
|
44165
|
+
awarenessInstance,
|
|
44166
|
+
belowTitleSlot
|
|
44108
44167
|
}) {
|
|
44109
44168
|
if (!editor) {
|
|
44110
44169
|
return null;
|
|
@@ -44150,7 +44209,8 @@ function IxoEditor({
|
|
|
44150
44209
|
externalDropType,
|
|
44151
44210
|
dropIndicator,
|
|
44152
44211
|
isPlacementMode,
|
|
44153
|
-
onPlacementCancel
|
|
44212
|
+
onPlacementCancel,
|
|
44213
|
+
belowTitleSlot
|
|
44154
44214
|
},
|
|
44155
44215
|
children
|
|
44156
44216
|
)
|
|
@@ -44241,7 +44301,7 @@ function DebugButton({ editor }) {
|
|
|
44241
44301
|
}
|
|
44242
44302
|
|
|
44243
44303
|
// src/mantine/components/PageHeader.tsx
|
|
44244
|
-
import React375, { useState as useState186, useRef as
|
|
44304
|
+
import React375, { useState as useState186, useRef as useRef46, useEffect as useEffect155 } from "react";
|
|
44245
44305
|
function PageHeader({
|
|
44246
44306
|
title = "New page",
|
|
44247
44307
|
icon: icon2,
|
|
@@ -44255,8 +44315,8 @@ function PageHeader({
|
|
|
44255
44315
|
}) {
|
|
44256
44316
|
const [isMenuOpen, setIsMenuOpen] = useState186(false);
|
|
44257
44317
|
const [isPrivacyOpen, setIsPrivacyOpen] = useState186(false);
|
|
44258
|
-
const menuRef =
|
|
44259
|
-
const privacyRef =
|
|
44318
|
+
const menuRef = useRef46(null);
|
|
44319
|
+
const privacyRef = useRef46(null);
|
|
44260
44320
|
useEffect155(() => {
|
|
44261
44321
|
function handleClickOutside(event) {
|
|
44262
44322
|
if (menuRef.current && !menuRef.current.contains(event.target)) {
|
|
@@ -44888,4 +44948,4 @@ export {
|
|
|
44888
44948
|
getExtraSlashMenuItems,
|
|
44889
44949
|
useCreateIxoEditor
|
|
44890
44950
|
};
|
|
44891
|
-
//# sourceMappingURL=chunk-
|
|
44951
|
+
//# sourceMappingURL=chunk-4QAMDIPO.mjs.map
|