@ixo/editor 6.14.0 → 6.16.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-6IOOGDDS.js} +2 -2
- package/dist/{chunk-UZQSAYAK.js → chunk-MR37B67W.js} +40 -34
- package/dist/chunk-MR37B67W.js.map +1 -0
- package/dist/{chunk-LMHIE6UG.js → chunk-TFY73KIE.js} +182 -14
- package/dist/chunk-TFY73KIE.js.map +1 -0
- package/dist/core/index.d.ts +74 -4
- package/dist/core/index.js +10 -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-6IOOGDDS.js.map} +0 -0
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
replaceBlockInFragment,
|
|
11
11
|
swapBlocksInFragment,
|
|
12
12
|
writeCompiledBlocksToFragment
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-TFY73KIE.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-6IOOGDDS.js.map
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
OUTLOOK_SEND_SCHEMA,
|
|
8
8
|
SLACK_SEND_SCHEMA,
|
|
9
9
|
STEP_COMPLETED_EVENT_NAME,
|
|
10
|
+
XERO_WORK_TERMINAL_MAP_NAME,
|
|
10
11
|
buildActionRunInputs,
|
|
11
12
|
buildDomainCardLinkedResource,
|
|
12
13
|
buildFlowNodeFromBlock,
|
|
@@ -76,7 +77,7 @@ import {
|
|
|
76
77
|
verifyCompletion,
|
|
77
78
|
warnOnce,
|
|
78
79
|
writeRunRecordAndReconcile
|
|
79
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-TFY73KIE.js";
|
|
80
81
|
|
|
81
82
|
// src/mantine/hooks/usePanel.ts
|
|
82
83
|
import { useCallback, useMemo, useEffect, useRef } from "react";
|
|
@@ -32297,6 +32298,29 @@ import React314, { useCallback as useCallback108, useEffect as useEffect111, use
|
|
|
32297
32298
|
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
32299
|
import { DateTimePicker as DateTimePicker2 } from "@mantine/dates";
|
|
32299
32300
|
import { IconAlertCircle as IconAlertCircle27, IconCheck as IconCheck23, IconRefresh as IconRefresh8 } from "@tabler/icons-react";
|
|
32301
|
+
|
|
32302
|
+
// src/core/lib/actionRegistry/actions/collection/failure.ts
|
|
32303
|
+
var ACTION_INPUT_REQUIRED_ERROR_CODE = "ACTION_INPUT_REQUIRED";
|
|
32304
|
+
var COLLECTION_MANAGE_OPERATIONS = /* @__PURE__ */ new Set(["refresh", "updateState", "updateDates", "updateQuota", "updatePayments", "updateIntents"]);
|
|
32305
|
+
function collectionLifecycleRuntimeError(error, runtimeInputs, at = Date.now()) {
|
|
32306
|
+
const message = error instanceof Error ? error.message : String(error || "Collection lifecycle action failed");
|
|
32307
|
+
const operation = runtimeInputs.operation;
|
|
32308
|
+
const collectionId = String(runtimeInputs.collectionId || "").trim();
|
|
32309
|
+
const isMissingCollectionId = operation !== "create" && COLLECTION_MANAGE_OPERATIONS.has(operation) && collectionId.length === 0 && message.includes("collectionId is required");
|
|
32310
|
+
if (!isMissingCollectionId) return { message, at };
|
|
32311
|
+
return {
|
|
32312
|
+
message,
|
|
32313
|
+
code: ACTION_INPUT_REQUIRED_ERROR_CODE,
|
|
32314
|
+
at,
|
|
32315
|
+
data: {
|
|
32316
|
+
actionType: "qi/collection.lifecycle",
|
|
32317
|
+
field: "collectionId",
|
|
32318
|
+
operation
|
|
32319
|
+
}
|
|
32320
|
+
};
|
|
32321
|
+
}
|
|
32322
|
+
|
|
32323
|
+
// src/mantine/blocks/action/actionTypes/collection/CollectionLifecycleFlowDetail.tsx
|
|
32300
32324
|
var LOG = "[collection.lifecycle]";
|
|
32301
32325
|
function parseTemplateInputs(json) {
|
|
32302
32326
|
try {
|
|
@@ -32496,9 +32520,10 @@ var CollectionLifecycleFlowDetail = ({
|
|
|
32496
32520
|
}
|
|
32497
32521
|
console.log(`${LOG} refresh success`, { collectionId: payload.collectionId });
|
|
32498
32522
|
} catch (err) {
|
|
32499
|
-
const
|
|
32523
|
+
const failure = collectionLifecycleRuntimeError(err, { operation: "refresh", collectionId });
|
|
32524
|
+
const message = failure.message;
|
|
32500
32525
|
console.error(`${LOG} refresh failed`, { message });
|
|
32501
|
-
updateRuntime({ state: "failed", error:
|
|
32526
|
+
updateRuntime({ state: "failed", error: failure });
|
|
32502
32527
|
}
|
|
32503
32528
|
}, [executeAction, effectiveCollectionId, updateRuntime]);
|
|
32504
32529
|
useEffect111(() => {
|
|
@@ -32679,9 +32704,10 @@ var CollectionLifecycleFlowDetail = ({
|
|
|
32679
32704
|
}
|
|
32680
32705
|
console.log(`${LOG} execute success`, { operation: runtimeInputs.operation, collectionId: payload.collectionId, state: payload.state });
|
|
32681
32706
|
} catch (err) {
|
|
32682
|
-
const
|
|
32707
|
+
const failure = collectionLifecycleRuntimeError(err, runtimeInputs);
|
|
32708
|
+
const message = failure.message;
|
|
32683
32709
|
console.error(`${LOG} execute failed`, { operation: runtimeInputs.operation, message });
|
|
32684
|
-
updateRuntime({ state: "failed", error:
|
|
32710
|
+
updateRuntime({ state: "failed", error: failure });
|
|
32685
32711
|
}
|
|
32686
32712
|
}, [isDisabled, isRunning, executeAction, validation.ok, validation.error, operation, buildRuntimeInputs, effectiveCollectionId, updateRuntime]);
|
|
32687
32713
|
useEffect111(() => {
|
|
@@ -39116,13 +39142,18 @@ import { IconX as IconX19 } from "@tabler/icons-react";
|
|
|
39116
39142
|
import { useEffect as useEffect140, useMemo as useMemo140, useState as useState200 } from "react";
|
|
39117
39143
|
function useXeroWorkItems(editor, filter) {
|
|
39118
39144
|
const workItemsMap = editor?._yXeroWorkItems || null;
|
|
39145
|
+
const terminalMap = workItemsMap?.doc?.getMap?.(XERO_WORK_TERMINAL_MAP_NAME) || null;
|
|
39119
39146
|
const [rev, setRev] = useState200(0);
|
|
39120
39147
|
useEffect140(() => {
|
|
39121
39148
|
if (!workItemsMap?.observe) return;
|
|
39122
39149
|
const handler = () => setRev((value) => value + 1);
|
|
39123
39150
|
workItemsMap.observe(handler);
|
|
39124
|
-
|
|
39125
|
-
|
|
39151
|
+
terminalMap?.observe?.(handler);
|
|
39152
|
+
return () => {
|
|
39153
|
+
workItemsMap.unobserve(handler);
|
|
39154
|
+
terminalMap?.unobserve?.(handler);
|
|
39155
|
+
};
|
|
39156
|
+
}, [workItemsMap, terminalMap]);
|
|
39126
39157
|
return useMemo140(() => findXeroWorkItemsForEditor(editor, filter), [editor, filter.kind, filter.assignedBlockId, filter.statuses?.join("|"), rev]);
|
|
39127
39158
|
}
|
|
39128
39159
|
|
|
@@ -48116,21 +48147,6 @@ async function appendToThread(matrixClient, roomId, threadType, payload) {
|
|
|
48116
48147
|
}
|
|
48117
48148
|
});
|
|
48118
48149
|
}
|
|
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
48150
|
function logInvocation(matrixClient, roomId, invocation) {
|
|
48135
48151
|
appendToThread(matrixClient, roomId, "invocations", {
|
|
48136
48152
|
type: "invocation",
|
|
@@ -48527,15 +48543,7 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
48527
48543
|
const agentLeasesMap = useMemo176(() => yDoc.getMap("agentLeases"), [yDoc]);
|
|
48528
48544
|
const xeroWorkItemsMap = useMemo176(() => yDoc.getMap("xeroWorkItems"), [yDoc]);
|
|
48529
48545
|
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]);
|
|
48546
|
+
const ucanDelegationStore = useMemo176(() => createUcanDelegationStore(delegationsMap), [delegationsMap]);
|
|
48539
48547
|
const invocationStore = useMemo176(() => {
|
|
48540
48548
|
const store = createInvocationStore(invocationsMap);
|
|
48541
48549
|
const originalAdd = store.add;
|
|
@@ -48672,7 +48680,6 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
48672
48680
|
}
|
|
48673
48681
|
if (delegation.cid) {
|
|
48674
48682
|
ucanDelegationStore.set(delegation);
|
|
48675
|
-
logDelegation(matrixClient, options.roomId, delegation);
|
|
48676
48683
|
} else if (delegation.id) {
|
|
48677
48684
|
const stored = {
|
|
48678
48685
|
cid: delegation.id,
|
|
@@ -48686,7 +48693,6 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
48686
48693
|
proofCids: delegation.proofs || []
|
|
48687
48694
|
};
|
|
48688
48695
|
ucanDelegationStore.set(stored);
|
|
48689
|
-
logDelegation(matrixClient, options.roomId, stored);
|
|
48690
48696
|
}
|
|
48691
48697
|
};
|
|
48692
48698
|
ixoEditor.getRootCapability = () => {
|
|
@@ -51524,4 +51530,4 @@ export {
|
|
|
51524
51530
|
ixoGraphQLClient,
|
|
51525
51531
|
getEntity
|
|
51526
51532
|
};
|
|
51527
|
-
//# sourceMappingURL=chunk-
|
|
51533
|
+
//# sourceMappingURL=chunk-MR37B67W.js.map
|