@mindbill/react 0.21.1 → 0.21.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -153,7 +153,7 @@ The component includes the interaction model, not just the markup:
153
153
  - a responsive two-column review form (one column on narrow screens);
154
154
  - paste-friendly `MM/DD/YYYY` date fields and required-field asterisks;
155
155
  - ZIP-to-city/state completion through MindBill's authenticated postal directory;
156
- - complete, server-backed ICD-10 search, common-injury quick picks, and removable chips;
156
+ - complete, server-backed ICD-10 search with an alphabetized 100-code first page, automatic 100-code scroll paging, common-injury quick picks, and removable chips;
157
157
  - canonical claims-administrator search through the authenticated MindBill payer directory;
158
158
  - QME, AME, and Psych QME evaluation modes with medical-legal modifier defaults;
159
159
  - searchable workers-comp procedure/modifier controls, medical-legal fee-schedule amounts, totals, valid manual CPT/HCPCS entry, and an automatically maintained empty line;
@@ -161,6 +161,8 @@ The component includes the interaction model, not just the markup:
161
161
 
162
162
  Partners supply tenant-specific bootstrap data, one short-lived browser session callback, and the final server submission callback. Required fields, validation, ZIP lookup, ICD-10 and payer directories, service-line behavior, attachments, and submission UX stay inside `@mindbill/react`, so every integration receives the same billing workflow. Optional `diagnosisOptions`, `procedureOptions`, `modifierOptions`, and lookup callbacks extend or replace defaults when a partner has licensed or organization-specific data.
163
163
 
164
+ Validation is component-owned as well. A missing routing payer is highlighted immediately; Submit highlights every invalid control with a specific message, focuses and scrolls to the first problem, and continues validating as the user corrects the form.
165
+
164
166
  `BILL_SUBMISSION_REQUIRED_FIELDS` and `validateBillSubmission` expose the same contract for tests and non-visual integrations. The component never creates a draft; its callback fires only when the user submits a locally valid snapshot.
165
167
 
166
168
  `BillReviewForm` remains available for legacy integrations that already own a custom review model. New integrations should use `BillSubmissionForm`.
package/dist/index.d.ts CHANGED
@@ -51,20 +51,20 @@ declare const mindBillThemePresets: {
51
51
  readonly fontFamily: "Inter, ui-sans-serif, system-ui, sans-serif";
52
52
  };
53
53
  readonly "orange-bright": {
54
- readonly accentColor: "#ff4f0a";
54
+ readonly accentColor: "#f4510b";
55
55
  readonly accentTextColor: "#ffffff";
56
56
  readonly backgroundColor: "#fffaf6";
57
- readonly surfaceColor: "#ffffff";
57
+ readonly surfaceColor: "#fffefd";
58
58
  readonly inputBackgroundColor: "#ffffff";
59
- readonly textColor: "#111827";
59
+ readonly textColor: "#090f1f";
60
60
  readonly mutedColor: "#626a73";
61
- readonly borderColor: "#e5e1dc";
62
- readonly borderRadius: "8px";
63
- readonly controlRadius: "6px";
64
- readonly shadow: "0 4px 18px rgba(17,24,39,.06)";
65
- readonly dangerColor: "#b42318";
66
- readonly successColor: "#16794f";
67
- readonly warningColor: "#9a5b13";
61
+ readonly borderColor: "#e7e1da";
62
+ readonly borderRadius: "16px";
63
+ readonly controlRadius: "10px";
64
+ readonly shadow: "0 12px 36px rgba(244,81,11,.08), 0 1px 2px rgba(9,15,31,.05)";
65
+ readonly dangerColor: "#c4322b";
66
+ readonly successColor: "#16835b";
67
+ readonly warningColor: "#a65f00";
68
68
  readonly fontFamily: "Inter, ui-sans-serif, system-ui, sans-serif";
69
69
  };
70
70
  readonly "clinical-blue": {
@@ -481,7 +481,7 @@ type BillSubmissionFormProps = {
481
481
  fetch?: typeof globalThis.fetch;
482
482
  onSearchClaimsAdministrators?: (query: string, claimNumber?: string) => Promise<BillReviewPayer$1[]>;
483
483
  diagnosisOptions?: BillSubmissionDiagnosisOption[];
484
- onSearchDiagnoses?: (query: string) => Promise<BillSubmissionDiagnosisOption[]>;
484
+ onSearchDiagnoses?: (query: string, limit?: number, offset?: number) => Promise<BillSubmissionDiagnosisOption[]>;
485
485
  onLookupPostalCode?: (postalCode: string) => Promise<BillSubmissionPostalPlace | null>;
486
486
  procedureOptions?: BillSubmissionProcedureOption[];
487
487
  modifierOptions?: BillSubmissionModifierOption[];
@@ -613,6 +613,8 @@ declare function BillActivityTimeline({ events, emptyLabel, appearance, classNam
613
613
  type BillLifecycleStage = "submitted" | "accepted" | "processed" | "closed";
614
614
  /** Maps MindBill's detailed lifecycle state into a compact progress stage. */
615
615
  declare function billLifecycleStage(state: string): BillLifecycleStage;
616
+ /** Returns the end-user label for a canonical lifecycle state. */
617
+ declare function billLifecycleDisplayLabel(state: string, nativeStatus?: string): string;
616
618
  type BillLifecycleProgressProps = SurfaceProps & {
617
619
  state: string;
618
620
  nativeStatus?: string;
@@ -657,6 +659,8 @@ type UseBillLifecycleResult = {
657
659
  reopenBill: BillLifecycleClient["reopenBill"];
658
660
  postPayment: BillLifecycleClient["postPayment"];
659
661
  submitSecondReview: BillLifecycleClient["submitSecondReview"];
662
+ resubmitBill: BillLifecycleClient["resubmitBill"];
663
+ simulateSandbox: BillLifecycleClient["simulateSandbox"];
660
664
  };
661
665
  declare function useBillLifecycle({ billId: providedBillId, sessionEndpoint, getSession, apiBaseUrl, refreshInterval, enabled, initialData, fetch: fetchOverride, }: UseBillLifecycleOptions): UseBillLifecycleResult;
662
666
  type ConnectedBillLifecycleProps = UseBillLifecycleOptions & {
@@ -681,4 +685,4 @@ type MindBillWidgetProps = {
681
685
  declare function MindBillBillTimeline(props: MindBillWidgetProps): ReactElement;
682
686
  declare function MindBillBillReview(props: MindBillWidgetProps): ReactElement;
683
687
 
684
- export { BILL_SUBMISSION_DIAGNOSIS_QUICK_PICKS, BILL_SUBMISSION_DOCUMENT_TYPES, BILL_SUBMISSION_REQUIRED_FIELDS, type BillActivityEvent, BillActivityTimeline, type BillActivityTimelineProps, BillLifecycleActions, type BillLifecycleActionsProps, BillLifecycleProgress, type BillLifecycleProgressProps, type BillLifecycleStage, 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, type BillSubmissionAddress, type BillSubmissionDiagnosisOption, type BillSubmissionDocumentType, type BillSubmissionEvaluationType, BillSubmissionForm, type BillSubmissionFormProps, type BillSubmissionFormValue, type BillSubmissionInput, type BillSubmissionModifierOption, type BillSubmissionPostalPlace, type BillSubmissionProcedureOption, type BillSubmissionRoute, type BillSubmissionSourceAttachment, type BillSubmissionUpload, type BillSubmissionValidation, ConnectedBillLifecycle, type ConnectedBillLifecycleProps, ConnectedBillStatus, type ConnectedBillStatusProps, DEFAULT_BILL_SUBMISSION_MODIFIERS, DEFAULT_BILL_SUBMISSION_PROCEDURES, MindBillBillReview, MindBillBillTimeline, type MindBillReactAppearance, type MindBillThemePreset, type MindBillWidgetProps, type UseBillLifecycleOptions, type UseBillLifecycleResult, type UseBillStatusOptions, type UseBillStatusResult, applyBillSubmissionEvaluationModifiers, billActivityEventLabel, billLifecycleStage, buildBillReviewSaveInput, calculateBillSubmissionAllowedAmount, createBillStatusClient, ensureTrailingBillSubmissionLine, ensureTrailingProcedureLine, formatBillSubmissionDate, mindBillAppearanceStyle, mindBillThemePresets, parseBillSubmissionDate, resolveMindBillAppearance, useBillLifecycle, useBillStatus, validateBillSubmission, visibleBillLifecycleActions };
688
+ export { BILL_SUBMISSION_DIAGNOSIS_QUICK_PICKS, BILL_SUBMISSION_DOCUMENT_TYPES, BILL_SUBMISSION_REQUIRED_FIELDS, type BillActivityEvent, BillActivityTimeline, type BillActivityTimelineProps, BillLifecycleActions, type BillLifecycleActionsProps, BillLifecycleProgress, type BillLifecycleProgressProps, type BillLifecycleStage, 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, type BillSubmissionAddress, type BillSubmissionDiagnosisOption, type BillSubmissionDocumentType, type BillSubmissionEvaluationType, BillSubmissionForm, type BillSubmissionFormProps, type BillSubmissionFormValue, type BillSubmissionInput, type BillSubmissionModifierOption, type BillSubmissionPostalPlace, type BillSubmissionProcedureOption, type BillSubmissionRoute, type BillSubmissionSourceAttachment, type BillSubmissionUpload, type BillSubmissionValidation, ConnectedBillLifecycle, type ConnectedBillLifecycleProps, ConnectedBillStatus, type ConnectedBillStatusProps, DEFAULT_BILL_SUBMISSION_MODIFIERS, DEFAULT_BILL_SUBMISSION_PROCEDURES, MindBillBillReview, MindBillBillTimeline, type MindBillReactAppearance, type MindBillThemePreset, type MindBillWidgetProps, type UseBillLifecycleOptions, type UseBillLifecycleResult, type UseBillStatusOptions, type UseBillStatusResult, applyBillSubmissionEvaluationModifiers, billActivityEventLabel, billLifecycleDisplayLabel, billLifecycleStage, buildBillReviewSaveInput, calculateBillSubmissionAllowedAmount, createBillStatusClient, ensureTrailingBillSubmissionLine, ensureTrailingProcedureLine, formatBillSubmissionDate, mindBillAppearanceStyle, mindBillThemePresets, parseBillSubmissionDate, resolveMindBillAppearance, useBillLifecycle, useBillStatus, validateBillSubmission, visibleBillLifecycleActions };