@ai-matrx/records-ui 0.113.33 → 0.113.35

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/pickers.cjs CHANGED
@@ -9225,10 +9225,14 @@ var import_react62 = require("react");
9225
9225
  var import_react63 = require("@ai-matrx/records/react");
9226
9226
  var import_design_system36 = require("@ai-matrx/design-system");
9227
9227
  var import_jsx_runtime42 = require("react/jsx-runtime");
9228
- function HeldChangeDecision({ dataSource, userId, organizationId, approvalId, onDecided }) {
9229
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react63.RecordsProvider, { config: { dataSource, actor: personActor(userId), organizationId }, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Decision, { approvalId, onDecided }) });
9228
+ function HeldChangeDecision({ dataSource, userId, organizationId, approvalId, onDecided, approveLabel }) {
9229
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react63.RecordsProvider, { config: { dataSource, actor: personActor(userId), organizationId }, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Decision, { approvalId, onDecided, approveLabel: approveLabel ?? "Approve" }) });
9230
9230
  }
9231
- function Decision({ approvalId, onDecided }) {
9231
+ function Decision({
9232
+ approvalId,
9233
+ onDecided,
9234
+ approveLabel
9235
+ }) {
9232
9236
  const client = (0, import_react63.useRecordsClient)();
9233
9237
  const [may, setMay] = (0, import_react62.useState)(null);
9234
9238
  const [busy, setBusy] = (0, import_react62.useState)(null);
@@ -9258,7 +9262,7 @@ function Decision({ approvalId, onDecided }) {
9258
9262
  if (may === null) return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "text-xs text-muted-foreground", children: "Checking who can decide\u2026" });
9259
9263
  return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
9260
9264
  may ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex gap-2", children: [
9261
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_design_system36.Button, { type: "button", size: "sm", disabled: busy !== null, onClick: () => void decide(true), children: busy === "approve" ? "Approving\u2026" : "Approve" }),
9265
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_design_system36.Button, { type: "button", size: "sm", disabled: busy !== null, onClick: () => void decide(true), children: busy === "approve" ? "Approving\u2026" : approveLabel }),
9262
9266
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_design_system36.Button, { type: "button", size: "sm", variant: "outline", disabled: busy !== null, onClick: () => void decide(false), children: busy === "refuse" ? "Refusing\u2026" : "Refuse" })
9263
9267
  ] }) : !error && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "text-xs text-muted-foreground", children: "An owner or admin of this organization decides this." }),
9264
9268
  error ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(RefusalLine, { error }) : null