@mindbill/react 0.31.2 → 0.32.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.
- package/README.md +18 -1
- package/dist/index.d.ts +23 -3
- package/dist/index.js +164 -46
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -95,7 +95,24 @@ import { BillReadOnlyForm } from "@mindbill/react";
|
|
|
95
95
|
|
|
96
96
|
`ConnectedBillLifecycle` composes this component with the Details / Bill history switch, so most partners should not assemble these pieces themselves.
|
|
97
97
|
|
|
98
|
-
`BillRejectionNotice` is also exported for custom lifecycle layouts. It
|
|
98
|
+
`BillRejectionNotice` is also exported for custom lifecycle layouts. It presents every API-provided rejection issue in order, keeps technical acknowledgement codes alongside the actionable descriptions, and shows when the bill was sent and rejected. The connected lifecycle includes it automatically whenever the current state is `rejected`.
|
|
99
|
+
|
|
100
|
+
```tsx
|
|
101
|
+
<BillRejectionNotice
|
|
102
|
+
submittedAt="2026-08-31T17:24:00.000Z"
|
|
103
|
+
rejection={{
|
|
104
|
+
reason: "Correct the submitted dates.",
|
|
105
|
+
source: "Jopari",
|
|
106
|
+
receivedAt: "2026-09-01T16:11:00.000Z",
|
|
107
|
+
issues: [
|
|
108
|
+
{ code: "A6:187", description: "From Date of Service cannot be in the future" },
|
|
109
|
+
{ code: "A6:88", description: "Thru Date of Service cannot be in the future" },
|
|
110
|
+
],
|
|
111
|
+
}}
|
|
112
|
+
/>
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
For older responses without `issues`, the component falls back to the singular `reason` and `code` fields. `appearance.dangerColor` can override the rejection color without changing the rest of the theme.
|
|
99
116
|
|
|
100
117
|
## Lifecycle actions
|
|
101
118
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MindBillAppearance, MindBillEventDetail, MindBillErrorDetail } from '@mindbill/embed';
|
|
2
2
|
export { MindBillAppearance, MindBillErrorDetail, MindBillEventDetail } from '@mindbill/embed';
|
|
3
3
|
import { CSSProperties, ReactElement, ReactNode } from 'react';
|
|
4
|
-
import { BillReviewData as BillReviewData$1, BillLifecycleDelivery, BillReviewAttachment as BillReviewAttachment$1, BrowserBillSubmissionResult, BillLifecycleSessionProvider, BillReviewPayer as BillReviewPayer$1, BrowserBillSubmissionDocument, OrganizationProfileData, BillRemittanceSummary, BillEorDocument, BillPaymentRecord, BillLifecycleAction, BillRejection, BillLifecycleData, BillLifecycleClientOptions, BillLifecycleClient } from '@mindbill/browser';
|
|
4
|
+
import { BillReviewData as BillReviewData$1, BillLifecycleDelivery, BillReviewAttachment as BillReviewAttachment$1, BrowserBillSubmissionResult, BillLifecycleSessionProvider, BillReviewPayer as BillReviewPayer$1, BrowserBillSubmissionDocument, OrganizationProfileData, BillRemittanceSummary, BillEorDocument, BillPaymentRecord, BillHistoryEntry, BillLifecycleAction, BillRejection, BillLifecycleData, BillLifecycleClientOptions, BillLifecycleClient } from '@mindbill/browser';
|
|
5
5
|
export { BillActivityRecord, BillClaimsAdministratorContact, BillClaimsAdministratorDirectory, BillClaimsAdministratorMailingAddress, BillClaimsAdministratorPattern, BillEorDocument, BillLifecycleAction, BillLifecycleActionId, BillLifecycleClient, BillLifecycleClientOptions, BillLifecycleData, BillLifecycleDelivery, BillLifecycleSession, BillLifecycleSessionProvider, BillLifecycleSessionRequest, BillPaymentRecord, BillRejection, BillRemittanceSummary, BrowserBillSubmissionResult, CloseBillInput, PostBillPaymentInput, ReopenBillInput, SubmitSecondReviewInput, createBillLifecycleClient } from '@mindbill/browser';
|
|
6
6
|
|
|
7
7
|
type MindBillThemePreset = "mindbill" | "qme-companion" | "orange-bright" | "clinical-blue" | "midnight-cyan";
|
|
@@ -853,6 +853,24 @@ type BillActivityTimelineProps = SurfaceProps & {
|
|
|
853
853
|
/** Human-readable fallback for a signed partner event type. */
|
|
854
854
|
declare function billActivityEventLabel(type: string): string;
|
|
855
855
|
declare function BillActivityTimeline({ events, emptyLabel, appearance, className, style, formatDate }: BillActivityTimelineProps): ReactElement;
|
|
856
|
+
type BillHistoryTableProps = SurfaceProps & {
|
|
857
|
+
entries: readonly BillHistoryEntry[];
|
|
858
|
+
emptyLabel?: string;
|
|
859
|
+
/** Formats the Date column. Defaults to MM/DD/YYYY. */
|
|
860
|
+
formatDate?: (iso: string) => string;
|
|
861
|
+
/** Resolve a clickable href for a submitted document; return null for plain text. */
|
|
862
|
+
documentHref?: (doc: {
|
|
863
|
+
id: string;
|
|
864
|
+
filename: string;
|
|
865
|
+
}) => string | null;
|
|
866
|
+
};
|
|
867
|
+
/**
|
|
868
|
+
* The daisyBill-style Bill History table: Date / Action / User / Details rows where
|
|
869
|
+
* submissions are pale-blue expandable rows (documents + compliance due dates), notes
|
|
870
|
+
* are pale-yellow, and 277 responses expand into decoded status-code sentences. The
|
|
871
|
+
* rows come pre-worded from the MindBill API (`BillLifecycleData.history`).
|
|
872
|
+
*/
|
|
873
|
+
declare function BillHistoryTable({ entries, emptyLabel, appearance, className, style, formatDate, documentHref }: BillHistoryTableProps): ReactElement;
|
|
856
874
|
type BillLifecycleStage = "submitted" | "accepted" | "processed" | "closed";
|
|
857
875
|
/** Maps MindBill's detailed lifecycle state into a compact progress stage. */
|
|
858
876
|
declare function billLifecycleStage(state: string): BillLifecycleStage;
|
|
@@ -868,9 +886,11 @@ declare function BillLifecycleProgress({ state, nativeStatus, submittedAt, aging
|
|
|
868
886
|
type BillRejectionNoticeProps = SurfaceProps & {
|
|
869
887
|
rejection: BillRejection;
|
|
870
888
|
title?: string;
|
|
889
|
+
submittedAt?: string | null;
|
|
890
|
+
formatDate?: (createdAt: string) => string;
|
|
871
891
|
};
|
|
872
892
|
/** A prominent, end-user-readable explanation of a rejected submission. */
|
|
873
|
-
declare function BillRejectionNotice({ rejection, title, appearance, className, style }: BillRejectionNoticeProps): ReactElement;
|
|
893
|
+
declare function BillRejectionNotice({ rejection, title, submittedAt, appearance, className, style, formatDate }: BillRejectionNoticeProps): ReactElement;
|
|
874
894
|
type BillSnapshotSummaryProps = SurfaceProps & Pick<BillLifecycleData, "bill" | "patient" | "injury" | "delivery">;
|
|
875
895
|
declare function BillSnapshotSummary({ bill, patient, injury, delivery, appearance, className, style }: BillSnapshotSummaryProps): ReactElement;
|
|
876
896
|
type BillRemittanceCardProps = SurfaceProps & {
|
|
@@ -951,4 +971,4 @@ type MindBillWidgetProps = {
|
|
|
951
971
|
declare function MindBillBillTimeline(props: MindBillWidgetProps): ReactElement;
|
|
952
972
|
declare function MindBillBillReview(props: MindBillWidgetProps): ReactElement;
|
|
953
973
|
|
|
954
|
-
export { BILL_STATUS_AGING_BUCKETS, BILL_SUBMISSION_DIAGNOSIS_QUICK_PICKS, BILL_SUBMISSION_DOCUMENT_TYPES, BILL_SUBMISSION_REPORT_TYPES, BILL_SUBMISSION_REQUIRED_FIELDS, type BillActivityEvent, BillActivityTimeline, type BillActivityTimelineProps, type BillAgingBucket, type BillAgingBucketId, BillAgingSummary, type BillAgingSummaryProps, BillExplanationOfReview, type BillExplanationOfReviewProps, BillLifecycleActions, type BillLifecycleActionsProps, BillLifecycleProgress, type BillLifecycleProgressProps, type BillLifecycleStage, BillList, type BillListProps, BillPayerContactCard, type BillPayerContactCardProps, BillPaymentLedger, type BillPaymentLedgerProps, BillReadOnlyForm, type BillReadOnlyFormProps, BillRejectionNotice, type BillRejectionNoticeProps, BillRemittanceCard, type BillRemittanceCardProps, type BillReviewAttachment, type BillReviewBillingProvider, type BillReviewClinician, type BillReviewData, type BillReviewDocumentType, type BillReviewDraft, type BillReviewFeatures, BillReviewForm, type BillReviewFormProps, type BillReviewLineItem, type BillReviewLocation, type BillReviewPayer, type BillReviewSaveInput, BillSnapshotSummary, type BillSnapshotSummaryProps, type BillStatusAction, type BillStatusAgingCell, BillStatusAgingMatrix, type BillStatusAgingMatrixData, type BillStatusAgingMatrixProps, type BillStatusAgingRow, type BillStatusClient, type BillStatusClientOptions, type BillStatusData, type BillStatusSession, type BillStatusSessionProvider, type BillStatusSessionRequest, BillStatusSummary, type BillStatusSummaryProps, BillSubmissionActions, type BillSubmissionAddress, type BillSubmissionAttachmentReportTypeMode, BillSubmissionAttachmentsSection, BillSubmissionClaimSection, type BillSubmissionDiagnosisOption, type BillSubmissionDocumentType, type BillSubmissionEvaluationType, BillSubmissionForm, type BillSubmissionFormProps, type BillSubmissionFormValue, BillSubmissionHeader, type BillSubmissionInput, type BillSubmissionModifierOption, BillSubmissionPatientSection, type BillSubmissionPostalPlace, type BillSubmissionProcedureOption, BillSubmissionProvidersSection, type BillSubmissionReportTypeOption, type BillSubmissionRoute, type BillSubmissionSectionId, BillSubmissionServiceLinesSection, type BillSubmissionSourceAttachment, type BillSubmissionTaxonomyOption, type BillSubmissionUpload, type BillSubmissionValidation, type BillingComponentProps, BillingDashboard, type BillingDashboardBill, type BillingDashboardProps, type BillingDashboardSummary, BillingReport, type BillingReportDimension, type BillingReportProps, type BillingReportRow, BillingSettings, ConnectedBillLifecycle, type ConnectedBillLifecycleProps, ConnectedBillStatus, type ConnectedBillStatusProps, DEFAULT_BILL_SUBMISSION_MODIFIERS, DEFAULT_BILL_SUBMISSION_PROCEDURES, DEFAULT_BILL_SUBMISSION_TAXONOMIES, MED_LEGAL_REPORT_TYPE_CODE, MindBillBillReview, MindBillBillTimeline, type MindBillReactAppearance, type MindBillThemePreset, type MindBillWidgetProps, OrganizationOnboarding, type OrganizationOnboardingProps, PSYCH_QME_DEFAULT_DIAGNOSIS, type UseBillLifecycleOptions, type UseBillLifecycleResult, type UseBillStatusOptions, type UseBillStatusResult, applyBillSubmissionEvaluationDiagnoses, applyBillSubmissionEvaluationModifiers, billActivityEventLabel, billAgingBucket, billAgingDays, billLifecycleDisplayLabel, billLifecycleStage, buildBillReviewSaveInput, buildBillStatusAgingCsv, buildBillStatusAgingMatrix, buildBillingReportCsv, buildBillingReportRows, calculateBillSubmissionAllowedAmount, claimsAdministratorRecommendations, createBillStatusClient, ensureTrailingBillSubmissionLine, ensureTrailingProcedureLine, exactClaimsAdministratorMatch, formatBillSubmissionDate, mindBillAppearanceStyle, mindBillThemePresets, normalizeClaimsAdministratorName, parseBillSubmissionDate, prepareBillSubmissionDocuments, resolveMindBillAppearance, summarizeBillingDashboard, useBillLifecycle, useBillStatus, validateBillSubmission, visibleBillLifecycleActions };
|
|
974
|
+
export { BILL_STATUS_AGING_BUCKETS, BILL_SUBMISSION_DIAGNOSIS_QUICK_PICKS, BILL_SUBMISSION_DOCUMENT_TYPES, BILL_SUBMISSION_REPORT_TYPES, BILL_SUBMISSION_REQUIRED_FIELDS, type BillActivityEvent, BillActivityTimeline, type BillActivityTimelineProps, type BillAgingBucket, type BillAgingBucketId, BillAgingSummary, type BillAgingSummaryProps, BillExplanationOfReview, type BillExplanationOfReviewProps, BillHistoryTable, type BillHistoryTableProps, BillLifecycleActions, type BillLifecycleActionsProps, BillLifecycleProgress, type BillLifecycleProgressProps, type BillLifecycleStage, BillList, type BillListProps, BillPayerContactCard, type BillPayerContactCardProps, BillPaymentLedger, type BillPaymentLedgerProps, BillReadOnlyForm, type BillReadOnlyFormProps, BillRejectionNotice, type BillRejectionNoticeProps, BillRemittanceCard, type BillRemittanceCardProps, type BillReviewAttachment, type BillReviewBillingProvider, type BillReviewClinician, type BillReviewData, type BillReviewDocumentType, type BillReviewDraft, type BillReviewFeatures, BillReviewForm, type BillReviewFormProps, type BillReviewLineItem, type BillReviewLocation, type BillReviewPayer, type BillReviewSaveInput, BillSnapshotSummary, type BillSnapshotSummaryProps, type BillStatusAction, type BillStatusAgingCell, BillStatusAgingMatrix, type BillStatusAgingMatrixData, type BillStatusAgingMatrixProps, type BillStatusAgingRow, type BillStatusClient, type BillStatusClientOptions, type BillStatusData, type BillStatusSession, type BillStatusSessionProvider, type BillStatusSessionRequest, BillStatusSummary, type BillStatusSummaryProps, BillSubmissionActions, type BillSubmissionAddress, type BillSubmissionAttachmentReportTypeMode, BillSubmissionAttachmentsSection, BillSubmissionClaimSection, type BillSubmissionDiagnosisOption, type BillSubmissionDocumentType, type BillSubmissionEvaluationType, BillSubmissionForm, type BillSubmissionFormProps, type BillSubmissionFormValue, BillSubmissionHeader, type BillSubmissionInput, type BillSubmissionModifierOption, BillSubmissionPatientSection, type BillSubmissionPostalPlace, type BillSubmissionProcedureOption, BillSubmissionProvidersSection, type BillSubmissionReportTypeOption, type BillSubmissionRoute, type BillSubmissionSectionId, BillSubmissionServiceLinesSection, type BillSubmissionSourceAttachment, type BillSubmissionTaxonomyOption, type BillSubmissionUpload, type BillSubmissionValidation, type BillingComponentProps, BillingDashboard, type BillingDashboardBill, type BillingDashboardProps, type BillingDashboardSummary, BillingReport, type BillingReportDimension, type BillingReportProps, type BillingReportRow, BillingSettings, ConnectedBillLifecycle, type ConnectedBillLifecycleProps, ConnectedBillStatus, type ConnectedBillStatusProps, DEFAULT_BILL_SUBMISSION_MODIFIERS, DEFAULT_BILL_SUBMISSION_PROCEDURES, DEFAULT_BILL_SUBMISSION_TAXONOMIES, MED_LEGAL_REPORT_TYPE_CODE, MindBillBillReview, MindBillBillTimeline, type MindBillReactAppearance, type MindBillThemePreset, type MindBillWidgetProps, OrganizationOnboarding, type OrganizationOnboardingProps, PSYCH_QME_DEFAULT_DIAGNOSIS, type UseBillLifecycleOptions, type UseBillLifecycleResult, type UseBillStatusOptions, type UseBillStatusResult, applyBillSubmissionEvaluationDiagnoses, applyBillSubmissionEvaluationModifiers, billActivityEventLabel, billAgingBucket, billAgingDays, billLifecycleDisplayLabel, billLifecycleStage, buildBillReviewSaveInput, buildBillStatusAgingCsv, buildBillStatusAgingMatrix, buildBillingReportCsv, buildBillingReportRows, calculateBillSubmissionAllowedAmount, claimsAdministratorRecommendations, createBillStatusClient, ensureTrailingBillSubmissionLine, ensureTrailingProcedureLine, exactClaimsAdministratorMatch, formatBillSubmissionDate, mindBillAppearanceStyle, mindBillThemePresets, normalizeClaimsAdministratorName, parseBillSubmissionDate, prepareBillSubmissionDocuments, resolveMindBillAppearance, summarizeBillingDashboard, useBillLifecycle, useBillStatus, validateBillSubmission, visibleBillLifecycleActions };
|
package/dist/index.js
CHANGED
|
@@ -3409,6 +3409,7 @@ function ConnectedBillStatus({
|
|
|
3409
3409
|
}
|
|
3410
3410
|
|
|
3411
3411
|
// src/bill-lifecycle-surfaces.tsx
|
|
3412
|
+
import { useState as useState7 } from "react";
|
|
3412
3413
|
import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
3413
3414
|
function visibleBillLifecycleActions(actions, showUnavailable = false) {
|
|
3414
3415
|
return actions.filter((action) => action.enabled || showUnavailable);
|
|
@@ -3477,6 +3478,80 @@ function BillActivityTimeline({ events, emptyLabel = "No bill activity yet.", ap
|
|
|
3477
3478
|
] }, event.id)) })
|
|
3478
3479
|
] });
|
|
3479
3480
|
}
|
|
3481
|
+
function historyDate(iso) {
|
|
3482
|
+
const parsed = new Date(iso);
|
|
3483
|
+
if (Number.isNaN(parsed.getTime())) return iso;
|
|
3484
|
+
return new Intl.DateTimeFormat("en-US", { month: "2-digit", day: "2-digit", year: "numeric" }).format(parsed);
|
|
3485
|
+
}
|
|
3486
|
+
function BillHistoryTable({ entries, emptyLabel = "No bill history yet.", appearance, className, style, formatDate = historyDate, documentHref }) {
|
|
3487
|
+
const [expanded, setExpanded] = useState7({});
|
|
3488
|
+
return /* @__PURE__ */ jsxs8("section", { className: classes("mb-surface mb-history", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Bill history", children: [
|
|
3489
|
+
/* @__PURE__ */ jsx8("style", { children: lifecycleSurfaceStyles }),
|
|
3490
|
+
/* @__PURE__ */ jsx8("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs8("div", { children: [
|
|
3491
|
+
/* @__PURE__ */ jsx8("strong", { children: "Bill history" }),
|
|
3492
|
+
/* @__PURE__ */ jsx8("span", { children: "Submissions, payer responses, follow-up, and payments." })
|
|
3493
|
+
] }) }),
|
|
3494
|
+
!entries.length ? /* @__PURE__ */ jsx8("p", { className: "mb-activity-empty", children: emptyLabel }) : /* @__PURE__ */ jsxs8("div", { className: "mb-history-table", children: [
|
|
3495
|
+
/* @__PURE__ */ jsxs8("div", { className: "mb-history-head", "aria-hidden": "true", children: [
|
|
3496
|
+
/* @__PURE__ */ jsx8("span", { children: "Date" }),
|
|
3497
|
+
/* @__PURE__ */ jsx8("span", { children: "Action" }),
|
|
3498
|
+
/* @__PURE__ */ jsx8("span", { children: "User" }),
|
|
3499
|
+
/* @__PURE__ */ jsx8("span", { children: "Details" })
|
|
3500
|
+
] }),
|
|
3501
|
+
/* @__PURE__ */ jsx8("ul", { className: "mb-history-rows", children: entries.map((entry) => {
|
|
3502
|
+
const expandable = Boolean(entry.details);
|
|
3503
|
+
const isOpen = expandable && Boolean(expanded[entry.id]);
|
|
3504
|
+
const details = entry.details;
|
|
3505
|
+
return /* @__PURE__ */ jsxs8("li", { className: `mb-history-row is-${entry.tone}`, children: [
|
|
3506
|
+
/* @__PURE__ */ jsxs8(
|
|
3507
|
+
"button",
|
|
3508
|
+
{
|
|
3509
|
+
type: "button",
|
|
3510
|
+
className: "mb-history-line",
|
|
3511
|
+
disabled: !expandable,
|
|
3512
|
+
"aria-expanded": expandable ? isOpen : void 0,
|
|
3513
|
+
onClick: expandable ? () => setExpanded((current) => ({ ...current, [entry.id]: !current[entry.id] })) : void 0,
|
|
3514
|
+
children: [
|
|
3515
|
+
/* @__PURE__ */ jsx8("span", { className: "mb-history-date", children: formatDate(entry.date) }),
|
|
3516
|
+
/* @__PURE__ */ jsx8("span", { className: "mb-history-action", children: entry.action }),
|
|
3517
|
+
/* @__PURE__ */ jsx8("span", { className: "mb-history-actor", children: entry.actor ?? "\u2014" }),
|
|
3518
|
+
/* @__PURE__ */ jsxs8("span", { className: "mb-history-summary", children: [
|
|
3519
|
+
expandable ? /* @__PURE__ */ jsx8("i", { className: `mb-history-caret${isOpen ? " is-open" : ""}`, "aria-hidden": "true" }) : null,
|
|
3520
|
+
entry.summary
|
|
3521
|
+
] })
|
|
3522
|
+
]
|
|
3523
|
+
}
|
|
3524
|
+
),
|
|
3525
|
+
isOpen && details ? /* @__PURE__ */ jsxs8("div", { className: "mb-history-details", children: [
|
|
3526
|
+
details.rows?.length ? /* @__PURE__ */ jsx8("dl", { className: "mb-history-kv", children: details.rows.map((row) => /* @__PURE__ */ jsxs8("div", { children: [
|
|
3527
|
+
/* @__PURE__ */ jsx8("dt", { children: row.label }),
|
|
3528
|
+
/* @__PURE__ */ jsx8("dd", { children: row.value })
|
|
3529
|
+
] }, `${row.label}-${row.value}`)) }) : null,
|
|
3530
|
+
details.documents?.length ? /* @__PURE__ */ jsx8("div", { className: "mb-history-kv", children: /* @__PURE__ */ jsxs8("div", { children: [
|
|
3531
|
+
/* @__PURE__ */ jsx8("dt", { children: "Documents" }),
|
|
3532
|
+
/* @__PURE__ */ jsx8("dd", { children: details.documents.map((doc) => {
|
|
3533
|
+
const href = documentHref?.(doc) ?? null;
|
|
3534
|
+
return href ? /* @__PURE__ */ jsx8("a", { className: "mb-history-doc", href, target: "_blank", rel: "noreferrer", children: doc.filename }, doc.id) : /* @__PURE__ */ jsx8("span", { className: "mb-history-doc", children: doc.filename }, doc.id);
|
|
3535
|
+
}) })
|
|
3536
|
+
] }) }) : null,
|
|
3537
|
+
details.codes?.length ? /* @__PURE__ */ jsx8("dl", { className: "mb-history-codes", children: details.codes.map((code) => /* @__PURE__ */ jsxs8("div", { children: [
|
|
3538
|
+
/* @__PURE__ */ jsx8("dt", { children: code.code }),
|
|
3539
|
+
/* @__PURE__ */ jsx8("dd", { children: code.text })
|
|
3540
|
+
] }, code.code)) }) : null,
|
|
3541
|
+
details.complianceDueDates?.length ? /* @__PURE__ */ jsxs8("div", { className: "mb-history-due", children: [
|
|
3542
|
+
/* @__PURE__ */ jsx8("em", { children: "Compliance Due Dates" }),
|
|
3543
|
+
/* @__PURE__ */ jsx8("dl", { children: details.complianceDueDates.map((due) => /* @__PURE__ */ jsxs8("div", { children: [
|
|
3544
|
+
/* @__PURE__ */ jsx8("dt", { children: formatDate(due.date) }),
|
|
3545
|
+
/* @__PURE__ */ jsx8("dd", { children: due.text })
|
|
3546
|
+
] }, `${due.date}-${due.text}`)) })
|
|
3547
|
+
] }) : null,
|
|
3548
|
+
details.text ? /* @__PURE__ */ jsx8("p", { className: "mb-history-text", children: details.text }) : null
|
|
3549
|
+
] }) : null
|
|
3550
|
+
] }, entry.id);
|
|
3551
|
+
}) })
|
|
3552
|
+
] })
|
|
3553
|
+
] });
|
|
3554
|
+
}
|
|
3480
3555
|
var lifecycleStages = [
|
|
3481
3556
|
{ id: "submitted", label: "Sent" },
|
|
3482
3557
|
{ id: "accepted", label: "Accepted" },
|
|
@@ -3530,42 +3605,61 @@ function BillLifecycleProgress({ state, nativeStatus, submittedAt, agingDays, ap
|
|
|
3530
3605
|
] }, step.id)) })
|
|
3531
3606
|
] });
|
|
3532
3607
|
}
|
|
3533
|
-
function
|
|
3608
|
+
function billRejectionIssueSummary(rejection, count) {
|
|
3609
|
+
const noun = count === 1 ? "validation error" : "validation errors";
|
|
3610
|
+
const source = rejection.source?.trim().replace(/\.$/, "");
|
|
3611
|
+
if (!source) return `${count} ${noun}.`;
|
|
3612
|
+
if (/acknowledg/i.test(source)) return `${count} clearinghouse ${noun}.`;
|
|
3613
|
+
return `${count} ${noun} returned by ${source}.`;
|
|
3614
|
+
}
|
|
3615
|
+
function BillRejectionNotice({ rejection, title = "Rejected \u2014 action required", submittedAt, appearance, className, style, formatDate = defaultFormatDate }) {
|
|
3534
3616
|
const issues = rejection.issues?.length ? rejection.issues : [{ code: rejection.code, description: rejection.reason }];
|
|
3535
|
-
|
|
3617
|
+
const hasCodes = issues.some((issue) => Boolean(issue.code));
|
|
3618
|
+
return /* @__PURE__ */ jsxs8("section", { className: classes("mb-surface mb-rejection-notice", className), style: mindBillAppearanceStyle(appearance, style), role: "alert", "aria-label": "Bill rejection reasons", children: [
|
|
3536
3619
|
/* @__PURE__ */ jsx8("style", { children: lifecycleSurfaceStyles }),
|
|
3537
|
-
/* @__PURE__ */ jsxs8("
|
|
3538
|
-
/* @__PURE__ */
|
|
3539
|
-
|
|
3540
|
-
/* @__PURE__ */
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3620
|
+
/* @__PURE__ */ jsxs8("div", { className: "mb-rejection-overview", children: [
|
|
3621
|
+
/* @__PURE__ */ jsxs8("header", { className: "mb-rejection-heading", children: [
|
|
3622
|
+
/* @__PURE__ */ jsx8("span", { className: "mb-rejection-icon", "aria-hidden": "true", children: "!" }),
|
|
3623
|
+
/* @__PURE__ */ jsxs8("div", { children: [
|
|
3624
|
+
/* @__PURE__ */ jsx8("strong", { children: title }),
|
|
3625
|
+
/* @__PURE__ */ jsxs8("span", { children: [
|
|
3626
|
+
"Fix the ",
|
|
3627
|
+
issues.length === 1 ? "issue" : "issues",
|
|
3628
|
+
" below, then resubmit."
|
|
3629
|
+
] })
|
|
3545
3630
|
] })
|
|
3546
|
-
] })
|
|
3547
|
-
] }),
|
|
3548
|
-
/* @__PURE__ */ jsxs8("ol", { className: "mb-rejection-progress", "aria-label": "Submission status", children: [
|
|
3549
|
-
/* @__PURE__ */ jsxs8("li", { className: "is-complete", children: [
|
|
3550
|
-
/* @__PURE__ */ jsx8("span", { "aria-hidden": "true", children: "\u2713" }),
|
|
3551
|
-
/* @__PURE__ */ jsx8("b", { children: "Sent" })
|
|
3552
3631
|
] }),
|
|
3553
|
-
/* @__PURE__ */ jsxs8("
|
|
3554
|
-
/* @__PURE__ */
|
|
3555
|
-
|
|
3632
|
+
/* @__PURE__ */ jsxs8("ol", { className: "mb-rejection-progress", "aria-label": "Submission status", children: [
|
|
3633
|
+
/* @__PURE__ */ jsxs8("li", { className: "is-complete", children: [
|
|
3634
|
+
/* @__PURE__ */ jsx8("span", { "aria-hidden": "true", children: "\u2713" }),
|
|
3635
|
+
/* @__PURE__ */ jsx8("b", { children: "Sent" }),
|
|
3636
|
+
submittedAt ? /* @__PURE__ */ jsx8("small", { children: formatDate(submittedAt) }) : null
|
|
3637
|
+
] }),
|
|
3638
|
+
/* @__PURE__ */ jsxs8("li", { className: "is-rejected", "aria-current": "step", children: [
|
|
3639
|
+
/* @__PURE__ */ jsx8("span", { "aria-hidden": "true", children: "!" }),
|
|
3640
|
+
/* @__PURE__ */ jsx8("b", { children: "Rejected" }),
|
|
3641
|
+
rejection.receivedAt ? /* @__PURE__ */ jsx8("small", { children: formatDate(rejection.receivedAt) }) : null
|
|
3642
|
+
] })
|
|
3556
3643
|
] })
|
|
3557
3644
|
] }),
|
|
3558
|
-
/* @__PURE__ */ jsxs8("div", { className: "mb-rejection-issues", children: [
|
|
3559
|
-
/* @__PURE__ */
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3645
|
+
/* @__PURE__ */ jsxs8("div", { className: "mb-rejection-issues", "aria-label": "Rejection reasons", children: [
|
|
3646
|
+
/* @__PURE__ */ jsxs8("div", { className: "mb-rejection-issues-heading", children: [
|
|
3647
|
+
/* @__PURE__ */ jsxs8("strong", { children: [
|
|
3648
|
+
/* @__PURE__ */ jsx8("span", { "aria-hidden": "true", children: "\u25B3" }),
|
|
3649
|
+
" Rejection reasons"
|
|
3650
|
+
] }),
|
|
3651
|
+
/* @__PURE__ */ jsx8("span", { children: billRejectionIssueSummary(rejection, issues.length) })
|
|
3652
|
+
] }),
|
|
3653
|
+
/* @__PURE__ */ jsx8("ol", { "aria-label": `${issues.length} rejection ${issues.length === 1 ? "reason" : "reasons"}`, children: issues.map((issue, index) => /* @__PURE__ */ jsxs8("li", { children: [
|
|
3654
|
+
/* @__PURE__ */ jsx8("span", { className: "mb-rejection-bullet", "aria-hidden": "true" }),
|
|
3655
|
+
/* @__PURE__ */ jsx8("p", { children: issue.description }),
|
|
3656
|
+
issue.code ? /* @__PURE__ */ jsx8("span", { className: "mb-rejection-code", children: issue.code }) : null
|
|
3657
|
+
] }, `${issue.code ?? "issue"}-${index}`)) }),
|
|
3658
|
+
hasCodes ? /* @__PURE__ */ jsxs8("p", { className: "mb-rejection-code-note", children: [
|
|
3659
|
+
/* @__PURE__ */ jsx8("span", { "aria-hidden": "true", children: "i" }),
|
|
3660
|
+
" Technical error codes are included for support and auditability."
|
|
3661
|
+
] }) : null
|
|
3662
|
+
] })
|
|
3569
3663
|
] });
|
|
3570
3664
|
}
|
|
3571
3665
|
function BillSnapshotSummary({ bill, patient, injury, delivery, appearance, className, style }) {
|
|
@@ -3838,11 +3932,34 @@ var lifecycleSurfaceStyles = `
|
|
|
3838
3932
|
.mb-activity-list{list-style:none;margin:0;padding:0}.mb-activity-item{display:grid;grid-template-columns:18px minmax(0,1fr);gap:12px;position:relative;padding:0 0 22px}.mb-activity-item:last-child{padding-bottom:0}.mb-activity-item:not(:last-child)::before{background:var(--mb-border);content:"";left:8px;position:absolute;top:10px;bottom:0;width:1px}.mb-activity-marker{background:var(--mb-surface);border:3px solid var(--mb-accent);border-radius:999px;height:11px;margin-top:4px;position:relative;width:11px;z-index:1}.mb-activity-content{display:grid;gap:4px;min-width:0}.mb-activity-content strong{font-size:15px;line-height:1.35}.mb-activity-content p{color:var(--mb-text);font-size:14px;line-height:1.5;margin:0}.mb-activity-content span,.mb-activity-empty{color:var(--mb-muted);font-size:13px;line-height:1.45}.mb-activity-empty,.mb-empty{margin:0}
|
|
3839
3933
|
.mb-progress-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));list-style:none;margin:0;padding:0}.mb-progress-list li{display:grid;gap:7px;position:relative;text-align:center;color:var(--mb-muted);font-size:12px}.mb-progress-list li:not(:last-child)::after{content:"";position:absolute;left:calc(50% + 14px);right:calc(-50% + 14px);top:13px;height:2px;background:var(--mb-border)}.mb-progress-list li.is-complete:not(:last-child)::after{background:var(--mb-accent)}.mb-progress-list li>span{display:grid;place-items:center;justify-self:center;position:relative;z-index:1;width:28px;height:28px;border:2px solid var(--mb-border);border-radius:50%;background:var(--mb-surface);font-weight:800}.mb-progress-list li.is-complete>span,.mb-progress-list li.is-current>span{border-color:var(--mb-accent);background:var(--mb-accent);color:var(--mb-accent-contrast)}.mb-progress-list li.is-current{color:var(--mb-text)}
|
|
3840
3934
|
.mb-progress.is-rejected{border-color:color-mix(in srgb,var(--mb-danger) 34%,var(--mb-border));background:color-mix(in srgb,var(--mb-danger) 3%,var(--mb-surface));box-shadow:0 8px 24px color-mix(in srgb,var(--mb-danger) 8%,transparent)}.mb-progress.is-rejected .mb-surface-heading strong,.mb-progress.is-rejected .mb-progress-list li.is-current{color:var(--mb-danger)}.mb-progress.is-rejected .mb-progress-list li.is-current>span{border-color:var(--mb-danger);background:var(--mb-danger);color:#fff}
|
|
3841
|
-
.mb-rejection-notice{border:1px solid color-mix(in srgb,var(--mb-danger)
|
|
3935
|
+
.mb-rejection-notice{border:1px solid color-mix(in srgb,var(--mb-danger) 30%,var(--mb-border));border-left:4px solid var(--mb-danger);background:color-mix(in srgb,var(--mb-danger) 5%,var(--mb-surface));box-shadow:0 14px 38px color-mix(in srgb,var(--mb-danger) 9%,transparent);padding:26px 28px 18px}.mb-rejection-overview{display:grid;grid-template-columns:minmax(230px,.72fr) minmax(360px,1.28fr);align-items:start;gap:38px}.mb-rejection-heading{display:flex;align-items:flex-start;gap:14px}.mb-rejection-heading>div{display:grid;gap:5px}.mb-rejection-heading strong{color:var(--mb-danger);font-size:19px;line-height:1.25}.mb-rejection-heading span{color:color-mix(in srgb,var(--mb-danger) 48%,var(--mb-text));font-size:14px;line-height:1.45}.mb-rejection-icon{display:grid;place-items:center;flex:0 0 auto;width:42px;height:42px;border-radius:50%;background:var(--mb-danger);box-shadow:0 5px 14px color-mix(in srgb,var(--mb-danger) 25%,transparent);color:#fff;font-size:21px;font-weight:900}.mb-rejection-progress{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));list-style:none;margin:5px 0 24px;padding:0}.mb-rejection-progress li{display:grid;grid-template-rows:34px auto auto;gap:4px;position:relative;text-align:center;color:var(--mb-text);font-size:12px}.mb-rejection-progress li:first-child::after{content:"";position:absolute;left:calc(50% + 17px);right:calc(-50% + 17px);top:16px;height:2px;background:color-mix(in srgb,var(--mb-danger) 48%,var(--mb-border))}.mb-rejection-progress li>span{display:grid;place-items:center;justify-self:center;position:relative;z-index:1;width:34px;height:34px;border:2px solid color-mix(in srgb,var(--mb-danger) 32%,var(--mb-border));border-radius:50%;background:var(--mb-surface);color:var(--mb-danger);font-size:16px;font-weight:900}.mb-rejection-progress li.is-rejected>span{border-color:var(--mb-danger);background:var(--mb-danger);color:#fff}.mb-rejection-progress b{font-size:13px}.mb-rejection-progress small{color:var(--mb-muted);font-size:11px;line-height:1.3}.mb-rejection-issues{border:1px solid color-mix(in srgb,var(--mb-danger) 19%,var(--mb-border));border-radius:12px;background:color-mix(in srgb,var(--mb-danger) 2%,var(--mb-surface));overflow:hidden}.mb-rejection-issues-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:12px 16px;border-bottom:1px solid color-mix(in srgb,var(--mb-danger) 14%,var(--mb-border))}.mb-rejection-issues-heading strong{display:flex;align-items:center;gap:8px;font-size:13px}.mb-rejection-issues-heading strong>span{color:var(--mb-danger);font-size:17px}.mb-rejection-issues-heading>span{color:var(--mb-muted);font-size:12px;text-align:right}.mb-rejection-issues ol{display:grid;gap:7px;list-style:none;margin:0;padding:10px 12px}.mb-rejection-issues li{display:grid;grid-template-columns:8px minmax(0,1fr) auto;align-items:center;gap:11px;padding:10px 12px;border:1px solid color-mix(in srgb,var(--mb-danger) 11%,var(--mb-border));border-radius:8px;background:color-mix(in srgb,var(--mb-danger) 1%,var(--mb-surface));box-shadow:0 1px 3px rgba(23,39,48,.04)}.mb-rejection-bullet{width:7px;height:7px;border-radius:50%;background:var(--mb-danger)}.mb-rejection-issues p{margin:0;font-size:14px;line-height:1.45}.mb-rejection-code{justify-self:end;border:1px solid color-mix(in srgb,var(--mb-danger) 20%,var(--mb-border));border-radius:999px;background:color-mix(in srgb,var(--mb-danger) 6%,var(--mb-surface));color:var(--mb-danger);font-size:11px;font-weight:850;line-height:1.2;padding:4px 8px}.mb-rejection-code-note{display:flex;align-items:center;gap:7px;margin:0;padding:1px 16px 13px;color:var(--mb-muted);font-size:11px}.mb-rejection-code-note>span{display:grid;place-items:center;width:16px;height:16px;border:1px solid currentColor;border-radius:50%;font-size:10px;font-weight:850}
|
|
3842
3936
|
.mb-snapshot dl,.mb-remittance dl,.mb-contacts dl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;margin:0}.mb-remittance dl{grid-template-columns:repeat(4,minmax(0,1fr));row-gap:1px;background:var(--mb-border)}.mb-snapshot dl>div,.mb-remittance dl>div,.mb-contacts dl>div{display:grid;gap:3px;padding:10px 14px;border-left:1px solid var(--mb-border)}.mb-remittance dl>div{border:0;background:var(--mb-surface)}.mb-snapshot dl>div:nth-child(3n+1),.mb-contacts dl>div:first-child{border-left:0}.mb-snapshot dt,.mb-remittance dt,.mb-contacts dt,.mb-payment-list dt{color:var(--mb-muted);font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.mb-snapshot dd,.mb-remittance dd,.mb-contacts dd,.mb-payment-list dd{font-size:14px;font-weight:750;margin:0;overflow-wrap:anywhere}.mb-contacts a{color:var(--mb-accent)}.mb-denial{margin-top:16px;border-left:4px solid var(--mb-danger);border-radius:var(--mb-control-radius);background:color-mix(in srgb,var(--mb-danger) 8%,var(--mb-surface));padding:12px 14px}.mb-denial p{margin:4px 0 0}
|
|
3843
3937
|
.mb-payment-list{display:grid}.mb-payment-list article{display:grid;grid-template-columns:minmax(120px,.35fr) 1fr;gap:14px 24px;padding:16px 0;border-top:1px solid var(--mb-border)}.mb-payment-list article:first-child{border-top:0}.mb-payment-amount{display:grid;align-content:start;gap:2px}.mb-payment-amount strong{font-size:1.2rem}.mb-payment-list article>dl{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0}.mb-payment-list article>dl>div{display:grid;align-content:start;gap:3px}.mb-payment-list article span{color:var(--mb-muted);font-size:12px}.mb-payment-list article p{grid-column:1/-1;margin:0;color:var(--mb-muted);font-size:13px}
|
|
3844
3938
|
.mb-eor-review{border-top:4px solid var(--mb-accent);padding-top:17px}.mb-eor-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin:0 0 18px;border:1px solid var(--mb-border);border-radius:10px;overflow:hidden}.mb-eor-metrics>div{display:grid;gap:4px;padding:13px 15px;border-left:1px solid var(--mb-border);border-top:1px solid var(--mb-border)}.mb-eor-metrics>div:nth-child(-n+4){border-top:0}.mb-eor-metrics>div:nth-child(4n+1){border-left:0}.mb-eor-metrics dt{color:var(--mb-muted);font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.mb-eor-metrics dd{margin:0;font-size:15px;font-weight:800}.mb-eor-metrics .is-balance{background:color-mix(in srgb,var(--mb-accent) 7%,var(--mb-surface))}.mb-eor-table-wrap{overflow-x:auto;border:1px solid var(--mb-border);border-radius:10px}.mb-eor-table{width:100%;min-width:1080px;border-collapse:collapse;font-size:12px}.mb-eor-table th,.mb-eor-table td{padding:10px 12px;border-left:1px solid var(--mb-border);border-top:1px solid var(--mb-border);text-align:left;vertical-align:top}.mb-eor-table th:first-child,.mb-eor-table td:first-child{border-left:0}.mb-eor-table thead th{background:var(--mb-soft);color:var(--mb-muted);font-weight:800}.mb-eor-table .mb-eor-groups th{border-top:0;background:color-mix(in srgb,var(--mb-accent) 13%,var(--mb-surface));color:var(--mb-text);text-align:center}.mb-eor-table td>strong,.mb-eor-table td>span{display:block}.mb-eor-table td>span{margin-top:3px;color:var(--mb-muted)}.mb-eor-link,.mb-eor-documents button{border:0;background:transparent;color:var(--mb-accent);font:inherit;font-weight:750;padding:0;text-align:left;text-decoration:underline;cursor:pointer;overflow-wrap:anywhere}.mb-eor-documents{display:flex;flex-wrap:wrap;gap:12px;margin-top:12px}
|
|
3845
|
-
|
|
3939
|
+
.mb-history-table{border:1px solid var(--mb-border);border-radius:10px;overflow:hidden}
|
|
3940
|
+
.mb-history-head{display:grid;grid-template-columns:96px 160px 140px minmax(0,1fr);gap:12px;padding:8px 14px;background:var(--mb-soft);color:var(--mb-muted);font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
|
|
3941
|
+
.mb-history-rows{list-style:none;margin:0;padding:0}.mb-history-row{border-top:1px solid var(--mb-border)}
|
|
3942
|
+
.mb-history-row.is-submission{background:color-mix(in srgb,var(--mb-accent) 9%,var(--mb-surface))}
|
|
3943
|
+
.mb-history-row.is-note{background:color-mix(in srgb,#f2c344 13%,var(--mb-surface))}
|
|
3944
|
+
.mb-history-line{display:grid;grid-template-columns:96px 160px 140px minmax(0,1fr);gap:12px;width:100%;padding:10px 14px;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:default}
|
|
3945
|
+
.mb-history-line:not(:disabled){cursor:pointer}.mb-history-line:not(:disabled):hover .mb-history-summary{text-decoration:underline}
|
|
3946
|
+
.mb-history-date{color:var(--mb-muted);font-size:13px}.mb-history-action{font-size:13.5px;font-weight:750}
|
|
3947
|
+
.mb-history-row.is-problem .mb-history-action{color:var(--mb-danger)}
|
|
3948
|
+
.mb-history-actor{color:var(--mb-muted);font-size:13px;overflow-wrap:anywhere}
|
|
3949
|
+
.mb-history-summary{display:flex;align-items:flex-start;gap:7px;min-width:0;font-size:13.5px;line-height:1.45;overflow-wrap:anywhere}
|
|
3950
|
+
.mb-history-caret{flex:0 0 auto;margin-top:5px;width:0;height:0;border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:6px solid var(--mb-muted);transition:transform .12s ease}
|
|
3951
|
+
.mb-history-caret.is-open{transform:rotate(90deg)}
|
|
3952
|
+
.mb-history-details{padding:4px 14px 14px 122px;font-size:13.5px;line-height:1.5}
|
|
3953
|
+
.mb-history-kv,.mb-history-codes,.mb-history-due dl{display:grid;gap:4px;margin:0}
|
|
3954
|
+
.mb-history-kv>div{display:grid;grid-template-columns:180px minmax(0,1fr);gap:12px;border-top:1px solid color-mix(in srgb,var(--mb-border) 60%,transparent);padding-top:4px}
|
|
3955
|
+
.mb-history-kv dt{font-weight:750}.mb-history-kv dd{margin:0;overflow-wrap:anywhere}.mb-history-kv dd a{color:var(--mb-accent)}.mb-history-doc{display:block}
|
|
3956
|
+
.mb-history-codes>div{display:grid;grid-template-columns:56px minmax(0,1fr);gap:12px}.mb-history-codes dt{font-weight:800}.mb-history-codes dd{margin:0}
|
|
3957
|
+
.mb-history-due{margin-top:8px}.mb-history-due em{display:block;color:var(--mb-muted);font-size:12.5px;margin-bottom:4px}
|
|
3958
|
+
.mb-history-due dl>div{display:grid;grid-template-columns:96px minmax(0,1fr);gap:12px;border-top:1px solid color-mix(in srgb,var(--mb-border) 60%,transparent);padding-top:4px}
|
|
3959
|
+
.mb-history-due dt{font-weight:750}.mb-history-due dd{margin:0}
|
|
3960
|
+
.mb-history-text{margin:8px 0 0;color:var(--mb-text);white-space:pre-wrap}
|
|
3961
|
+
@media(max-width:700px){.mb-history-head{display:none}.mb-history-line{grid-template-columns:1fr;gap:2px;padding:10px 12px}.mb-history-details{padding:4px 12px 12px}.mb-history-kv>div,.mb-history-due dl>div{grid-template-columns:1fr}}
|
|
3962
|
+
@media(max-width:700px){.mb-surface.mb-progress{padding:16px 10px}.mb-progress-list{grid-template-columns:repeat(4,minmax(0,1fr))}.mb-progress-list li{display:grid;grid-template-columns:1fr;align-items:start;gap:6px;text-align:center;font-size:10px;min-width:0}.mb-progress-list li b{font-size:10px;white-space:nowrap}.mb-progress-list li:not(:last-child)::after{left:calc(50% + 12px);right:calc(-50% + 12px);top:11px;bottom:auto;width:auto;height:2px}.mb-progress-list li>span{grid-row:auto;width:24px;height:24px;font-size:11px}.mb-rejection-notice{padding:18px 14px 14px}.mb-rejection-overview{grid-template-columns:1fr;gap:18px}.mb-rejection-heading strong{font-size:17px}.mb-rejection-icon{width:36px;height:36px}.mb-rejection-progress{margin:0 0 4px}.mb-rejection-issues-heading{align-items:flex-start;flex-direction:column;gap:4px}.mb-rejection-issues-heading>span{text-align:left}.mb-rejection-issues li{grid-template-columns:8px minmax(0,1fr);gap:8px 10px}.mb-rejection-code{grid-column:2;justify-self:start}.mb-snapshot dl,.mb-remittance dl,.mb-contacts dl{grid-template-columns:1fr 1fr}.mb-snapshot dl>div,.mb-remittance dl>div,.mb-contacts dl>div{border:0;border-top:1px solid var(--mb-border);padding:10px 0}.mb-snapshot dl>div:nth-child(-n+2),.mb-remittance dl>div:nth-child(-n+2),.mb-contacts dl>div:nth-child(-n+2){border-top:0}.mb-payment-list article{grid-template-columns:1fr}.mb-payment-list article>dl{grid-template-columns:1fr 1fr}}
|
|
3846
3963
|
`;
|
|
3847
3964
|
|
|
3848
3965
|
// src/connected-bill-lifecycle.tsx
|
|
@@ -3851,7 +3968,7 @@ import {
|
|
|
3851
3968
|
useEffect as useEffect6,
|
|
3852
3969
|
useMemo as useMemo7,
|
|
3853
3970
|
useRef as useRef5,
|
|
3854
|
-
useState as
|
|
3971
|
+
useState as useState8
|
|
3855
3972
|
} from "react";
|
|
3856
3973
|
import {
|
|
3857
3974
|
DEFAULT_API_BASE_URL as DEFAULT_API_BASE_URL2,
|
|
@@ -3901,11 +4018,11 @@ function useBillLifecycle({
|
|
|
3901
4018
|
enabled = true,
|
|
3902
4019
|
fetch: fetchOverride
|
|
3903
4020
|
}) {
|
|
3904
|
-
const [data, setData] =
|
|
3905
|
-
const [error, setError] =
|
|
3906
|
-
const [isLoading, setIsLoading] =
|
|
3907
|
-
const [isRefreshing, setIsRefreshing] =
|
|
3908
|
-
const [isMutating, setIsMutating] =
|
|
4021
|
+
const [data, setData] = useState8(null);
|
|
4022
|
+
const [error, setError] = useState8(null);
|
|
4023
|
+
const [isLoading, setIsLoading] = useState8(enabled);
|
|
4024
|
+
const [isRefreshing, setIsRefreshing] = useState8(false);
|
|
4025
|
+
const [isMutating, setIsMutating] = useState8(false);
|
|
3909
4026
|
const mounted = useRef5(true);
|
|
3910
4027
|
const client = useMemo7(() => createBillLifecycleClient({
|
|
3911
4028
|
billId: providedBillId,
|
|
@@ -4052,12 +4169,12 @@ function shouldShowSandboxControls(environment, enabled = false) {
|
|
|
4052
4169
|
function ConnectedBillLifecycle({ appearance, sandboxControls = false, className, style, loadingFallback, errorFallback, onChanged, ...options }) {
|
|
4053
4170
|
const lifecycle = useBillLifecycle(options);
|
|
4054
4171
|
const { data } = lifecycle;
|
|
4055
|
-
const [tab, setTab] =
|
|
4056
|
-
const [panel, setPanel] =
|
|
4057
|
-
const [notice, setNotice] =
|
|
4058
|
-
const [reason, setReason] =
|
|
4059
|
-
const [payment, setPayment] =
|
|
4060
|
-
const [review, setReview] =
|
|
4172
|
+
const [tab, setTab] = useState8("details");
|
|
4173
|
+
const [panel, setPanel] = useState8("");
|
|
4174
|
+
const [notice, setNotice] = useState8("");
|
|
4175
|
+
const [reason, setReason] = useState8("");
|
|
4176
|
+
const [payment, setPayment] = useState8({ amount: 0, penaltyAmount: 0, interestAmount: 0, method: "check", checkNumber: "", depositDate: today(), note: "" });
|
|
4177
|
+
const [review, setReview] = useState8({ reason: "", payerClaimControlNumber: "", disputedAmount: void 0, attachmentIds: [], route: "ebill" });
|
|
4061
4178
|
const lastData = useRef5(null);
|
|
4062
4179
|
useEffect6(() => {
|
|
4063
4180
|
if (!data || data === lastData.current) return;
|
|
@@ -4102,7 +4219,7 @@ function ConnectedBillLifecycle({ appearance, sandboxControls = false, className
|
|
|
4102
4219
|
const simulations = showSandboxControls ? sandboxScenarios(data.lifecycle.state) : [];
|
|
4103
4220
|
return /* @__PURE__ */ jsxs9("section", { className: ["mb-connected-lifecycle", className].filter(Boolean).join(" "), style: mindBillAppearanceStyle(appearance, style), children: [
|
|
4104
4221
|
/* @__PURE__ */ jsx9("style", { children: CONNECTED_LIFECYCLE_STYLES }),
|
|
4105
|
-
data.lifecycle.state.toLowerCase() === "rejected" && data.rejection ? /* @__PURE__ */ jsx9(BillRejectionNotice, { rejection: data.rejection, ...appearance ? { appearance } : {} }) : /* @__PURE__ */ jsx9(BillLifecycleProgress, { state: data.lifecycle.state, nativeStatus: data.lifecycle.nativeStatus, submittedAt: data.lifecycle.submittedAt ?? null, agingDays: data.lifecycle.agingDays ?? null, ...appearance ? { appearance } : {} }),
|
|
4222
|
+
data.lifecycle.state.toLowerCase() === "rejected" && data.rejection ? /* @__PURE__ */ jsx9(BillRejectionNotice, { rejection: data.rejection, submittedAt: data.lifecycle.submittedAt ?? null, ...appearance ? { appearance } : {} }) : /* @__PURE__ */ jsx9(BillLifecycleProgress, { state: data.lifecycle.state, nativeStatus: data.lifecycle.nativeStatus, submittedAt: data.lifecycle.submittedAt ?? null, agingDays: data.lifecycle.agingDays ?? null, ...appearance ? { appearance } : {} }),
|
|
4106
4223
|
/* @__PURE__ */ jsxs9("header", { className: "mb-lifecycle-head", children: [
|
|
4107
4224
|
/* @__PURE__ */ jsxs9("div", { children: [
|
|
4108
4225
|
/* @__PURE__ */ jsx9("div", { className: "mb-lifecycle-title", children: /* @__PURE__ */ jsxs9("h2", { children: [
|
|
@@ -4135,7 +4252,7 @@ function ConnectedBillLifecycle({ appearance, sandboxControls = false, className
|
|
|
4135
4252
|
] }, scenario.id)) }) : /* @__PURE__ */ jsx9("p", { className: "mb-lifecycle-simulator-idle", children: "No simulated payer transition is needed at this stage. Use the bill action below to continue." })
|
|
4136
4253
|
] }) : null,
|
|
4137
4254
|
/* @__PURE__ */ jsx9(BillReadOnlyForm, { data, onOpenAttachment: lifecycle.openAttachment, ...appearance ? { appearance } : {} })
|
|
4138
|
-
] }) : /* @__PURE__ */ jsx9("div", { className: "mb-lifecycle-tabpanel", role: "tabpanel", children: /* @__PURE__ */ jsx9(BillActivityTimeline, { events: data.activity, ...appearance ? { appearance } : {} }) }),
|
|
4255
|
+
] }) : /* @__PURE__ */ jsx9("div", { className: "mb-lifecycle-tabpanel", role: "tabpanel", children: data.history?.length ? /* @__PURE__ */ jsx9(BillHistoryTable, { entries: data.history, ...appearance ? { appearance } : {} }) : /* @__PURE__ */ jsx9(BillActivityTimeline, { events: data.activity, ...appearance ? { appearance } : {} }) }),
|
|
4139
4256
|
viewEor || actions.length ? /* @__PURE__ */ jsxs9("aside", { className: "mb-lifecycle-actions-sheet", "aria-label": "Bill actions", children: [
|
|
4140
4257
|
viewEor && data.eors[0] ? /* @__PURE__ */ jsx9("button", { type: "button", className: "mb-lifecycle-button secondary", onClick: () => void lifecycle.openEor(data.eors[0]).catch(() => void 0), children: viewEor.label }) : null,
|
|
4141
4258
|
actions.map((action) => /* @__PURE__ */ jsx9("button", { type: "button", className: action.primary ? "mb-lifecycle-button primary" : "mb-lifecycle-button secondary", onClick: () => {
|
|
@@ -4322,6 +4439,7 @@ export {
|
|
|
4322
4439
|
BillActivityTimeline,
|
|
4323
4440
|
BillAgingSummary,
|
|
4324
4441
|
BillExplanationOfReview,
|
|
4442
|
+
BillHistoryTable,
|
|
4325
4443
|
BillLifecycleActions,
|
|
4326
4444
|
BillLifecycleProgress,
|
|
4327
4445
|
BillList,
|