@ixo/editor 6.12.0 → 6.14.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.
@@ -14,11 +14,13 @@ import {
14
14
  buildServicesFromHandlers,
15
15
  buildVerifiableCredential,
16
16
  buildXeroPaymentWorkKey,
17
+ countSuccessfulRuns,
17
18
  createInvocationStore,
18
19
  createReference,
19
20
  createRuntimeStateManager,
20
21
  createUcanDelegationStore,
21
22
  createUcanService,
23
+ deriveBlockPhase,
22
24
  executeActionBlock,
23
25
  extractDid,
24
26
  extractSurveyAnswerSchema,
@@ -74,7 +76,7 @@ import {
74
76
  verifyCompletion,
75
77
  warnOnce,
76
78
  writeRunRecordAndReconcile
77
- } from "./chunk-ESPPJONO.js";
79
+ } from "./chunk-LMHIE6UG.js";
78
80
 
79
81
  // src/mantine/hooks/usePanel.ts
80
82
  import { useCallback, useMemo, useEffect, useRef } from "react";
@@ -5806,8 +5808,23 @@ function buildSurveyTheme() {
5806
5808
  "--sjs-special-yellow": "rgba(255, 152, 20, 1)",
5807
5809
  "--sjs-special-yellow-light": "rgba(255, 152, 20, 0.1)",
5808
5810
  "--sjs-special-yellow-forecolor": "var(--mantine-color-body)",
5809
- "--sjs-font-family": "inherit",
5810
- "--sjs-font-surveytitle-family": "inherit"
5811
+ // ── Typography (follow Mantine at every SurveyJS layer) ──
5812
+ "--sjs-font-family": "var(--mantine-font-family)",
5813
+ "--sjs-font-editorfont-family": "var(--mantine-font-family)",
5814
+ "--sjs-font-questiontitle-family": "var(--mantine-font-family)",
5815
+ "--sjs-font-questiondescription-family": "var(--mantine-font-family)",
5816
+ "--sjs-font-pagetitle-family": "var(--mantine-font-family)",
5817
+ "--sjs-font-pagedescription-family": "var(--mantine-font-family)",
5818
+ "--sjs-font-surveytitle-family": "var(--mantine-font-family)",
5819
+ "--sjs-font-surveydescription-family": "var(--mantine-font-family)",
5820
+ "--sjs-font-size": "var(--mantine-font-size-md)",
5821
+ "--sjs-font-editorfont-size": "var(--mantine-font-size-md)",
5822
+ "--sjs-font-questiontitle-size": "var(--mantine-font-size-md)",
5823
+ "--sjs-font-questiondescription-size": "var(--mantine-font-size-sm)",
5824
+ "--sjs-font-pagetitle-size": "var(--mantine-h4-font-size)",
5825
+ "--sjs-font-pagedescription-size": "var(--mantine-font-size-sm)",
5826
+ "--sjs-font-surveytitle-size": "var(--mantine-h4-font-size)",
5827
+ "--sjs-font-surveydescription-size": "var(--mantine-font-size-sm)"
5811
5828
  },
5812
5829
  themeName: "ixoUnified",
5813
5830
  colorPalette: "light",
@@ -24052,30 +24069,49 @@ function NeedsVerificationAlert({ editor, block }) {
24052
24069
  }
24053
24070
 
24054
24071
  // src/mantine/blocks/action/flow/FlowView.tsx
24055
- var getStatusLabel4 = (runtimeState, t) => {
24056
- switch (runtimeState) {
24072
+ var getStatusLabel4 = (derived, t) => {
24073
+ switch (derived.detail) {
24057
24074
  case "running":
24058
24075
  return t("actionBlock.status.inProgress", { defaultValue: "In Progress" });
24076
+ case "awaiting_readback":
24077
+ return t("actionBlock.status.awaitingConfirmation", { defaultValue: "Awaiting Confirmation" });
24078
+ case "queued":
24079
+ return t("actionBlock.status.active", { defaultValue: "Active" });
24080
+ case "standing": {
24081
+ const active = t("actionBlock.status.active", { defaultValue: "Active" });
24082
+ if (!derived.runCount) return active;
24083
+ const runsWord = derived.runCount === 1 ? t("actionBlock.status.run", { defaultValue: "run" }) : t("actionBlock.status.runs", { defaultValue: "runs" });
24084
+ return `${active} \xB7 ${derived.runCount} ${runsWord}`;
24085
+ }
24059
24086
  case "completed":
24087
+ case "cancelled":
24060
24088
  return t("actionBlock.status.completed", { defaultValue: "Completed" });
24061
24089
  case "failed":
24062
24090
  return t("actionBlock.status.failed", { defaultValue: "Failed" });
24063
24091
  case "needs_verification":
24064
24092
  return t("actionBlock.status.needsVerification", { defaultValue: "Needs verification" });
24093
+ case "unverified":
24094
+ return t("actionBlock.status.unverified", { defaultValue: "Unverified" });
24065
24095
  default:
24066
24096
  return t("actionBlock.status.pending", { defaultValue: "Pending" });
24067
24097
  }
24068
24098
  };
24069
- var getStatusColor4 = (runtimeState) => {
24070
- switch (runtimeState) {
24099
+ var getStatusColor4 = (derived) => {
24100
+ switch (derived.detail) {
24071
24101
  case "running":
24102
+ case "awaiting_readback":
24103
+ case "queued":
24072
24104
  return "blue";
24105
+ case "standing":
24073
24106
  case "completed":
24107
+ case "cancelled":
24074
24108
  return "green.5";
24075
24109
  case "failed":
24076
24110
  return "red";
24077
24111
  case "needs_verification":
24078
24112
  return "orange";
24113
+ case "unverified":
24114
+ return "yellow";
24079
24115
  default:
24080
24116
  return void 0;
24081
24117
  }
@@ -24087,7 +24123,6 @@ var ActionFlowView = ({ editor, block, isDisabled }) => {
24087
24123
  const panelId = `action-flow-panel-${block.id}`;
24088
24124
  const { closePanel, activePanel } = usePanelStore();
24089
24125
  const actionType = block.props.actionType || "";
24090
- const runtimeState = runtime.state || "";
24091
24126
  const completionVerification = useMemo93(
24092
24127
  () => verifyCompletion({
24093
24128
  runtime,
@@ -24098,9 +24133,17 @@ var ActionFlowView = ({ editor, block, isDisabled }) => {
24098
24133
  }),
24099
24134
  [runtime, block.id, actionType, editor]
24100
24135
  );
24101
- const isUnverifiedCompletion = completionVerification.status === "unverified";
24102
- const statusLabel = isUnverifiedCompletion ? t("actionBlock.status.unverified", { defaultValue: "Unverified" }) : getStatusLabel4(runtimeState, t);
24103
- const statusColor3 = isUnverifiedCompletion ? "yellow" : getStatusColor4(runtimeState);
24136
+ const derivedState = useMemo93(() => {
24137
+ const yDoc = editor?._yDoc;
24138
+ return deriveBlockPhase({
24139
+ runtime,
24140
+ actionType,
24141
+ completionVerification,
24142
+ runCount: yDoc ? countSuccessfulRuns(yDoc, block.id) : void 0
24143
+ });
24144
+ }, [runtime, actionType, completionVerification, editor, block.id]);
24145
+ const statusLabel = getStatusLabel4(derivedState, t);
24146
+ const statusColor3 = getStatusColor4(derivedState);
24104
24147
  const configIssues = useMemo93(() => validateBlockConfig(block), [block?.props?.inputs, block?.props?.trigger, block?.props?.assignment, block?.props?.conditions]);
24105
24148
  const dueDate = block.props.ttlAbsoluteDueDate;
24106
24149
  const dueDateDisplay = dueDate ? formatDate(dueDate) : "";
@@ -51481,4 +51524,4 @@ export {
51481
51524
  ixoGraphQLClient,
51482
51525
  getEntity
51483
51526
  };
51484
- //# sourceMappingURL=chunk-KJ4CZ6K6.js.map
51527
+ //# sourceMappingURL=chunk-UZQSAYAK.js.map