@ixo/editor 6.14.0 → 6.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/action-manifest.json +89 -0
- package/dist/{chunk-ZTSBEK6E.js → chunk-AEMFFWTU.js} +2 -2
- package/dist/{chunk-UZQSAYAK.js → chunk-SB3QHMRF.js} +32 -32
- package/dist/chunk-SB3QHMRF.js.map +1 -0
- package/dist/{chunk-LMHIE6UG.js → chunk-WSRVRHND.js} +116 -2
- package/dist/chunk-WSRVRHND.js.map +1 -0
- package/dist/core/index.d.ts +47 -3
- package/dist/core/index.js +6 -2
- package/dist/core/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/mantine/index.js +2 -2
- package/dist/{store-D5rKaUtZ.d.ts → store-BsdF3BVv.d.ts} +15 -0
- package/package.json +1 -1
- package/dist/chunk-LMHIE6UG.js.map +0 -1
- package/dist/chunk-UZQSAYAK.js.map +0 -1
- /package/dist/{chunk-ZTSBEK6E.js.map → chunk-AEMFFWTU.js.map} +0 -0
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
replaceBlockInFragment,
|
|
11
11
|
swapBlocksInFragment,
|
|
12
12
|
writeCompiledBlocksToFragment
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-WSRVRHND.js";
|
|
14
14
|
|
|
15
15
|
// src/core/lib/flowCompiler/authoring.ts
|
|
16
16
|
import * as Y from "yjs";
|
|
@@ -257,4 +257,4 @@ export {
|
|
|
257
257
|
resetStepRuntime,
|
|
258
258
|
setFormAnswers
|
|
259
259
|
};
|
|
260
|
-
//# sourceMappingURL=chunk-
|
|
260
|
+
//# sourceMappingURL=chunk-AEMFFWTU.js.map
|
|
@@ -76,7 +76,7 @@ import {
|
|
|
76
76
|
verifyCompletion,
|
|
77
77
|
warnOnce,
|
|
78
78
|
writeRunRecordAndReconcile
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-WSRVRHND.js";
|
|
80
80
|
|
|
81
81
|
// src/mantine/hooks/usePanel.ts
|
|
82
82
|
import { useCallback, useMemo, useEffect, useRef } from "react";
|
|
@@ -32297,6 +32297,29 @@ import React314, { useCallback as useCallback108, useEffect as useEffect111, use
|
|
|
32297
32297
|
import { Badge as Badge51, Box as Box58, Button as Button65, Group as Group112, Loader as Loader59, Overlay, SegmentedControl as SegmentedControl14, Stack as Stack207, Text as Text195 } from "@mantine/core";
|
|
32298
32298
|
import { DateTimePicker as DateTimePicker2 } from "@mantine/dates";
|
|
32299
32299
|
import { IconAlertCircle as IconAlertCircle27, IconCheck as IconCheck23, IconRefresh as IconRefresh8 } from "@tabler/icons-react";
|
|
32300
|
+
|
|
32301
|
+
// src/core/lib/actionRegistry/actions/collection/failure.ts
|
|
32302
|
+
var ACTION_INPUT_REQUIRED_ERROR_CODE = "ACTION_INPUT_REQUIRED";
|
|
32303
|
+
var COLLECTION_MANAGE_OPERATIONS = /* @__PURE__ */ new Set(["refresh", "updateState", "updateDates", "updateQuota", "updatePayments", "updateIntents"]);
|
|
32304
|
+
function collectionLifecycleRuntimeError(error, runtimeInputs, at = Date.now()) {
|
|
32305
|
+
const message = error instanceof Error ? error.message : String(error || "Collection lifecycle action failed");
|
|
32306
|
+
const operation = runtimeInputs.operation;
|
|
32307
|
+
const collectionId = String(runtimeInputs.collectionId || "").trim();
|
|
32308
|
+
const isMissingCollectionId = operation !== "create" && COLLECTION_MANAGE_OPERATIONS.has(operation) && collectionId.length === 0 && message.includes("collectionId is required");
|
|
32309
|
+
if (!isMissingCollectionId) return { message, at };
|
|
32310
|
+
return {
|
|
32311
|
+
message,
|
|
32312
|
+
code: ACTION_INPUT_REQUIRED_ERROR_CODE,
|
|
32313
|
+
at,
|
|
32314
|
+
data: {
|
|
32315
|
+
actionType: "qi/collection.lifecycle",
|
|
32316
|
+
field: "collectionId",
|
|
32317
|
+
operation
|
|
32318
|
+
}
|
|
32319
|
+
};
|
|
32320
|
+
}
|
|
32321
|
+
|
|
32322
|
+
// src/mantine/blocks/action/actionTypes/collection/CollectionLifecycleFlowDetail.tsx
|
|
32300
32323
|
var LOG = "[collection.lifecycle]";
|
|
32301
32324
|
function parseTemplateInputs(json) {
|
|
32302
32325
|
try {
|
|
@@ -32496,9 +32519,10 @@ var CollectionLifecycleFlowDetail = ({
|
|
|
32496
32519
|
}
|
|
32497
32520
|
console.log(`${LOG} refresh success`, { collectionId: payload.collectionId });
|
|
32498
32521
|
} catch (err) {
|
|
32499
|
-
const
|
|
32522
|
+
const failure = collectionLifecycleRuntimeError(err, { operation: "refresh", collectionId });
|
|
32523
|
+
const message = failure.message;
|
|
32500
32524
|
console.error(`${LOG} refresh failed`, { message });
|
|
32501
|
-
updateRuntime({ state: "failed", error:
|
|
32525
|
+
updateRuntime({ state: "failed", error: failure });
|
|
32502
32526
|
}
|
|
32503
32527
|
}, [executeAction, effectiveCollectionId, updateRuntime]);
|
|
32504
32528
|
useEffect111(() => {
|
|
@@ -32679,9 +32703,10 @@ var CollectionLifecycleFlowDetail = ({
|
|
|
32679
32703
|
}
|
|
32680
32704
|
console.log(`${LOG} execute success`, { operation: runtimeInputs.operation, collectionId: payload.collectionId, state: payload.state });
|
|
32681
32705
|
} catch (err) {
|
|
32682
|
-
const
|
|
32706
|
+
const failure = collectionLifecycleRuntimeError(err, runtimeInputs);
|
|
32707
|
+
const message = failure.message;
|
|
32683
32708
|
console.error(`${LOG} execute failed`, { operation: runtimeInputs.operation, message });
|
|
32684
|
-
updateRuntime({ state: "failed", error:
|
|
32709
|
+
updateRuntime({ state: "failed", error: failure });
|
|
32685
32710
|
}
|
|
32686
32711
|
}, [isDisabled, isRunning, executeAction, validation.ok, validation.error, operation, buildRuntimeInputs, effectiveCollectionId, updateRuntime]);
|
|
32687
32712
|
useEffect111(() => {
|
|
@@ -48116,21 +48141,6 @@ async function appendToThread(matrixClient, roomId, threadType, payload) {
|
|
|
48116
48141
|
}
|
|
48117
48142
|
});
|
|
48118
48143
|
}
|
|
48119
|
-
function logDelegation(matrixClient, roomId, delegation) {
|
|
48120
|
-
appendToThread(matrixClient, roomId, "delegations", {
|
|
48121
|
-
type: "delegation",
|
|
48122
|
-
cid: delegation.cid,
|
|
48123
|
-
issuerDid: delegation.issuerDid,
|
|
48124
|
-
audienceDid: delegation.audienceDid,
|
|
48125
|
-
capabilities: delegation.capabilities,
|
|
48126
|
-
expiration: delegation.expiration,
|
|
48127
|
-
createdAt: delegation.createdAt,
|
|
48128
|
-
format: delegation.format,
|
|
48129
|
-
proofCids: delegation.proofCids
|
|
48130
|
-
}).catch((error) => {
|
|
48131
|
-
console.warn("[MatrixThreadLog] Failed to log delegation:", delegation.cid, error);
|
|
48132
|
-
});
|
|
48133
|
-
}
|
|
48134
48144
|
function logInvocation(matrixClient, roomId, invocation) {
|
|
48135
48145
|
appendToThread(matrixClient, roomId, "invocations", {
|
|
48136
48146
|
type: "invocation",
|
|
@@ -48527,15 +48537,7 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
48527
48537
|
const agentLeasesMap = useMemo176(() => yDoc.getMap("agentLeases"), [yDoc]);
|
|
48528
48538
|
const xeroWorkItemsMap = useMemo176(() => yDoc.getMap("xeroWorkItems"), [yDoc]);
|
|
48529
48539
|
const xeroConnectionMap = useMemo176(() => yDoc.getMap("xeroConnection"), [yDoc]);
|
|
48530
|
-
const ucanDelegationStore = useMemo176(() =>
|
|
48531
|
-
const store = createUcanDelegationStore(delegationsMap);
|
|
48532
|
-
const originalSet = store.set;
|
|
48533
|
-
store.set = (delegation) => {
|
|
48534
|
-
originalSet(delegation);
|
|
48535
|
-
logDelegation(matrixClient, options.roomId, delegation);
|
|
48536
|
-
};
|
|
48537
|
-
return store;
|
|
48538
|
-
}, [delegationsMap, matrixClient, options.roomId]);
|
|
48540
|
+
const ucanDelegationStore = useMemo176(() => createUcanDelegationStore(delegationsMap), [delegationsMap]);
|
|
48539
48541
|
const invocationStore = useMemo176(() => {
|
|
48540
48542
|
const store = createInvocationStore(invocationsMap);
|
|
48541
48543
|
const originalAdd = store.add;
|
|
@@ -48672,7 +48674,6 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
48672
48674
|
}
|
|
48673
48675
|
if (delegation.cid) {
|
|
48674
48676
|
ucanDelegationStore.set(delegation);
|
|
48675
|
-
logDelegation(matrixClient, options.roomId, delegation);
|
|
48676
48677
|
} else if (delegation.id) {
|
|
48677
48678
|
const stored = {
|
|
48678
48679
|
cid: delegation.id,
|
|
@@ -48686,7 +48687,6 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
48686
48687
|
proofCids: delegation.proofs || []
|
|
48687
48688
|
};
|
|
48688
48689
|
ucanDelegationStore.set(stored);
|
|
48689
|
-
logDelegation(matrixClient, options.roomId, stored);
|
|
48690
48690
|
}
|
|
48691
48691
|
};
|
|
48692
48692
|
ixoEditor.getRootCapability = () => {
|
|
@@ -51524,4 +51524,4 @@ export {
|
|
|
51524
51524
|
ixoGraphQLClient,
|
|
51525
51525
|
getEntity
|
|
51526
51526
|
};
|
|
51527
|
-
//# sourceMappingURL=chunk-
|
|
51527
|
+
//# sourceMappingURL=chunk-SB3QHMRF.js.map
|