@mindbill/react 0.28.1 → 0.29.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 +17 -9
- package/dist/index.d.ts +58 -2
- package/dist/index.js +482 -312
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -32,16 +32,13 @@ Choose a complete preset, then override only the tokens your design system owns.
|
|
|
32
32
|
```tsx
|
|
33
33
|
<ConnectedBillLifecycle
|
|
34
34
|
billId={billId}
|
|
35
|
-
appearance={{
|
|
36
|
-
preset: "orange-bright",
|
|
37
|
-
accentColor: "#ff4f0a",
|
|
38
|
-
fontFamily: "Inter, sans-serif",
|
|
39
|
-
borderRadius: "8px",
|
|
40
|
-
}}
|
|
35
|
+
appearance={{ preset: "midnight-cyan" }}
|
|
41
36
|
/>
|
|
42
37
|
```
|
|
43
38
|
|
|
44
|
-
|
|
39
|
+
`midnight-cyan` gives every billing surface a spacious pale-blue canvas, crisp white panels, midnight actions and typography, cyan-compatible accents, and pill-shaped controls. No extra CSS is required.
|
|
40
|
+
|
|
41
|
+
Available presets are `mindbill`, `qme-companion`, `orange-bright`, `clinical-blue`, and `midnight-cyan`. Preset names describe visual styles rather than customer or partner brands. Supported overrides include accent, accent text, background, surface, input background, text, muted text, border, font, panel radius, control radius, shadow, danger, success, and warning colors.
|
|
45
42
|
|
|
46
43
|
Add one authenticated route to your app. It maps the signed-in user's role to billing permissions, then mints an exact-origin token for that user in your MindBill organization. The Partner API key stays on the server.
|
|
47
44
|
|
|
@@ -244,8 +241,19 @@ Use the smaller pieces independently when a page already has its own shell:
|
|
|
244
241
|
- `BillAgingSummary` — outstanding balance, open count, collected, total billed, and 0–30 / 31–60 / 61–90 / 91+ buckets;
|
|
245
242
|
- `BillList` — responsive desktop table and mobile cards;
|
|
246
243
|
- `BillingReport` — grouped totals by `status`, `payer`, or `aging`;
|
|
247
|
-
- `
|
|
248
|
-
- `
|
|
244
|
+
- `BillStatusAgingMatrix` — the management view billers expect: one row per lifecycle status, one column per aging bucket, clickable counts with outstanding balances, and row/column totals;
|
|
245
|
+
- `summarizeBillingDashboard`, `buildBillingReportRows`, and `buildBillStatusAgingMatrix` — presentation-free aggregates;
|
|
246
|
+
- `buildBillingReportCsv` and `buildBillStatusAgingCsv` — the same rows as downloadable CSV text.
|
|
247
|
+
|
|
248
|
+
```tsx
|
|
249
|
+
<BillStatusAgingMatrix
|
|
250
|
+
bills={bills}
|
|
251
|
+
appearance={{ preset: "clinical-blue" }}
|
|
252
|
+
onSelectCell={(cell) => showDrillDown(cell.state, cell.bucket, cell.bills)}
|
|
253
|
+
/>
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
Each cell carries the exact bills behind its count, so a drill-down never needs a second query. Pass `stateOrder` to pin your own lifecycle ordering; unknown states append alphabetically.
|
|
249
257
|
|
|
250
258
|
Pass only synthetic data to public examples and tests. In production, load organization-scoped bills on the server and authorize each bill-detail route independently.
|
|
251
259
|
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { CSSProperties, ReactElement, ReactNode } from 'react';
|
|
|
4
4
|
import { BillReviewData as BillReviewData$1, BillLifecycleDelivery, BillReviewAttachment as BillReviewAttachment$1, BrowserBillSubmissionResult, BillLifecycleSessionProvider, BillReviewPayer as BillReviewPayer$1, BrowserBillSubmissionDocument, BillRemittanceSummary, BillEorDocument, BillPaymentRecord, BillLifecycleAction, 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, BillRemittanceSummary, BrowserBillSubmissionResult, CloseBillInput, PostBillPaymentInput, ReopenBillInput, SubmitSecondReviewInput, createBillLifecycleClient } from '@mindbill/browser';
|
|
6
6
|
|
|
7
|
-
type MindBillThemePreset = "mindbill" | "qme-companion" | "orange-bright" | "clinical-blue";
|
|
7
|
+
type MindBillThemePreset = "mindbill" | "qme-companion" | "orange-bright" | "clinical-blue" | "midnight-cyan";
|
|
8
8
|
type MindBillReactAppearance = MindBillAppearance & {
|
|
9
9
|
/** A complete starting point. Individual tokens below always win. */
|
|
10
10
|
preset?: MindBillThemePreset;
|
|
@@ -84,6 +84,23 @@ declare const mindBillThemePresets: {
|
|
|
84
84
|
readonly warningColor: "#d48806";
|
|
85
85
|
readonly fontFamily: "Inter, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif";
|
|
86
86
|
};
|
|
87
|
+
readonly "midnight-cyan": {
|
|
88
|
+
readonly accentColor: "#05092e";
|
|
89
|
+
readonly accentTextColor: "#ffffff";
|
|
90
|
+
readonly backgroundColor: "#edf6ff";
|
|
91
|
+
readonly surfaceColor: "#ffffff";
|
|
92
|
+
readonly inputBackgroundColor: "#ffffff";
|
|
93
|
+
readonly textColor: "#05092e";
|
|
94
|
+
readonly mutedColor: "#596078";
|
|
95
|
+
readonly borderColor: "#d9dae1";
|
|
96
|
+
readonly borderRadius: "0px";
|
|
97
|
+
readonly controlRadius: "999px";
|
|
98
|
+
readonly shadow: "0 1px 2px rgba(5,9,46,.04)";
|
|
99
|
+
readonly dangerColor: "#b42318";
|
|
100
|
+
readonly successColor: "#167a58";
|
|
101
|
+
readonly warningColor: "#9a6418";
|
|
102
|
+
readonly fontFamily: "Geist, Inter, ui-sans-serif, system-ui, sans-serif";
|
|
103
|
+
};
|
|
87
104
|
};
|
|
88
105
|
declare function resolveMindBillAppearance(appearance: MindBillReactAppearance | undefined): MindBillReactAppearance;
|
|
89
106
|
declare function mindBillAppearanceStyle(appearance: MindBillReactAppearance | undefined, style?: CSSProperties): CSSProperties;
|
|
@@ -685,6 +702,45 @@ declare function buildBillingReportRows(bills: BillingDashboardBill[], groupBy?:
|
|
|
685
702
|
declare function buildBillingReportCsv(bills: BillingDashboardBill[], groupBy?: BillingReportDimension): string;
|
|
686
703
|
declare function BillingReport({ bills, groupBy, heading, description, appearance, className, style }: BillingReportProps): ReactElement;
|
|
687
704
|
|
|
705
|
+
type BillStatusAgingCell = {
|
|
706
|
+
state: string;
|
|
707
|
+
bucket: BillAgingBucketId | "total";
|
|
708
|
+
count: number;
|
|
709
|
+
balance: number;
|
|
710
|
+
bills: BillingDashboardBill[];
|
|
711
|
+
};
|
|
712
|
+
type BillStatusAgingRow = {
|
|
713
|
+
state: string;
|
|
714
|
+
label: string;
|
|
715
|
+
cells: BillStatusAgingCell[];
|
|
716
|
+
total: BillStatusAgingCell;
|
|
717
|
+
};
|
|
718
|
+
type BillStatusAgingMatrixData = {
|
|
719
|
+
rows: BillStatusAgingRow[];
|
|
720
|
+
columnTotals: BillStatusAgingCell[];
|
|
721
|
+
grandTotal: BillStatusAgingCell;
|
|
722
|
+
};
|
|
723
|
+
type BillStatusAgingMatrixProps = {
|
|
724
|
+
appearance?: MindBillReactAppearance;
|
|
725
|
+
className?: string;
|
|
726
|
+
style?: CSSProperties;
|
|
727
|
+
bills: BillingDashboardBill[];
|
|
728
|
+
heading?: ReactNode;
|
|
729
|
+
description?: ReactNode;
|
|
730
|
+
/** Lifecycle-first row order; unknown states append alphabetically. */
|
|
731
|
+
stateOrder?: string[];
|
|
732
|
+
/** Show outstanding balance under each count. Default true. */
|
|
733
|
+
showBalances?: boolean;
|
|
734
|
+
onSelectCell?: (cell: BillStatusAgingCell) => void;
|
|
735
|
+
};
|
|
736
|
+
declare const BILL_STATUS_AGING_BUCKETS: {
|
|
737
|
+
id: BillAgingBucketId;
|
|
738
|
+
label: string;
|
|
739
|
+
}[];
|
|
740
|
+
declare function buildBillStatusAgingMatrix(bills: BillingDashboardBill[], stateOrder?: string[], now?: Date): BillStatusAgingMatrixData;
|
|
741
|
+
declare function buildBillStatusAgingCsv(bills: BillingDashboardBill[], stateOrder?: string[]): string;
|
|
742
|
+
declare function BillStatusAgingMatrix({ bills, heading, description, stateOrder, showBalances, onSelectCell, appearance, className, style, }: BillStatusAgingMatrixProps): ReactElement;
|
|
743
|
+
|
|
688
744
|
type BillStatusData = {
|
|
689
745
|
billId: string;
|
|
690
746
|
state: string;
|
|
@@ -870,4 +926,4 @@ type MindBillWidgetProps = {
|
|
|
870
926
|
declare function MindBillBillTimeline(props: MindBillWidgetProps): ReactElement;
|
|
871
927
|
declare function MindBillBillReview(props: MindBillWidgetProps): ReactElement;
|
|
872
928
|
|
|
873
|
-
export { 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, 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 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, 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, PSYCH_QME_DEFAULT_DIAGNOSIS, type UseBillLifecycleOptions, type UseBillLifecycleResult, type UseBillStatusOptions, type UseBillStatusResult, applyBillSubmissionEvaluationDiagnoses, applyBillSubmissionEvaluationModifiers, billActivityEventLabel, billAgingBucket, billAgingDays, billLifecycleDisplayLabel, billLifecycleStage, buildBillReviewSaveInput, buildBillingReportCsv, buildBillingReportRows, calculateBillSubmissionAllowedAmount, claimsAdministratorRecommendations, createBillStatusClient, ensureTrailingBillSubmissionLine, ensureTrailingProcedureLine, exactClaimsAdministratorMatch, formatBillSubmissionDate, mindBillAppearanceStyle, mindBillThemePresets, normalizeClaimsAdministratorName, parseBillSubmissionDate, prepareBillSubmissionDocuments, resolveMindBillAppearance, summarizeBillingDashboard, useBillLifecycle, useBillStatus, validateBillSubmission, visibleBillLifecycleActions };
|
|
929
|
+
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, 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, 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, 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 };
|