@mindbill/react 0.31.3 → 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/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;
@@ -953,4 +971,4 @@ type MindBillWidgetProps = {
953
971
  declare function MindBillBillTimeline(props: MindBillWidgetProps): ReactElement;
954
972
  declare function MindBillBillReview(props: MindBillWidgetProps): ReactElement;
955
973
 
956
- 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" },
@@ -3861,6 +3936,29 @@ var lifecycleSurfaceStyles = `
3861
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}
3862
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}
3863
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}
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}}
3864
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}}
3865
3963
  `;
3866
3964
 
@@ -3870,7 +3968,7 @@ import {
3870
3968
  useEffect as useEffect6,
3871
3969
  useMemo as useMemo7,
3872
3970
  useRef as useRef5,
3873
- useState as useState7
3971
+ useState as useState8
3874
3972
  } from "react";
3875
3973
  import {
3876
3974
  DEFAULT_API_BASE_URL as DEFAULT_API_BASE_URL2,
@@ -3920,11 +4018,11 @@ function useBillLifecycle({
3920
4018
  enabled = true,
3921
4019
  fetch: fetchOverride
3922
4020
  }) {
3923
- const [data, setData] = useState7(null);
3924
- const [error, setError] = useState7(null);
3925
- const [isLoading, setIsLoading] = useState7(enabled);
3926
- const [isRefreshing, setIsRefreshing] = useState7(false);
3927
- const [isMutating, setIsMutating] = useState7(false);
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);
3928
4026
  const mounted = useRef5(true);
3929
4027
  const client = useMemo7(() => createBillLifecycleClient({
3930
4028
  billId: providedBillId,
@@ -4071,12 +4169,12 @@ function shouldShowSandboxControls(environment, enabled = false) {
4071
4169
  function ConnectedBillLifecycle({ appearance, sandboxControls = false, className, style, loadingFallback, errorFallback, onChanged, ...options }) {
4072
4170
  const lifecycle = useBillLifecycle(options);
4073
4171
  const { data } = lifecycle;
4074
- const [tab, setTab] = useState7("details");
4075
- const [panel, setPanel] = useState7("");
4076
- const [notice, setNotice] = useState7("");
4077
- const [reason, setReason] = useState7("");
4078
- const [payment, setPayment] = useState7({ amount: 0, penaltyAmount: 0, interestAmount: 0, method: "check", checkNumber: "", depositDate: today(), note: "" });
4079
- const [review, setReview] = useState7({ reason: "", payerClaimControlNumber: "", disputedAmount: void 0, attachmentIds: [], route: "ebill" });
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" });
4080
4178
  const lastData = useRef5(null);
4081
4179
  useEffect6(() => {
4082
4180
  if (!data || data === lastData.current) return;
@@ -4154,7 +4252,7 @@ function ConnectedBillLifecycle({ appearance, sandboxControls = false, className
4154
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." })
4155
4253
  ] }) : null,
4156
4254
  /* @__PURE__ */ jsx9(BillReadOnlyForm, { data, onOpenAttachment: lifecycle.openAttachment, ...appearance ? { appearance } : {} })
4157
- ] }) : /* @__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 } : {} }) }),
4158
4256
  viewEor || actions.length ? /* @__PURE__ */ jsxs9("aside", { className: "mb-lifecycle-actions-sheet", "aria-label": "Bill actions", children: [
4159
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,
4160
4258
  actions.map((action) => /* @__PURE__ */ jsx9("button", { type: "button", className: action.primary ? "mb-lifecycle-button primary" : "mb-lifecycle-button secondary", onClick: () => {
@@ -4341,6 +4439,7 @@ export {
4341
4439
  BillActivityTimeline,
4342
4440
  BillAgingSummary,
4343
4441
  BillExplanationOfReview,
4442
+ BillHistoryTable,
4344
4443
  BillLifecycleActions,
4345
4444
  BillLifecycleProgress,
4346
4445
  BillList,