@ai-matrx/records-ui 0.113.33 → 0.113.34

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.
@@ -149,7 +149,12 @@ interface HeldChangeDecisionProps {
149
149
  approvalId: Uuid;
150
150
  /** Told once the store took the decision; `approved` says which way. */
151
151
  onDecided: (approved: boolean) => void;
152
+ /**
153
+ * What approving does next, in the button's words. Default "Approve"; a host whose approval also
154
+ * moves something on says so — a paused workflow run passes "Approve and continue".
155
+ */
156
+ approveLabel?: string;
152
157
  }
153
- declare function HeldChangeDecision({ dataSource, userId, organizationId, approvalId, onDecided }: HeldChangeDecisionProps): react.JSX.Element;
158
+ declare function HeldChangeDecision({ dataSource, userId, organizationId, approvalId, onDecided, approveLabel }: HeldChangeDecisionProps): react.JSX.Element;
154
159
 
155
160
  export { ColumnValuesEditor, type ColumnValuesEditorProps, ColumnValuesText, DATA_BINDING_MISSING, DATA_BINDING_SHAPES, type DataBinding, DataBindingPicker, type DataBindingPickerProps, type DataBindingShape, HeldChangeDecision, type HeldChangeDecisionProps, RecordNameText, RecordPicker, type RecordPickerProps, type TableAnywhere, TableNameText, TablePicker, type TablePickerProps, TableScope, type TableScopeProps, type TablesAnywhere, bindingPlaceholdersFor, defaultBindingTemplate, emptyDataBinding, isCompleteDataBinding, isDataBinding, useTablesAnywhere };
package/dist/pickers.d.ts CHANGED
@@ -149,7 +149,12 @@ interface HeldChangeDecisionProps {
149
149
  approvalId: Uuid;
150
150
  /** Told once the store took the decision; `approved` says which way. */
151
151
  onDecided: (approved: boolean) => void;
152
+ /**
153
+ * What approving does next, in the button's words. Default "Approve"; a host whose approval also
154
+ * moves something on says so — a paused workflow run passes "Approve and continue".
155
+ */
156
+ approveLabel?: string;
152
157
  }
153
- declare function HeldChangeDecision({ dataSource, userId, organizationId, approvalId, onDecided }: HeldChangeDecisionProps): react.JSX.Element;
158
+ declare function HeldChangeDecision({ dataSource, userId, organizationId, approvalId, onDecided, approveLabel }: HeldChangeDecisionProps): react.JSX.Element;
154
159
 
155
160
  export { ColumnValuesEditor, type ColumnValuesEditorProps, ColumnValuesText, DATA_BINDING_MISSING, DATA_BINDING_SHAPES, type DataBinding, DataBindingPicker, type DataBindingPickerProps, type DataBindingShape, HeldChangeDecision, type HeldChangeDecisionProps, RecordNameText, RecordPicker, type RecordPickerProps, type TableAnywhere, TableNameText, TablePicker, type TablePickerProps, TableScope, type TableScopeProps, type TablesAnywhere, bindingPlaceholdersFor, defaultBindingTemplate, emptyDataBinding, isCompleteDataBinding, isDataBinding, useTablesAnywhere };
package/dist/pickers.js CHANGED
@@ -9304,10 +9304,14 @@ import { useEffect as useEffect24, useState as useState31 } from "react";
9304
9304
  import { RecordsProvider as RecordsProvider3, useRecordsClient as useRecordsClient10 } from "@ai-matrx/records/react";
9305
9305
  import { Button as Button19 } from "@ai-matrx/design-system";
9306
9306
  import { jsx as jsx42, jsxs as jsxs39 } from "react/jsx-runtime";
9307
- function HeldChangeDecision({ dataSource, userId, organizationId, approvalId, onDecided }) {
9308
- return /* @__PURE__ */ jsx42(RecordsProvider3, { config: { dataSource, actor: personActor(userId), organizationId }, children: /* @__PURE__ */ jsx42(Decision, { approvalId, onDecided }) });
9307
+ function HeldChangeDecision({ dataSource, userId, organizationId, approvalId, onDecided, approveLabel }) {
9308
+ return /* @__PURE__ */ jsx42(RecordsProvider3, { config: { dataSource, actor: personActor(userId), organizationId }, children: /* @__PURE__ */ jsx42(Decision, { approvalId, onDecided, approveLabel: approveLabel ?? "Approve" }) });
9309
9309
  }
9310
- function Decision({ approvalId, onDecided }) {
9310
+ function Decision({
9311
+ approvalId,
9312
+ onDecided,
9313
+ approveLabel
9314
+ }) {
9311
9315
  const client = useRecordsClient10();
9312
9316
  const [may, setMay] = useState31(null);
9313
9317
  const [busy, setBusy] = useState31(null);
@@ -9337,7 +9341,7 @@ function Decision({ approvalId, onDecided }) {
9337
9341
  if (may === null) return /* @__PURE__ */ jsx42("p", { className: "text-xs text-muted-foreground", children: "Checking who can decide\u2026" });
9338
9342
  return /* @__PURE__ */ jsxs39("div", { className: "flex flex-col gap-1.5", children: [
9339
9343
  may ? /* @__PURE__ */ jsxs39("div", { className: "flex gap-2", children: [
9340
- /* @__PURE__ */ jsx42(Button19, { type: "button", size: "sm", disabled: busy !== null, onClick: () => void decide(true), children: busy === "approve" ? "Approving\u2026" : "Approve" }),
9344
+ /* @__PURE__ */ jsx42(Button19, { type: "button", size: "sm", disabled: busy !== null, onClick: () => void decide(true), children: busy === "approve" ? "Approving\u2026" : approveLabel }),
9341
9345
  /* @__PURE__ */ jsx42(Button19, { type: "button", size: "sm", variant: "outline", disabled: busy !== null, onClick: () => void decide(false), children: busy === "refuse" ? "Refusing\u2026" : "Refuse" })
9342
9346
  ] }) : !error && /* @__PURE__ */ jsx42("p", { className: "text-xs text-muted-foreground", children: "An owner or admin of this organization decides this." }),
9343
9347
  error ? /* @__PURE__ */ jsx42(RefusalLine, { error }) : null