@mindbill/react 0.42.1 → 0.42.3
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/index.js +6 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3004,13 +3004,7 @@ function BillSubmissionForm({
|
|
|
3004
3004
|
] }) : /* @__PURE__ */ jsx5("small", { className: "mbsf-help", children: "Search the directory and choose a claims administrator." })
|
|
3005
3005
|
] }),
|
|
3006
3006
|
administrator?.payerSelectionRequired ? /* @__PURE__ */ jsxs5(Field2, { path: "claim.claimsAdministrator.payerId", label: "Payer", required: true, span: true, error: subpayorError, children: [
|
|
3007
|
-
subpayorOptions.length ? /* @__PURE__ */ jsx5(ComboBox, { ariaLabel: "Payer", invalid: Boolean(subpayorError), disabled: locked, value: selectedSubpayor?.label ?? "", placeholder: "Select the payer named on the claim or report\u2026", options: subpayorOptions.map((option) => {
|
|
3008
|
-
const identifiers = Object.entries(option.clearinghousePayerIds ?? {}).map(([name, id]) => `${name.replace(/_/g, " ")} ${id}`);
|
|
3009
|
-
const sourceRoute = option.sourceClearinghouse && option.sourcePayerId ? `Catalog: ${option.sourceClearinghouse} ${option.sourcePayerId}` : "";
|
|
3010
|
-
const detail = [option.aliases?.length ? `Also known as ${option.aliases.join(", ")}` : "", option.hint ?? "", sourceRoute].filter(Boolean).join(" \xB7 ");
|
|
3011
|
-
const badges = [option.optionType ? `Type: ${option.optionType}` : "", option.deliveryType ? `Delivery: ${option.deliveryType}` : "", option.clearinghouse && option.payerId ? `Delivered via ${option.clearinghouse} ${option.payerId}` : "", ...identifiers, option.preferredClearinghouse ? `Preferred: ${option.preferredClearinghouse}` : "", option.default ? "Directory default" : ""].filter(Boolean);
|
|
3012
|
-
return { id: option.id, label: option.label, ...detail ? { detail } : {}, ...badges.length ? { badges } : {}, ...option.affiliatedEntities?.length ? { affiliatedEntities: option.affiliatedEntities } : {}, ...option.route ? { trailing: option.route } : {} };
|
|
3013
|
-
}), onSelect: (option) => chooseSubpayor(option.id) }) : /* @__PURE__ */ jsxs5("div", { className: "mbsf-error", role: "alert", children: [
|
|
3007
|
+
subpayorOptions.length ? /* @__PURE__ */ jsx5(ComboBox, { ariaLabel: "Payer", invalid: Boolean(subpayorError), disabled: locked, value: selectedSubpayor?.label ?? "", placeholder: "Select the payer named on the claim or report\u2026", options: subpayorOptions.map((option) => ({ id: option.id, label: option.label, ...option.hint ? { detail: option.hint } : {}, ...option.affiliatedEntities?.length ? { affiliatedEntities: option.affiliatedEntities } : {} })), onSelect: (option) => chooseSubpayor(option.id) }) : /* @__PURE__ */ jsxs5("div", { className: "mbsf-error", role: "alert", children: [
|
|
3014
3008
|
"No routing payers are available for ",
|
|
3015
3009
|
administrator.name,
|
|
3016
3010
|
". Electronic submission remains blocked; contact support to correct the payer directory."
|
|
@@ -3018,8 +3012,7 @@ function BillSubmissionForm({
|
|
|
3018
3012
|
selectedSubpayor ? /* @__PURE__ */ jsxs5("div", { className: "mbsf-payer-status", role: "status", children: [
|
|
3019
3013
|
/* @__PURE__ */ jsx5("strong", { children: "\u2713 Payer set:" }),
|
|
3020
3014
|
" ",
|
|
3021
|
-
selectedSubpayor.label
|
|
3022
|
-
selectedSubpayor.route ? ` \xB7 ${selectedSubpayor.route}` : ""
|
|
3015
|
+
selectedSubpayor.label
|
|
3023
3016
|
] }) : /* @__PURE__ */ jsxs5("small", { className: "mbsf-help", children: [
|
|
3024
3017
|
administrator.name,
|
|
3025
3018
|
" administers multiple payers. Choose the payer named on the claim or report so MindBill can route the bill correctly."
|
|
@@ -5400,16 +5393,18 @@ function useBillLifecycle({
|
|
|
5400
5393
|
}
|
|
5401
5394
|
function LifecycleDialog({ children, title, wide = false, onClose }) {
|
|
5402
5395
|
const dialog = useRef5(null);
|
|
5396
|
+
const onCloseRef = useRef5(onClose);
|
|
5397
|
+
onCloseRef.current = onClose;
|
|
5403
5398
|
useEffect9(() => {
|
|
5404
5399
|
const previous = document.activeElement;
|
|
5405
5400
|
dialog.current?.focus();
|
|
5406
|
-
const onKeyDown = (event) => event.key === "Escape" &&
|
|
5401
|
+
const onKeyDown = (event) => event.key === "Escape" && onCloseRef.current();
|
|
5407
5402
|
document.addEventListener("keydown", onKeyDown);
|
|
5408
5403
|
return () => {
|
|
5409
5404
|
document.removeEventListener("keydown", onKeyDown);
|
|
5410
5405
|
previous?.focus();
|
|
5411
5406
|
};
|
|
5412
|
-
}, [
|
|
5407
|
+
}, []);
|
|
5413
5408
|
return /* @__PURE__ */ jsx14("div", { className: "mb-lifecycle-dialog-backdrop", onMouseDown: (event) => event.currentTarget === event.target && onClose(), children: /* @__PURE__ */ jsxs14("div", { ref: dialog, className: ["mb-lifecycle-dialog", wide ? "wide" : ""].filter(Boolean).join(" "), role: "dialog", "aria-modal": "true", "aria-label": title, tabIndex: -1, children: [
|
|
5414
5409
|
/* @__PURE__ */ jsx14("button", { type: "button", className: "mb-lifecycle-dialog-close", "aria-label": "Close", onClick: onClose, children: "\xD7" }),
|
|
5415
5410
|
children
|