@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.
- package/CHANGELOG.md +13 -0
- package/dist/index.cjs +8 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -4
- package/dist/index.js.map +1 -1
- package/dist/pickers.cjs +8 -4
- package/dist/pickers.cjs.map +1 -1
- package/dist/pickers.d.cts +6 -1
- package/dist/pickers.d.ts +6 -1
- package/dist/pickers.js +8 -4
- package/dist/pickers.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -50893,10 +50893,14 @@ import { useEffect as useEffect120, useState as useState140 } from "react";
|
|
|
50893
50893
|
import { RecordsProvider as RecordsProvider3, useRecordsClient as useRecordsClient100 } from "@ai-matrx/records/react";
|
|
50894
50894
|
import { Button as Button113 } from "@ai-matrx/design-system";
|
|
50895
50895
|
import { jsx as jsx168, jsxs as jsxs156 } from "react/jsx-runtime";
|
|
50896
|
-
function HeldChangeDecision({ dataSource, userId, organizationId, approvalId, onDecided }) {
|
|
50897
|
-
return /* @__PURE__ */ jsx168(RecordsProvider3, { config: { dataSource, actor: personActor(userId), organizationId }, children: /* @__PURE__ */ jsx168(Decision, { approvalId, onDecided }) });
|
|
50896
|
+
function HeldChangeDecision({ dataSource, userId, organizationId, approvalId, onDecided, approveLabel }) {
|
|
50897
|
+
return /* @__PURE__ */ jsx168(RecordsProvider3, { config: { dataSource, actor: personActor(userId), organizationId }, children: /* @__PURE__ */ jsx168(Decision, { approvalId, onDecided, approveLabel: approveLabel ?? "Approve" }) });
|
|
50898
50898
|
}
|
|
50899
|
-
function Decision({
|
|
50899
|
+
function Decision({
|
|
50900
|
+
approvalId,
|
|
50901
|
+
onDecided,
|
|
50902
|
+
approveLabel
|
|
50903
|
+
}) {
|
|
50900
50904
|
const client = useRecordsClient100();
|
|
50901
50905
|
const [may, setMay] = useState140(null);
|
|
50902
50906
|
const [busy, setBusy] = useState140(null);
|
|
@@ -50926,7 +50930,7 @@ function Decision({ approvalId, onDecided }) {
|
|
|
50926
50930
|
if (may === null) return /* @__PURE__ */ jsx168("p", { className: "text-xs text-muted-foreground", children: "Checking who can decide\u2026" });
|
|
50927
50931
|
return /* @__PURE__ */ jsxs156("div", { className: "flex flex-col gap-1.5", children: [
|
|
50928
50932
|
may ? /* @__PURE__ */ jsxs156("div", { className: "flex gap-2", children: [
|
|
50929
|
-
/* @__PURE__ */ jsx168(Button113, { type: "button", size: "sm", disabled: busy !== null, onClick: () => void decide(true), children: busy === "approve" ? "Approving\u2026" :
|
|
50933
|
+
/* @__PURE__ */ jsx168(Button113, { type: "button", size: "sm", disabled: busy !== null, onClick: () => void decide(true), children: busy === "approve" ? "Approving\u2026" : approveLabel }),
|
|
50930
50934
|
/* @__PURE__ */ jsx168(Button113, { type: "button", size: "sm", variant: "outline", disabled: busy !== null, onClick: () => void decide(false), children: busy === "refuse" ? "Refusing\u2026" : "Refuse" })
|
|
50931
50935
|
] }) : !error && /* @__PURE__ */ jsx168("p", { className: "text-xs text-muted-foreground", children: "An owner or admin of this organization decides this." }),
|
|
50932
50936
|
error ? /* @__PURE__ */ jsx168(RefusalLine, { error }) : null
|