@ixo/editor 6.11.0 → 6.12.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.
@@ -10,7 +10,7 @@ import {
10
10
  replaceBlockInFragment,
11
11
  swapBlocksInFragment,
12
12
  writeCompiledBlocksToFragment
13
- } from "./chunk-X6UITQBG.js";
13
+ } from "./chunk-ESPPJONO.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-56BFOMU6.js.map
260
+ //# sourceMappingURL=chunk-ID2Q6WO4.js.map
@@ -74,7 +74,7 @@ import {
74
74
  verifyCompletion,
75
75
  warnOnce,
76
76
  writeRunRecordAndReconcile
77
- } from "./chunk-X6UITQBG.js";
77
+ } from "./chunk-ESPPJONO.js";
78
78
 
79
79
  // src/mantine/hooks/usePanel.ts
80
80
  import { useCallback, useMemo, useEffect, useRef } from "react";
@@ -30163,12 +30163,13 @@ var buildPodOptions = (groups) => {
30163
30163
  label: (labelCounts.get(label) ?? 0) > 1 ? `${label} (${shortPodAddress(group.coreAddress)})` : label
30164
30164
  }));
30165
30165
  };
30166
- var ActAsGroupSection = ({ value, onChange, isDisabled, actionLabel }) => {
30166
+ var ActAsGroupSection = ({ value, onChange, isDisabled, actionLabel, authzFilter }) => {
30167
30167
  const handlers = useBlocknoteHandlers();
30168
30168
  const handlersRef = useRef35(handlers);
30169
30169
  handlersRef.current = handlers;
30170
30170
  const [groups, setGroups] = useState155([]);
30171
30171
  const [loading, setLoading] = useState155(false);
30172
+ const authzFilterKey = JSON.stringify(authzFilter ?? null);
30172
30173
  useEffect103(() => {
30173
30174
  let cancelled = false;
30174
30175
  const load = async () => {
@@ -30176,7 +30177,8 @@ var ActAsGroupSection = ({ value, onChange, isDisabled, actionLabel }) => {
30176
30177
  if (!h?.getDAOGroups) return;
30177
30178
  setLoading(true);
30178
30179
  try {
30179
- const res = await h.getDAOGroups();
30180
+ const filter = authzFilterKey === "null" ? void 0 : JSON.parse(authzFilterKey);
30181
+ const res = await h.getDAOGroups(filter);
30180
30182
  if (!cancelled) setGroups(res || []);
30181
30183
  } catch (error) {
30182
30184
  console.warn("[act-as-group] getDAOGroups failed", error);
@@ -30188,7 +30190,7 @@ var ActAsGroupSection = ({ value, onChange, isDisabled, actionLabel }) => {
30188
30190
  return () => {
30189
30191
  cancelled = true;
30190
30192
  };
30191
- }, []);
30193
+ }, [authzFilterKey]);
30192
30194
  const podOptions = useMemo109(() => buildPodOptions(groups), [groups]);
30193
30195
  const available = groups.length > 0 && typeof handlers?.createGroupExecutionProposal === "function";
30194
30196
  if (!available) return null;
@@ -32069,7 +32071,7 @@ var ClaimFlowDetail = ({
32069
32071
  defaultValue: `By ${truncateAddress3(disputeDetails.evaluatorDid)}`
32070
32072
  }) : "", disputeDetails.evaluatorDid && disputeDetails.disputedAt ? " \xB7 " : "", disputeDetails.disputedAt ? new Date(disputeDetails.disputedAt).toLocaleString() : ""), /* @__PURE__ */ React312.createElement(BasePrimaryButton, { onClick: amendAndResubmit, disabled: isDisabled || submitting || !isServiceAgentAuthorized || !selectedClaimData }, t("actionTypes.claim.flow.disputed.amendAndResubmit", { defaultValue: "Amend & Resubmit" }))) : typeof handlers.getClaimDisputeDetails !== "function" ? /* @__PURE__ */ React312.createElement(Text193, { size: "xs", c: "dimmed" }, t("actionTypes.claim.flow.disputed.unavailable", { defaultValue: "Dispute details unavailable in this environment." })) : /* @__PURE__ */ React312.createElement(Text193, { size: "xs", c: "dimmed" }, t("actionTypes.claim.flow.disputed.noRecord", { defaultValue: "No dispute record found on-chain for this claim." }))), loadingClaimDetail ? /* @__PURE__ */ React312.createElement(Group110, { gap: "xs" }, /* @__PURE__ */ React312.createElement(Loader57, { size: "xs" }), /* @__PURE__ */ React312.createElement(Text193, { size: "xs", c: "dimmed" }, t("actionTypes.claim.flow.loadingSubmission", { defaultValue: "Loading submission\u2026" }))) : detailSurveyModel ? /* @__PURE__ */ React312.createElement(StableSurvey, { model: detailSurveyModel }) : /* @__PURE__ */ React312.createElement(Text193, { size: "xs", c: "dimmed" }, t("actionTypes.claim.flow.noSubmissionData", { defaultValue: "No submission data available." })), error && /* @__PURE__ */ React312.createElement(DismissibleAlert, { color: "red", styles: actionAlertStyles }, error));
32071
32073
  }
32072
- return /* @__PURE__ */ React312.createElement(Stack205, { gap: "md" }, /* @__PURE__ */ React312.createElement(GroupProposalStatus, { editor, block, runtime }), runtime?.state !== "awaiting_readback" && /* @__PURE__ */ React312.createElement(ActAsGroupSection, { value: actAs, onChange: setActAs, isDisabled, actionLabel: "submit this claim" }), !deedDid || !collectionId ? /* @__PURE__ */ React312.createElement(DismissibleAlert, { color: "yellow", styles: actionAlertStyles }, t("actionTypes.shared.errors.configRequired", {
32074
+ return /* @__PURE__ */ React312.createElement(Stack205, { gap: "md" }, /* @__PURE__ */ React312.createElement(GroupProposalStatus, { editor, block, runtime }), runtime?.state !== "awaiting_readback" && /* @__PURE__ */ React312.createElement(ActAsGroupSection, { value: actAs, onChange: setActAs, isDisabled, actionLabel: "submit this claim", authzFilter: collectionId ? { requiresAuthz: "submitClaim", collectionId } : void 0 }), !deedDid || !collectionId ? /* @__PURE__ */ React312.createElement(DismissibleAlert, { color: "yellow", styles: actionAlertStyles }, t("actionTypes.shared.errors.configRequired", {
32073
32075
  defaultValue: "Configure {{did}} and {{claimCollection}} in template mode before running this action.",
32074
32076
  did: "DID",
32075
32077
  claimCollection: "claim collection"
@@ -35312,7 +35314,7 @@ var EvaluateClaimFlowDetail = ({
35312
35314
  { value: "rejected", label: t("actionTypes.evaluateClaim.flow.filter.rejected", { defaultValue: "Rejected" }) },
35313
35315
  { value: "disputed", label: t("actionTypes.evaluateClaim.flow.filter.disputed", { defaultValue: "Disputed" }) }
35314
35316
  ];
35315
- return /* @__PURE__ */ React321.createElement(Stack214, { gap: "md" }, /* @__PURE__ */ React321.createElement(GroupProposalStatus, { editor, block, runtime }), runtime?.state !== "awaiting_readback" && /* @__PURE__ */ React321.createElement(ActAsGroupSection, { value: actAs, onChange: setActAs, isDisabled, actionLabel: "evaluate this claim" }), !deedDid || !collectionId ? /* @__PURE__ */ React321.createElement(DismissibleAlert, { color: "yellow", styles: actionAlertStyles }, t("actionTypes.shared.errors.configRequired", {
35317
+ return /* @__PURE__ */ React321.createElement(Stack214, { gap: "md" }, /* @__PURE__ */ React321.createElement(GroupProposalStatus, { editor, block, runtime }), runtime?.state !== "awaiting_readback" && /* @__PURE__ */ React321.createElement(ActAsGroupSection, { value: actAs, onChange: setActAs, isDisabled, actionLabel: "evaluate this claim", authzFilter: collectionId ? { requiresAuthz: "evaluateClaim", collectionId } : void 0 }), !deedDid || !collectionId ? /* @__PURE__ */ React321.createElement(DismissibleAlert, { color: "yellow", styles: actionAlertStyles }, t("actionTypes.shared.errors.configRequired", {
35316
35318
  defaultValue: "Configure {{did}} and {{claimCollection}} in template mode before running this action.",
35317
35319
  did: "DID",
35318
35320
  claimCollection: "claim collection"
@@ -51479,4 +51481,4 @@ export {
51479
51481
  ixoGraphQLClient,
51480
51482
  getEntity
51481
51483
  };
51482
- //# sourceMappingURL=chunk-Q64NK5GA.js.map
51484
+ //# sourceMappingURL=chunk-KJ4CZ6K6.js.map