@mindbill/react 0.4.0 → 0.6.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 CHANGED
@@ -1,11 +1,28 @@
1
1
  # @mindbill/react
2
2
 
3
- React wrappers for the secure `@mindbill/embed` custom elements. See the repository's [10-minute quickstart](https://github.com/incidentfox/mindbill-widgets#add-mindbill-billing-in-10-minutes).
3
+ Native React billing components plus wrappers for MindBill's secure hosted workflows. See the repository's [10-minute quickstart](https://github.com/incidentfox/mindbill-widgets#add-mindbill-billing-in-10-minutes).
4
4
 
5
5
  Published on npm as [`@mindbill/react`](https://www.npmjs.com/package/@mindbill/react). Install it with `npm install @mindbill/react @mindbill/embed` or your preferred package manager.
6
6
 
7
+ Use `BillReviewForm` when billing should feel like part of your product. Your server loads and mutates the review model with a short-lived MindBill session; the component remains controlled and never receives a Partner API key.
8
+
7
9
  ```tsx
8
- import { HostedBillReview } from "@mindbill/react";
10
+ import { BillReviewForm } from "@mindbill/react";
11
+
12
+ <BillReviewForm
13
+ data={billReview}
14
+ appearance={{ accentColor: "#32a9d6", textColor: "#203743" }}
15
+ onSave={(input) => api.patch("/billing/review", input)}
16
+ onSubmit={(input, route) => api.post("/billing/submit", { input, route })}
17
+ onAddAttachment={(file, documentType, description) =>
18
+ api.upload("/billing/attachments", { file, documentType, description })
19
+ }
20
+ onRemoveAttachment={(attachmentId) =>
21
+ api.delete(`/billing/attachments/${attachmentId}`)
22
+ }
23
+ />
9
24
  ```
10
25
 
11
- Create the short-lived embed session on your server; never send a Partner API key to React/browser code.
26
+ Use `BillStatusSummary` for the compact lifecycle surface. `HostedBillReview` and `HostedBillTimeline` remain available when a hosted flow is a better fit.
27
+
28
+ Never send a Partner API key or long-lived credential to React/browser code.
package/dist/index.d.ts CHANGED
@@ -2,6 +2,158 @@ import { MindBillAppearance, MindBillEventDetail, MindBillErrorDetail } from '@m
2
2
  export { MindBillAppearance, MindBillErrorDetail, MindBillEventDetail } from '@mindbill/embed';
3
3
  import { CSSProperties, ReactElement } from 'react';
4
4
 
5
+ type BillReviewDocumentType = "final_report" | "letter_of_attestation" | "proof_of_service" | "form_122" | "return_to_work_voucher" | "w9" | "medical_records" | "appeal" | "other";
6
+ type BillReviewBillingProvider = {
7
+ id?: string;
8
+ name: string;
9
+ taxId: string;
10
+ npi: string;
11
+ billType: "Professional" | "Institutional";
12
+ phone?: string;
13
+ billingStreet?: string;
14
+ billingCity?: string;
15
+ billingState?: string;
16
+ billingZip?: string;
17
+ };
18
+ type BillReviewClinician = {
19
+ id?: string;
20
+ name: string;
21
+ specialty: string;
22
+ npi: string;
23
+ taxonomy?: string;
24
+ licenseNumber?: string;
25
+ licenseState?: string;
26
+ signaturePng?: string;
27
+ signatureKey?: string;
28
+ isQME?: boolean;
29
+ isAME?: boolean;
30
+ email?: string;
31
+ active?: boolean;
32
+ };
33
+ type BillReviewLocation = {
34
+ id?: string;
35
+ billingProviderId?: string;
36
+ name: string;
37
+ nickname?: string;
38
+ street: string;
39
+ city: string;
40
+ state: string;
41
+ zip: string;
42
+ county?: string;
43
+ posCode?: string;
44
+ isPrimary?: boolean;
45
+ active?: boolean;
46
+ };
47
+ type BillReviewLineItem = {
48
+ id?: string;
49
+ code: string;
50
+ modifiers: string[];
51
+ units: number;
52
+ charge: number;
53
+ feeSchedule?: number;
54
+ };
55
+ type BillReviewAttachment = {
56
+ id: string;
57
+ filename: string;
58
+ description?: string | null;
59
+ documentType: string;
60
+ reportType?: string | null;
61
+ source?: string;
62
+ addedAt?: string;
63
+ contentUrl?: string;
64
+ };
65
+ type BillReviewData = {
66
+ bill: {
67
+ id: string;
68
+ billNumber: string | number;
69
+ status: string;
70
+ transmissionState?: string;
71
+ dos: string;
72
+ dosEnd?: string | null;
73
+ placeOfServiceId?: string;
74
+ authorizationNumber?: string | null;
75
+ billingProviderId?: string;
76
+ renderingProviderId?: string;
77
+ billingSnapshot?: {
78
+ billingProvider?: BillReviewBillingProvider;
79
+ renderingProvider?: BillReviewClinician;
80
+ placeOfService?: BillReviewLocation;
81
+ } | null;
82
+ lineItems: BillReviewLineItem[];
83
+ attachments: BillReviewAttachment[];
84
+ totalCharge: number;
85
+ totalPaid: number;
86
+ balanceDue: number;
87
+ };
88
+ patient: {
89
+ name: string;
90
+ dob?: string;
91
+ };
92
+ injury: {
93
+ claimNumber?: string;
94
+ employer?: string;
95
+ doi?: string;
96
+ claimsAdminId?: string;
97
+ };
98
+ options?: {
99
+ billingProviders?: BillReviewBillingProvider[];
100
+ renderingProviders?: BillReviewClinician[];
101
+ locations?: BillReviewLocation[];
102
+ };
103
+ };
104
+ type BillReviewSaveInput = {
105
+ dos: string;
106
+ dosEnd?: string | null;
107
+ authorizationNumber?: string | null;
108
+ billingProviderId?: string;
109
+ billingProvider?: Omit<BillReviewBillingProvider, "id">;
110
+ renderingProviderId?: string;
111
+ renderingProvider?: Omit<BillReviewClinician, "id">;
112
+ placeOfServiceId?: string;
113
+ placeOfService?: Omit<BillReviewLocation, "id">;
114
+ lineItems: Array<{
115
+ id?: string;
116
+ code: string;
117
+ modifiers: string[];
118
+ units: number;
119
+ }>;
120
+ };
121
+ type BillSubmissionRoute = "ebill" | "fax" | "mail" | "email";
122
+ type BillReviewFormProps = {
123
+ data: BillReviewData;
124
+ onSave: (input: BillReviewSaveInput) => Promise<BillReviewData | void>;
125
+ onSubmit: (input: BillReviewSaveInput, route: BillSubmissionRoute) => Promise<void>;
126
+ onAddAttachment: (file: File, documentType: BillReviewDocumentType, description?: string) => Promise<void>;
127
+ onRemoveAttachment: (attachmentId: string) => Promise<void>;
128
+ onOpenAttachment?: (attachment: BillReviewAttachment) => void;
129
+ className?: string;
130
+ style?: CSSProperties;
131
+ appearance?: MindBillAppearance;
132
+ disabled?: boolean;
133
+ };
134
+ type BillReviewDraft = {
135
+ dos: string;
136
+ dosEnd: string;
137
+ authorizationNumber: string;
138
+ billingProvider: BillReviewBillingProvider;
139
+ clinician: BillReviewClinician;
140
+ location: BillReviewLocation;
141
+ lineItems: BillReviewLineItem[];
142
+ };
143
+ declare function buildBillReviewSaveInput(draft: BillReviewDraft): BillReviewSaveInput;
144
+ declare function BillReviewForm({ data, onSave, onSubmit, onAddAttachment, onRemoveAttachment, onOpenAttachment, className, style, appearance, disabled, }: BillReviewFormProps): ReactElement;
145
+ type BillStatusSummaryProps = {
146
+ status: string;
147
+ submittedAt?: string | null;
148
+ totalCharge: number;
149
+ totalPaid: number;
150
+ balanceDue: number;
151
+ className?: string;
152
+ style?: CSSProperties;
153
+ appearance?: MindBillAppearance;
154
+ };
155
+ declare function BillStatusSummary({ status, submittedAt, totalCharge, totalPaid, balanceDue, className, style, appearance }: BillStatusSummaryProps): ReactElement;
156
+
5
157
  type MindBillWidgetProps = {
6
158
  sessionToken: string;
7
159
  embedUrl: string;
@@ -22,4 +174,4 @@ declare const HostedBillFromReport: typeof MindBillBillFromReport;
22
174
  declare const HostedCollections: typeof MindBillCollections;
23
175
  declare const HostedOnboarding: typeof MindBillOnboarding;
24
176
 
25
- export { HostedBillFromReport, HostedBillReview, HostedBillTimeline, HostedCollections, HostedOnboarding, MindBillBillFromReport, MindBillBillReview, MindBillBillTimeline, MindBillCollections, MindBillOnboarding, type MindBillWidgetProps };
177
+ export { type BillReviewAttachment, type BillReviewBillingProvider, type BillReviewClinician, type BillReviewData, type BillReviewDocumentType, type BillReviewDraft, BillReviewForm, type BillReviewFormProps, type BillReviewLineItem, type BillReviewLocation, type BillReviewSaveInput, BillStatusSummary, type BillStatusSummaryProps, type BillSubmissionRoute, HostedBillFromReport, HostedBillReview, HostedBillTimeline, HostedCollections, HostedOnboarding, MindBillBillFromReport, MindBillBillReview, MindBillBillTimeline, MindBillCollections, MindBillOnboarding, type MindBillWidgetProps, buildBillReviewSaveInput };
package/dist/index.js CHANGED
@@ -2,11 +2,424 @@
2
2
 
3
3
  // src/index.tsx
4
4
  import "@mindbill/embed";
5
- import { createElement, useEffect, useRef } from "react";
5
+ import { createElement, useEffect as useEffect2, useRef } from "react";
6
+
7
+ // src/native-bill-review.tsx
8
+ import { useEffect, useId, useMemo, useState } from "react";
9
+ import { jsx, jsxs } from "react/jsx-runtime";
10
+ var EMPTY_BILLING_PROVIDER = {
11
+ name: "",
12
+ taxId: "",
13
+ npi: "",
14
+ billType: "Professional"
15
+ };
16
+ var EMPTY_CLINICIAN = {
17
+ name: "",
18
+ specialty: "",
19
+ npi: ""
20
+ };
21
+ var EMPTY_LOCATION = {
22
+ name: "",
23
+ street: "",
24
+ city: "",
25
+ state: "",
26
+ zip: "",
27
+ posCode: "11"
28
+ };
29
+ var DOCUMENT_LABELS = {
30
+ final_report: "Final medical-legal report",
31
+ letter_of_attestation: "Letter of attestation",
32
+ proof_of_service: "Proof of service",
33
+ form_122: "DWC Form 122",
34
+ return_to_work_voucher: "Return-to-work voucher",
35
+ w9: "W-9",
36
+ medical_records: "Medical records",
37
+ appeal: "Appeal or review support",
38
+ other: "Other supporting document"
39
+ };
40
+ function withoutId(value) {
41
+ const result = { ...value };
42
+ delete result.id;
43
+ return result;
44
+ }
45
+ function toDraft(data) {
46
+ const snapshot = data.bill.billingSnapshot;
47
+ return {
48
+ dos: data.bill.dos || "",
49
+ dosEnd: data.bill.dosEnd || "",
50
+ authorizationNumber: data.bill.authorizationNumber || "",
51
+ billingProvider: {
52
+ ...EMPTY_BILLING_PROVIDER,
53
+ ...snapshot?.billingProvider ?? {}
54
+ },
55
+ clinician: { ...EMPTY_CLINICIAN, ...snapshot?.renderingProvider ?? {} },
56
+ location: { ...EMPTY_LOCATION, ...snapshot?.placeOfService ?? {} },
57
+ lineItems: data.bill.lineItems.map((line) => ({ ...line }))
58
+ };
59
+ }
60
+ function buildBillReviewSaveInput(draft) {
61
+ return {
62
+ dos: draft.dos,
63
+ dosEnd: draft.dosEnd || null,
64
+ authorizationNumber: draft.authorizationNumber.trim() || null,
65
+ ...draft.billingProvider.id ? { billingProviderId: draft.billingProvider.id } : {},
66
+ billingProvider: withoutId(draft.billingProvider),
67
+ ...draft.clinician.id ? { renderingProviderId: draft.clinician.id } : {},
68
+ renderingProvider: withoutId(draft.clinician),
69
+ ...draft.location.id ? { placeOfServiceId: draft.location.id } : {},
70
+ placeOfService: withoutId(draft.location),
71
+ lineItems: draft.lineItems.map(({ id, code, modifiers, units }) => ({
72
+ ...id ? { id } : {},
73
+ code: code.trim().toUpperCase(),
74
+ modifiers,
75
+ units
76
+ }))
77
+ };
78
+ }
79
+ function money(value) {
80
+ return new Intl.NumberFormat("en-US", {
81
+ style: "currency",
82
+ currency: "USD"
83
+ }).format(value);
84
+ }
85
+ function appearanceStyle(appearance, style) {
86
+ return {
87
+ ...appearance?.accentColor ? { "--mb-accent": appearance.accentColor } : {},
88
+ ...appearance?.textColor ? { "--mb-text": appearance.textColor } : {},
89
+ ...appearance?.mutedColor ? { "--mb-muted": appearance.mutedColor } : {},
90
+ ...appearance?.borderColor ? { "--mb-border": appearance.borderColor } : {},
91
+ ...appearance?.backgroundColor ? { "--mb-soft": appearance.backgroundColor } : {},
92
+ ...appearance?.surfaceColor ? { "--mb-surface": appearance.surfaceColor } : {},
93
+ ...appearance?.fontFamily ? { "--mb-font": appearance.fontFamily } : {},
94
+ ...style
95
+ };
96
+ }
97
+ function Field({
98
+ label,
99
+ value,
100
+ onChange,
101
+ type = "text",
102
+ optional,
103
+ required
104
+ }) {
105
+ return /* @__PURE__ */ jsxs("label", { className: "mb-native-field", children: [
106
+ /* @__PURE__ */ jsxs("span", { children: [
107
+ label,
108
+ " ",
109
+ optional ? /* @__PURE__ */ jsx("small", { children: "Optional" }) : null
110
+ ] }),
111
+ /* @__PURE__ */ jsx(
112
+ "input",
113
+ {
114
+ type,
115
+ value,
116
+ required,
117
+ onChange: (event) => onChange(event.target.value)
118
+ }
119
+ )
120
+ ] });
121
+ }
122
+ function BillReviewForm({
123
+ data,
124
+ onSave,
125
+ onSubmit,
126
+ onAddAttachment,
127
+ onRemoveAttachment,
128
+ onOpenAttachment,
129
+ className,
130
+ style,
131
+ appearance,
132
+ disabled = false
133
+ }) {
134
+ const [draft, setDraft] = useState(() => toDraft(data));
135
+ const [route, setRoute] = useState("ebill");
136
+ const [file, setFile] = useState(null);
137
+ const [documentType, setDocumentType] = useState("other");
138
+ const [busy, setBusy] = useState("");
139
+ const [error, setError] = useState("");
140
+ const [notice, setNotice] = useState("");
141
+ const routeName = useId();
142
+ const editable = data.bill.status === "incomplete" && !disabled;
143
+ useEffect(() => setDraft(toDraft(data)), [data]);
144
+ const canSubmit = useMemo(
145
+ () => Boolean(
146
+ draft.dos && draft.billingProvider.name.trim() && draft.billingProvider.taxId.trim() && draft.billingProvider.npi.trim() && draft.clinician.name.trim() && draft.clinician.npi.trim() && draft.location.name.trim() && draft.location.street.trim() && draft.location.city.trim() && draft.location.state.trim() && draft.location.zip.trim() && draft.lineItems.length && draft.lineItems.every((line) => line.code.trim() && line.units > 0)
147
+ ),
148
+ [draft]
149
+ );
150
+ const updateBillingProvider = (key, value) => setDraft((current) => ({
151
+ ...current,
152
+ billingProvider: { ...current.billingProvider, [key]: value }
153
+ }));
154
+ const updateClinician = (key, value) => setDraft((current) => ({
155
+ ...current,
156
+ clinician: { ...current.clinician, [key]: value }
157
+ }));
158
+ const updateLocation = (key, value) => setDraft((current) => ({
159
+ ...current,
160
+ location: { ...current.location, [key]: value }
161
+ }));
162
+ async function run(action, task) {
163
+ setBusy(action);
164
+ setError("");
165
+ setNotice("");
166
+ try {
167
+ await task();
168
+ setNotice(action === "save" ? "Changes saved." : "Bill submitted.");
169
+ } catch (cause) {
170
+ setError(
171
+ cause instanceof Error ? cause.message : "MindBill could not complete this request."
172
+ );
173
+ } finally {
174
+ setBusy("");
175
+ }
176
+ }
177
+ const handleSave = (event) => {
178
+ event.preventDefault();
179
+ void run("save", async () => {
180
+ const updated = await onSave(buildBillReviewSaveInput(draft));
181
+ if (updated) setDraft(toDraft(updated));
182
+ });
183
+ };
184
+ const handleSubmit = () => run("submit", () => onSubmit(buildBillReviewSaveInput(draft), route));
185
+ const attach = async () => {
186
+ if (!file) return;
187
+ setBusy("attachment");
188
+ setError("");
189
+ try {
190
+ await onAddAttachment(file, documentType, DOCUMENT_LABELS[documentType]);
191
+ setFile(null);
192
+ setDocumentType("other");
193
+ setNotice("Document added to the payer packet.");
194
+ } catch (cause) {
195
+ setError(cause instanceof Error ? cause.message : "Document could not be attached.");
196
+ } finally {
197
+ setBusy("");
198
+ }
199
+ };
200
+ const sectionClass = "mb-native-section";
201
+ return /* @__PURE__ */ jsxs(
202
+ "form",
203
+ {
204
+ className: ["mb-native-review", className].filter(Boolean).join(" "),
205
+ style: appearanceStyle(appearance, style),
206
+ onSubmit: handleSave,
207
+ children: [
208
+ /* @__PURE__ */ jsx("style", { children: NATIVE_BILL_REVIEW_STYLES }),
209
+ /* @__PURE__ */ jsxs("header", { className: "mb-native-heading", children: [
210
+ /* @__PURE__ */ jsxs("div", { children: [
211
+ /* @__PURE__ */ jsx("span", { className: "mb-native-eyebrow", children: "Billing review" }),
212
+ /* @__PURE__ */ jsxs("h2", { children: [
213
+ "Bill #",
214
+ data.bill.billNumber
215
+ ] }),
216
+ /* @__PURE__ */ jsx("p", { children: "Review the prefilled claim and payer packet, then submit." })
217
+ ] }),
218
+ /* @__PURE__ */ jsxs("div", { className: "mb-native-total", children: [
219
+ /* @__PURE__ */ jsx("span", { children: data.bill.status }),
220
+ /* @__PURE__ */ jsx("strong", { children: money(data.bill.totalCharge) })
221
+ ] })
222
+ ] }),
223
+ /* @__PURE__ */ jsxs("dl", { className: "mb-native-summary", children: [
224
+ /* @__PURE__ */ jsxs("div", { children: [
225
+ /* @__PURE__ */ jsx("dt", { children: "Patient" }),
226
+ /* @__PURE__ */ jsx("dd", { children: data.patient.name || "\u2014" })
227
+ ] }),
228
+ /* @__PURE__ */ jsxs("div", { children: [
229
+ /* @__PURE__ */ jsx("dt", { children: "Claim" }),
230
+ /* @__PURE__ */ jsx("dd", { children: data.injury.claimNumber || "\u2014" })
231
+ ] }),
232
+ /* @__PURE__ */ jsxs("div", { children: [
233
+ /* @__PURE__ */ jsx("dt", { children: "Employer" }),
234
+ /* @__PURE__ */ jsx("dd", { children: data.injury.employer || "\u2014" })
235
+ ] }),
236
+ /* @__PURE__ */ jsxs("div", { children: [
237
+ /* @__PURE__ */ jsx("dt", { children: "Date of injury" }),
238
+ /* @__PURE__ */ jsx("dd", { children: data.injury.doi || "\u2014" })
239
+ ] })
240
+ ] }),
241
+ /* @__PURE__ */ jsxs("section", { className: sectionClass, children: [
242
+ /* @__PURE__ */ jsx("div", { className: "mb-native-section-head", children: /* @__PURE__ */ jsxs("div", { children: [
243
+ /* @__PURE__ */ jsx("h3", { children: "Claim and service" }),
244
+ /* @__PURE__ */ jsx("p", { children: "These values print on the bill." })
245
+ ] }) }),
246
+ /* @__PURE__ */ jsxs("div", { className: "mb-native-grid three", children: [
247
+ /* @__PURE__ */ jsx(Field, { label: "Date of service", type: "date", required: true, value: draft.dos, onChange: (dos) => setDraft((current) => ({ ...current, dos })) }),
248
+ /* @__PURE__ */ jsx(Field, { label: "End date", type: "date", optional: true, value: draft.dosEnd, onChange: (dosEnd) => setDraft((current) => ({ ...current, dosEnd })) }),
249
+ /* @__PURE__ */ jsx(Field, { label: "Authorization number", optional: true, value: draft.authorizationNumber, onChange: (authorizationNumber) => setDraft((current) => ({ ...current, authorizationNumber })) })
250
+ ] })
251
+ ] }),
252
+ /* @__PURE__ */ jsxs("section", { className: sectionClass, children: [
253
+ /* @__PURE__ */ jsxs("div", { className: "mb-native-section-head", children: [
254
+ /* @__PURE__ */ jsxs("div", { children: [
255
+ /* @__PURE__ */ jsx("h3", { children: "Billing practice" }),
256
+ /* @__PURE__ */ jsx("p", { children: "Payee identity and billing address for this claim." })
257
+ ] }),
258
+ /* @__PURE__ */ jsx("span", { children: "Prefilled" })
259
+ ] }),
260
+ /* @__PURE__ */ jsxs("div", { className: "mb-native-grid three", children: [
261
+ /* @__PURE__ */ jsx(Field, { label: "Practice name", required: true, value: draft.billingProvider.name, onChange: (value) => updateBillingProvider("name", value) }),
262
+ /* @__PURE__ */ jsx(Field, { label: "Tax ID", required: true, value: draft.billingProvider.taxId, onChange: (value) => updateBillingProvider("taxId", value) }),
263
+ /* @__PURE__ */ jsx(Field, { label: "Group NPI", required: true, value: draft.billingProvider.npi, onChange: (value) => updateBillingProvider("npi", value) }),
264
+ /* @__PURE__ */ jsx(Field, { label: "Phone", optional: true, value: draft.billingProvider.phone || "", onChange: (value) => updateBillingProvider("phone", value) }),
265
+ /* @__PURE__ */ jsx(Field, { label: "Billing street", required: true, value: draft.billingProvider.billingStreet || "", onChange: (value) => updateBillingProvider("billingStreet", value) }),
266
+ /* @__PURE__ */ jsx(Field, { label: "City", required: true, value: draft.billingProvider.billingCity || "", onChange: (value) => updateBillingProvider("billingCity", value) }),
267
+ /* @__PURE__ */ jsx(Field, { label: "State", required: true, value: draft.billingProvider.billingState || "", onChange: (value) => updateBillingProvider("billingState", value) }),
268
+ /* @__PURE__ */ jsx(Field, { label: "ZIP", required: true, value: draft.billingProvider.billingZip || "", onChange: (value) => updateBillingProvider("billingZip", value) })
269
+ ] })
270
+ ] }),
271
+ /* @__PURE__ */ jsxs("section", { className: sectionClass, children: [
272
+ /* @__PURE__ */ jsxs("div", { className: "mb-native-section-head", children: [
273
+ /* @__PURE__ */ jsxs("div", { children: [
274
+ /* @__PURE__ */ jsx("h3", { children: "Clinician" }),
275
+ /* @__PURE__ */ jsx("p", { children: "Provider identity printed on the claim." })
276
+ ] }),
277
+ /* @__PURE__ */ jsx("span", { children: "Prefilled" })
278
+ ] }),
279
+ /* @__PURE__ */ jsxs("div", { className: "mb-native-grid three", children: [
280
+ /* @__PURE__ */ jsx(Field, { label: "Clinician name", required: true, value: draft.clinician.name, onChange: (value) => updateClinician("name", value) }),
281
+ /* @__PURE__ */ jsx(Field, { label: "Specialty", value: draft.clinician.specialty, onChange: (value) => updateClinician("specialty", value) }),
282
+ /* @__PURE__ */ jsx(Field, { label: "NPI", required: true, value: draft.clinician.npi, onChange: (value) => updateClinician("npi", value) }),
283
+ /* @__PURE__ */ jsx(Field, { label: "Taxonomy", optional: true, value: draft.clinician.taxonomy || "", onChange: (value) => updateClinician("taxonomy", value) }),
284
+ /* @__PURE__ */ jsx(Field, { label: "License number", optional: true, value: draft.clinician.licenseNumber || "", onChange: (value) => updateClinician("licenseNumber", value) }),
285
+ /* @__PURE__ */ jsx(Field, { label: "License state", optional: true, value: draft.clinician.licenseState || "", onChange: (value) => updateClinician("licenseState", value) })
286
+ ] })
287
+ ] }),
288
+ /* @__PURE__ */ jsxs("section", { className: sectionClass, children: [
289
+ /* @__PURE__ */ jsxs("div", { className: "mb-native-section-head", children: [
290
+ /* @__PURE__ */ jsxs("div", { children: [
291
+ /* @__PURE__ */ jsx("h3", { children: "Service location" }),
292
+ /* @__PURE__ */ jsx("p", { children: "The exact place of service for this bill." })
293
+ ] }),
294
+ /* @__PURE__ */ jsx("span", { children: "Prefilled" })
295
+ ] }),
296
+ /* @__PURE__ */ jsxs("div", { className: "mb-native-grid three", children: [
297
+ /* @__PURE__ */ jsx(Field, { label: "Location name", required: true, value: draft.location.name, onChange: (value) => updateLocation("name", value) }),
298
+ /* @__PURE__ */ jsx(Field, { label: "Street", required: true, value: draft.location.street, onChange: (value) => updateLocation("street", value) }),
299
+ /* @__PURE__ */ jsx(Field, { label: "City", required: true, value: draft.location.city, onChange: (value) => updateLocation("city", value) }),
300
+ /* @__PURE__ */ jsx(Field, { label: "State", required: true, value: draft.location.state, onChange: (value) => updateLocation("state", value) }),
301
+ /* @__PURE__ */ jsx(Field, { label: "ZIP", required: true, value: draft.location.zip, onChange: (value) => updateLocation("zip", value) }),
302
+ /* @__PURE__ */ jsx(Field, { label: "Place of service code", required: true, value: draft.location.posCode || "11", onChange: (value) => updateLocation("posCode", value) })
303
+ ] })
304
+ ] }),
305
+ /* @__PURE__ */ jsxs("section", { className: sectionClass, children: [
306
+ /* @__PURE__ */ jsxs("div", { className: "mb-native-section-head", children: [
307
+ /* @__PURE__ */ jsxs("div", { children: [
308
+ /* @__PURE__ */ jsx("h3", { children: "Procedure lines" }),
309
+ /* @__PURE__ */ jsx("p", { children: "MindBill recalculates the allowed amount when changes are saved." })
310
+ ] }),
311
+ /* @__PURE__ */ jsx("button", { type: "button", className: "mb-native-button quiet", disabled: !editable, onClick: () => setDraft((current) => ({ ...current, lineItems: [...current.lineItems, { code: "", modifiers: [], units: 1, charge: 0 }] })), children: "+ Add line" })
312
+ ] }),
313
+ /* @__PURE__ */ jsx("div", { className: "mb-native-lines", children: draft.lineItems.map((line, index) => /* @__PURE__ */ jsxs("div", { className: "mb-native-line", children: [
314
+ /* @__PURE__ */ jsx(Field, { label: "Procedure", required: true, value: line.code, onChange: (value) => setDraft((current) => ({ ...current, lineItems: current.lineItems.map((item, itemIndex) => itemIndex === index ? { ...item, code: value } : item) })) }),
315
+ /* @__PURE__ */ jsx(Field, { label: "Modifiers", value: line.modifiers.join(", "), onChange: (value) => setDraft((current) => ({ ...current, lineItems: current.lineItems.map((item, itemIndex) => itemIndex === index ? { ...item, modifiers: value.split(",").map((part) => part.trim()).filter(Boolean) } : item) })) }),
316
+ /* @__PURE__ */ jsxs("label", { className: "mb-native-field", children: [
317
+ /* @__PURE__ */ jsx("span", { children: "Units" }),
318
+ /* @__PURE__ */ jsx("input", { type: "number", min: "1", required: true, value: line.units, onChange: (event) => setDraft((current) => ({ ...current, lineItems: current.lineItems.map((item, itemIndex) => itemIndex === index ? { ...item, units: Number(event.target.value) } : item) })) })
319
+ ] }),
320
+ /* @__PURE__ */ jsxs("div", { className: "mb-native-allowed", children: [
321
+ /* @__PURE__ */ jsx("span", { children: "Allowed" }),
322
+ /* @__PURE__ */ jsx("strong", { children: money(line.charge) })
323
+ ] }),
324
+ /* @__PURE__ */ jsx("button", { type: "button", className: "mb-native-remove", "aria-label": `Remove ${line.code || "procedure"}`, disabled: !editable || draft.lineItems.length === 1, onClick: () => setDraft((current) => ({ ...current, lineItems: current.lineItems.filter((_, itemIndex) => itemIndex !== index) })), children: "\xD7" })
325
+ ] }, line.id || index)) })
326
+ ] }),
327
+ /* @__PURE__ */ jsxs("section", { className: sectionClass, children: [
328
+ /* @__PURE__ */ jsxs("div", { className: "mb-native-section-head", children: [
329
+ /* @__PURE__ */ jsxs("div", { children: [
330
+ /* @__PURE__ */ jsx("h3", { children: "Payer billing packet" }),
331
+ /* @__PURE__ */ jsx("p", { children: "Review exactly what will be sent with this bill." })
332
+ ] }),
333
+ /* @__PURE__ */ jsxs("span", { children: [
334
+ data.bill.attachments.length,
335
+ " files"
336
+ ] })
337
+ ] }),
338
+ /* @__PURE__ */ jsxs("div", { className: "mb-native-note", children: [
339
+ /* @__PURE__ */ jsx("strong", { children: "Separate from attorney report service." }),
340
+ " Final reports, proof of service, and required billing forms may be preselected. Medical records are never silently attached."
341
+ ] }),
342
+ /* @__PURE__ */ jsx("ul", { className: "mb-native-documents", children: data.bill.attachments.map((attachment) => /* @__PURE__ */ jsxs("li", { children: [
343
+ /* @__PURE__ */ jsx("span", { className: "mb-native-file", children: "PDF" }),
344
+ /* @__PURE__ */ jsxs("div", { children: [
345
+ /* @__PURE__ */ jsx("strong", { children: attachment.filename }),
346
+ /* @__PURE__ */ jsx("span", { children: DOCUMENT_LABELS[attachment.documentType] || attachment.description || "Supporting document" })
347
+ ] }),
348
+ onOpenAttachment ? /* @__PURE__ */ jsx("button", { type: "button", className: "mb-native-button quiet", onClick: () => onOpenAttachment(attachment), children: "View" }) : null,
349
+ /* @__PURE__ */ jsx("button", { type: "button", className: "mb-native-remove", disabled: !editable || busy === "attachment", "aria-label": `Remove ${attachment.filename}`, onClick: () => void onRemoveAttachment(attachment.id).catch((cause) => setError(cause instanceof Error ? cause.message : "Document could not be removed.")), children: "\xD7" })
350
+ ] }, attachment.id)) }),
351
+ /* @__PURE__ */ jsxs("div", { className: "mb-native-attach", children: [
352
+ /* @__PURE__ */ jsxs("div", { children: [
353
+ /* @__PURE__ */ jsx("strong", { children: "Add supporting PDF" }),
354
+ /* @__PURE__ */ jsx("span", { children: "Choose any additional document intentionally. Up to 25 MB." })
355
+ ] }),
356
+ /* @__PURE__ */ jsx("select", { "aria-label": "Document type", value: documentType, disabled: !editable, onChange: (event) => setDocumentType(event.target.value), children: Object.entries(DOCUMENT_LABELS).map(([value, label]) => /* @__PURE__ */ jsx("option", { value, children: label }, value)) }),
357
+ /* @__PURE__ */ jsx("input", { "aria-label": "Choose supporting PDF", type: "file", accept: "application/pdf,.pdf", disabled: !editable, onChange: (event) => setFile(event.target.files?.[0] || null) }),
358
+ /* @__PURE__ */ jsx("button", { className: "mb-native-button secondary", type: "button", disabled: !editable || !file || busy === "attachment", onClick: () => void attach(), children: busy === "attachment" ? "Attaching\u2026" : "Attach document" })
359
+ ] })
360
+ ] }),
361
+ /* @__PURE__ */ jsxs("section", { className: "mb-native-submit", children: [
362
+ /* @__PURE__ */ jsxs("div", { children: [
363
+ /* @__PURE__ */ jsx("span", { className: "mb-native-eyebrow", children: "Delivery" }),
364
+ /* @__PURE__ */ jsx("h3", { children: "Submit this bill" }),
365
+ /* @__PURE__ */ jsx("p", { children: "MindBill will send the claim and own status, payment, denial, and resubmission." })
366
+ ] }),
367
+ /* @__PURE__ */ jsxs("fieldset", { children: [
368
+ /* @__PURE__ */ jsx("legend", { children: "Send via" }),
369
+ ["ebill", "fax", "mail", "email"].map((value) => /* @__PURE__ */ jsxs("label", { children: [
370
+ /* @__PURE__ */ jsx("input", { type: "radio", name: routeName, value, checked: route === value, onChange: () => setRoute(value) }),
371
+ value === "ebill" ? "E-bill" : value.charAt(0).toUpperCase() + value.slice(1)
372
+ ] }, value))
373
+ ] }),
374
+ error ? /* @__PURE__ */ jsx("div", { className: "mb-native-message error", role: "alert", children: error }) : null,
375
+ notice ? /* @__PURE__ */ jsx("div", { className: "mb-native-message success", role: "status", children: notice }) : null,
376
+ /* @__PURE__ */ jsxs("div", { className: "mb-native-actions", children: [
377
+ /* @__PURE__ */ jsx("button", { className: "mb-native-button secondary", type: "submit", disabled: !editable || busy !== "", children: busy === "save" ? "Saving\u2026" : "Save changes" }),
378
+ /* @__PURE__ */ jsx("button", { className: "mb-native-button primary", type: "button", disabled: !editable || !canSubmit || busy !== "", onClick: () => void handleSubmit(), children: busy === "submit" ? "Submitting\u2026" : "Submit bill" })
379
+ ] })
380
+ ] })
381
+ ]
382
+ }
383
+ );
384
+ }
385
+ function BillStatusSummary({ status, submittedAt, totalCharge, totalPaid, balanceDue, className, style, appearance }) {
386
+ return /* @__PURE__ */ jsxs("section", { className: ["mb-native-status", className].filter(Boolean).join(" "), style: appearanceStyle(appearance, style), children: [
387
+ /* @__PURE__ */ jsx("style", { children: NATIVE_BILL_REVIEW_STYLES }),
388
+ /* @__PURE__ */ jsxs("div", { children: [
389
+ /* @__PURE__ */ jsx("span", { className: "mb-native-eyebrow", children: "Bill status" }),
390
+ /* @__PURE__ */ jsx("h3", { children: status.replaceAll("_", " ") }),
391
+ submittedAt ? /* @__PURE__ */ jsxs("p", { children: [
392
+ "Submitted ",
393
+ new Date(submittedAt).toLocaleDateString()
394
+ ] }) : null
395
+ ] }),
396
+ /* @__PURE__ */ jsxs("dl", { children: [
397
+ /* @__PURE__ */ jsxs("div", { children: [
398
+ /* @__PURE__ */ jsx("dt", { children: "Charged" }),
399
+ /* @__PURE__ */ jsx("dd", { children: money(totalCharge) })
400
+ ] }),
401
+ /* @__PURE__ */ jsxs("div", { children: [
402
+ /* @__PURE__ */ jsx("dt", { children: "Paid" }),
403
+ /* @__PURE__ */ jsx("dd", { children: money(totalPaid) })
404
+ ] }),
405
+ /* @__PURE__ */ jsxs("div", { children: [
406
+ /* @__PURE__ */ jsx("dt", { children: "Balance" }),
407
+ /* @__PURE__ */ jsx("dd", { children: money(balanceDue) })
408
+ ] })
409
+ ] })
410
+ ] });
411
+ }
412
+ var NATIVE_BILL_REVIEW_STYLES = `
413
+ .mb-native-review,.mb-native-status{font-family:var(--mb-font,Inter,ui-sans-serif,system-ui,sans-serif)}
414
+ .mb-native-review,.mb-native-status{--mb-accent:#238dbd;--mb-accent-dark:#176f98;--mb-text:#203743;--mb-muted:#657982;--mb-border:#dbe6ea;--mb-soft:#f3f8fa;--mb-surface:#fff;color:var(--mb-text);font:14px/1.45 Inter,ui-sans-serif,system-ui,sans-serif}.mb-native-review *,.mb-native-status *{box-sizing:border-box}.mb-native-review{display:grid;gap:16px}.mb-native-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;padding:6px 2px}.mb-native-heading h2,.mb-native-section h3,.mb-native-submit h3,.mb-native-status h3{margin:3px 0 2px;line-height:1.2}.mb-native-heading h2{font-size:25px}.mb-native-heading p,.mb-native-section p,.mb-native-submit p,.mb-native-status p{margin:0;color:var(--mb-muted)}.mb-native-eyebrow{color:#59727d;font-size:11px;font-weight:800;letter-spacing:.14em;text-transform:uppercase}.mb-native-total{display:flex;align-items:center;gap:18px}.mb-native-total span,.mb-native-section-head>span{border-radius:999px;background:var(--mb-soft);color:#58717c;font-size:11px;font-weight:800;padding:6px 10px;text-transform:capitalize}.mb-native-total strong{font-size:24px}.mb-native-summary{display:grid;grid-template-columns:repeat(4,1fr);margin:0;border:1px solid var(--mb-border);border-radius:12px;background:var(--mb-surface);overflow:hidden}.mb-native-summary div{padding:17px 20px;border-right:1px solid var(--mb-border)}.mb-native-summary div:last-child{border:0}.mb-native-summary dt,.mb-native-allowed span{color:#647982;font-size:10px;font-weight:800;letter-spacing:.12em;text-transform:uppercase}.mb-native-summary dd{margin:5px 0 0;font-weight:750}.mb-native-section{padding:20px;border:1px solid var(--mb-border);border-radius:14px;background:var(--mb-surface);box-shadow:0 8px 24px rgba(28,58,72,.04)}.mb-native-section-head{display:flex;align-items:start;justify-content:space-between;gap:16px;margin-bottom:17px}.mb-native-section h3,.mb-native-submit h3,.mb-native-status h3{font-size:19px}.mb-native-grid{display:grid;gap:14px}.mb-native-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.mb-native-field{display:grid;gap:6px;min-width:0;color:var(--mb-text);font-size:12px;font-weight:750}.mb-native-field small{color:var(--mb-muted);font-size:inherit;font-weight:500}.mb-native-field input,.mb-native-attach select,.mb-native-attach input{width:100%;min-height:43px;border:1px solid var(--mb-border);border-radius:8px;background:#fff;color:var(--mb-text);font:inherit;padding:10px 12px}.mb-native-field input:focus,.mb-native-attach select:focus,.mb-native-attach input:focus{border-color:var(--mb-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--mb-accent) 14%,transparent);outline:0}.mb-native-lines{display:grid;gap:10px}.mb-native-line{display:grid;grid-template-columns:1.1fr 1.1fr 110px 120px 28px;align-items:end;gap:12px;padding:13px;background:var(--mb-soft);border:1px solid #e3edf0;border-radius:10px}.mb-native-allowed{display:grid;gap:5px;padding:0 8px 11px;text-align:right}.mb-native-allowed strong{font-size:16px}.mb-native-remove{border:0;background:transparent;color:#667d86;cursor:pointer;font-size:20px;padding:7px}.mb-native-note{padding:13px 15px;border:1px solid #bdd9e4;border-radius:9px;background:#f2f9fc;color:#526d78}.mb-native-note strong{color:var(--mb-text);margin-right:12px}.mb-native-documents{list-style:none;margin:14px 0;padding:0}.mb-native-documents li{display:grid;grid-template-columns:42px 1fr auto 28px;align-items:center;gap:12px;padding:12px 4px;border-bottom:1px solid var(--mb-border)}.mb-native-documents li>div{display:grid}.mb-native-documents li span{color:var(--mb-muted);font-size:12px}.mb-native-file{display:grid;place-items:center;width:40px;height:40px;border-radius:8px;background:#eaf5f9;color:var(--mb-accent)!important;font-size:11px!important;font-weight:850}.mb-native-attach{display:grid;grid-template-columns:1fr 230px minmax(220px,1fr) auto;align-items:end;gap:12px;padding:15px;border-radius:10px;background:var(--mb-soft)}.mb-native-attach>div{display:grid;gap:3px}.mb-native-attach span{color:var(--mb-muted);font-size:12px}.mb-native-button{min-height:40px;border:1px solid var(--mb-border);border-radius:8px;background:#fff;color:var(--mb-text);cursor:pointer;font:inherit;font-weight:750;padding:9px 14px}.mb-native-button.primary{border-color:var(--mb-accent);background:var(--mb-accent);color:#fff}.mb-native-button.primary:hover{background:var(--mb-accent-dark)}.mb-native-button.secondary{background:#fff}.mb-native-button.quiet{min-height:auto;background:var(--mb-soft);padding:7px 11px}.mb-native-button:disabled,.mb-native-remove:disabled{cursor:not-allowed;opacity:.5}.mb-native-submit{display:grid;grid-template-columns:1fr auto;align-items:end;gap:18px;padding:22px;border:1px solid #bcd8e2;border-radius:14px;background:linear-gradient(135deg,#f3fafc,#eaf6fa)}.mb-native-submit fieldset{display:flex;gap:6px;margin:0;padding:0;border:0}.mb-native-submit legend{position:absolute;width:1px;height:1px;overflow:hidden}.mb-native-submit fieldset label{display:flex;align-items:center;gap:6px;padding:9px 11px;border:1px solid #c9dce3;border-radius:8px;background:#fff;font-weight:700}.mb-native-actions{display:flex;justify-content:flex-end;gap:10px;grid-column:1/-1}.mb-native-message{grid-column:1/-1;padding:10px 12px;border-radius:8px}.mb-native-message.error{background:#fff0ef;color:#9d3029}.mb-native-message.success{background:#edf9f2;color:#217449}.mb-native-status{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px;border:1px solid var(--mb-border);border-radius:12px;background:#fff}.mb-native-status h3{text-transform:capitalize}.mb-native-status dl{display:flex;margin:0}.mb-native-status dl div{min-width:110px;padding:0 18px;border-left:1px solid var(--mb-border)}.mb-native-status dt{color:var(--mb-muted);font-size:11px}.mb-native-status dd{margin:4px 0 0;font-size:17px;font-weight:800}@media(max-width:900px){.mb-native-grid.three{grid-template-columns:repeat(2,minmax(0,1fr))}.mb-native-summary{grid-template-columns:repeat(2,1fr)}.mb-native-summary div:nth-child(2){border-right:0}.mb-native-summary div:nth-child(-n+2){border-bottom:1px solid var(--mb-border)}.mb-native-line{grid-template-columns:1fr 1fr 90px}.mb-native-allowed{align-self:center}.mb-native-attach{grid-template-columns:1fr 1fr}.mb-native-submit{grid-template-columns:1fr}.mb-native-submit fieldset,.mb-native-actions{grid-column:1}.mb-native-actions{justify-content:start}}@media(max-width:620px){.mb-native-heading,.mb-native-total,.mb-native-status{align-items:start;flex-direction:column}.mb-native-grid.three,.mb-native-summary,.mb-native-line,.mb-native-attach{grid-template-columns:1fr}.mb-native-summary div,.mb-native-summary div:nth-child(2){border-right:0;border-bottom:1px solid var(--mb-border)}.mb-native-line{align-items:stretch}.mb-native-allowed{text-align:left}.mb-native-submit fieldset{display:grid;grid-template-columns:1fr 1fr}.mb-native-status dl{width:100%}.mb-native-status dl div{min-width:0;flex:1;padding:0 10px}.mb-native-status dl div:first-child{padding-left:0;border-left:0}}
415
+ .mb-native-review,.mb-native-status{font-family:var(--mb-font,Inter,ui-sans-serif,system-ui,sans-serif)}
416
+ `;
417
+
418
+ // src/index.tsx
6
419
  function widget(tagName, props) {
7
420
  const ref = useRef(null);
8
421
  const { onMindBill, onMindBillError } = props;
9
- useEffect(() => {
422
+ useEffect2(() => {
10
423
  const element = ref.current;
11
424
  if (!element) return;
12
425
  const handleEvent = (event) => onMindBill?.(event);
@@ -24,6 +437,13 @@ function widget(tagName, props) {
24
437
  "embed-url": props.embedUrl,
25
438
  theme: props.appearance?.theme,
26
439
  "accent-color": props.appearance?.accentColor,
440
+ "background-color": props.appearance?.backgroundColor,
441
+ "surface-color": props.appearance?.surfaceColor,
442
+ "text-color": props.appearance?.textColor,
443
+ "muted-color": props.appearance?.mutedColor,
444
+ "border-color": props.appearance?.borderColor,
445
+ "font-family": props.appearance?.fontFamily,
446
+ "border-radius": props.appearance?.borderRadius,
27
447
  locale: props.appearance?.locale,
28
448
  class: props.className,
29
449
  style: props.style
@@ -50,6 +470,8 @@ var HostedBillFromReport = MindBillBillFromReport;
50
470
  var HostedCollections = MindBillCollections;
51
471
  var HostedOnboarding = MindBillOnboarding;
52
472
  export {
473
+ BillReviewForm,
474
+ BillStatusSummary,
53
475
  HostedBillFromReport,
54
476
  HostedBillReview,
55
477
  HostedBillTimeline,
@@ -59,6 +481,7 @@ export {
59
481
  MindBillBillReview,
60
482
  MindBillBillTimeline,
61
483
  MindBillCollections,
62
- MindBillOnboarding
484
+ MindBillOnboarding,
485
+ buildBillReviewSaveInput
63
486
  };
64
487
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.tsx"],"sourcesContent":["\"use client\";\n\nimport \"@mindbill/embed\";\nimport type { CSSProperties, ReactElement } from \"react\";\nimport { createElement, useEffect, useRef } from \"react\";\nimport type {\n MindBillAppearance,\n MindBillErrorDetail,\n MindBillEventDetail,\n} from \"@mindbill/embed\";\n\nexport type MindBillWidgetProps = {\n sessionToken: string;\n embedUrl: string;\n appearance?: MindBillAppearance;\n className?: string;\n style?: CSSProperties;\n onMindBill?: (event: CustomEvent<MindBillEventDetail>) => void;\n onMindBillError?: (event: CustomEvent<MindBillErrorDetail>) => void;\n};\n\nfunction widget(tagName: string, props: MindBillWidgetProps): ReactElement {\n const ref = useRef<HTMLElement | null>(null);\n const { onMindBill, onMindBillError } = props;\n useEffect(() => {\n const element = ref.current;\n if (!element) return;\n const handleEvent = (event: Event) =>\n onMindBill?.(event as CustomEvent<MindBillEventDetail>);\n const handleError = (event: Event) =>\n onMindBillError?.(event as CustomEvent<MindBillErrorDetail>);\n element.addEventListener(\"mindbill\", handleEvent);\n element.addEventListener(\"mindbill-error\", handleError);\n return () => {\n element.removeEventListener(\"mindbill\", handleEvent);\n element.removeEventListener(\"mindbill-error\", handleError);\n };\n }, [onMindBill, onMindBillError]);\n\n return createElement(tagName, {\n ref,\n \"session-token\": props.sessionToken,\n \"embed-url\": props.embedUrl,\n theme: props.appearance?.theme,\n \"accent-color\": props.appearance?.accentColor,\n locale: props.appearance?.locale,\n class: props.className,\n style: props.style,\n });\n}\n\nexport function MindBillBillTimeline(props: MindBillWidgetProps): ReactElement {\n return widget(\"mindbill-bill-timeline\", props);\n}\nexport function MindBillBillReview(props: MindBillWidgetProps): ReactElement {\n return widget(\"mindbill-bill-review\", props);\n}\nexport function MindBillBillFromReport(\n props: MindBillWidgetProps,\n): ReactElement {\n return widget(\"mindbill-bill-from-report\", props);\n}\nexport function MindBillCollections(props: MindBillWidgetProps): ReactElement {\n return widget(\"mindbill-collections\", props);\n}\nexport function MindBillOnboarding(props: MindBillWidgetProps): ReactElement {\n return widget(\"mindbill-onboarding\", props);\n}\n\nexport const HostedBillTimeline = MindBillBillTimeline;\nexport const HostedBillReview = MindBillBillReview;\nexport const HostedBillFromReport = MindBillBillFromReport;\nexport const HostedCollections = MindBillCollections;\nexport const HostedOnboarding = MindBillOnboarding;\n\nexport type {\n MindBillAppearance,\n MindBillErrorDetail,\n MindBillEventDetail,\n} from \"@mindbill/embed\";\n"],"mappings":";;;AAEA,OAAO;AAEP,SAAS,eAAe,WAAW,cAAc;AAiBjD,SAAS,OAAO,SAAiB,OAA0C;AACzE,QAAM,MAAM,OAA2B,IAAI;AAC3C,QAAM,EAAE,YAAY,gBAAgB,IAAI;AACxC,YAAU,MAAM;AACd,UAAM,UAAU,IAAI;AACpB,QAAI,CAAC,QAAS;AACd,UAAM,cAAc,CAAC,UACnB,aAAa,KAAyC;AACxD,UAAM,cAAc,CAAC,UACnB,kBAAkB,KAAyC;AAC7D,YAAQ,iBAAiB,YAAY,WAAW;AAChD,YAAQ,iBAAiB,kBAAkB,WAAW;AACtD,WAAO,MAAM;AACX,cAAQ,oBAAoB,YAAY,WAAW;AACnD,cAAQ,oBAAoB,kBAAkB,WAAW;AAAA,IAC3D;AAAA,EACF,GAAG,CAAC,YAAY,eAAe,CAAC;AAEhC,SAAO,cAAc,SAAS;AAAA,IAC5B;AAAA,IACA,iBAAiB,MAAM;AAAA,IACvB,aAAa,MAAM;AAAA,IACnB,OAAO,MAAM,YAAY;AAAA,IACzB,gBAAgB,MAAM,YAAY;AAAA,IAClC,QAAQ,MAAM,YAAY;AAAA,IAC1B,OAAO,MAAM;AAAA,IACb,OAAO,MAAM;AAAA,EACf,CAAC;AACH;AAEO,SAAS,qBAAqB,OAA0C;AAC7E,SAAO,OAAO,0BAA0B,KAAK;AAC/C;AACO,SAAS,mBAAmB,OAA0C;AAC3E,SAAO,OAAO,wBAAwB,KAAK;AAC7C;AACO,SAAS,uBACd,OACc;AACd,SAAO,OAAO,6BAA6B,KAAK;AAClD;AACO,SAAS,oBAAoB,OAA0C;AAC5E,SAAO,OAAO,wBAAwB,KAAK;AAC7C;AACO,SAAS,mBAAmB,OAA0C;AAC3E,SAAO,OAAO,uBAAuB,KAAK;AAC5C;AAEO,IAAM,qBAAqB;AAC3B,IAAM,mBAAmB;AACzB,IAAM,uBAAuB;AAC7B,IAAM,oBAAoB;AAC1B,IAAM,mBAAmB;","names":[]}
1
+ {"version":3,"sources":["../src/index.tsx","../src/native-bill-review.tsx"],"sourcesContent":["\"use client\";\n\nimport \"@mindbill/embed\";\nimport type { CSSProperties, ReactElement } from \"react\";\nimport { createElement, useEffect, useRef } from \"react\";\nimport type {\n MindBillAppearance,\n MindBillErrorDetail,\n MindBillEventDetail,\n} from \"@mindbill/embed\";\n\nexport type MindBillWidgetProps = {\n sessionToken: string;\n embedUrl: string;\n appearance?: MindBillAppearance;\n className?: string;\n style?: CSSProperties;\n onMindBill?: (event: CustomEvent<MindBillEventDetail>) => void;\n onMindBillError?: (event: CustomEvent<MindBillErrorDetail>) => void;\n};\n\nfunction widget(tagName: string, props: MindBillWidgetProps): ReactElement {\n const ref = useRef<HTMLElement | null>(null);\n const { onMindBill, onMindBillError } = props;\n useEffect(() => {\n const element = ref.current;\n if (!element) return;\n const handleEvent = (event: Event) =>\n onMindBill?.(event as CustomEvent<MindBillEventDetail>);\n const handleError = (event: Event) =>\n onMindBillError?.(event as CustomEvent<MindBillErrorDetail>);\n element.addEventListener(\"mindbill\", handleEvent);\n element.addEventListener(\"mindbill-error\", handleError);\n return () => {\n element.removeEventListener(\"mindbill\", handleEvent);\n element.removeEventListener(\"mindbill-error\", handleError);\n };\n }, [onMindBill, onMindBillError]);\n\n return createElement(tagName, {\n ref,\n \"session-token\": props.sessionToken,\n \"embed-url\": props.embedUrl,\n theme: props.appearance?.theme,\n \"accent-color\": props.appearance?.accentColor,\n \"background-color\": props.appearance?.backgroundColor,\n \"surface-color\": props.appearance?.surfaceColor,\n \"text-color\": props.appearance?.textColor,\n \"muted-color\": props.appearance?.mutedColor,\n \"border-color\": props.appearance?.borderColor,\n \"font-family\": props.appearance?.fontFamily,\n \"border-radius\": props.appearance?.borderRadius,\n locale: props.appearance?.locale,\n class: props.className,\n style: props.style,\n });\n}\n\nexport function MindBillBillTimeline(props: MindBillWidgetProps): ReactElement {\n return widget(\"mindbill-bill-timeline\", props);\n}\nexport function MindBillBillReview(props: MindBillWidgetProps): ReactElement {\n return widget(\"mindbill-bill-review\", props);\n}\nexport function MindBillBillFromReport(\n props: MindBillWidgetProps,\n): ReactElement {\n return widget(\"mindbill-bill-from-report\", props);\n}\nexport function MindBillCollections(props: MindBillWidgetProps): ReactElement {\n return widget(\"mindbill-collections\", props);\n}\nexport function MindBillOnboarding(props: MindBillWidgetProps): ReactElement {\n return widget(\"mindbill-onboarding\", props);\n}\n\nexport const HostedBillTimeline = MindBillBillTimeline;\nexport const HostedBillReview = MindBillBillReview;\nexport const HostedBillFromReport = MindBillBillFromReport;\nexport const HostedCollections = MindBillCollections;\nexport const HostedOnboarding = MindBillOnboarding;\n\nexport type {\n MindBillAppearance,\n MindBillErrorDetail,\n MindBillEventDetail,\n} from \"@mindbill/embed\";\n\nexport {\n BillReviewForm,\n BillStatusSummary,\n buildBillReviewSaveInput,\n} from \"./native-bill-review\";\nexport type {\n BillReviewAttachment,\n BillReviewBillingProvider,\n BillReviewClinician,\n BillReviewData,\n BillReviewDocumentType,\n BillReviewDraft,\n BillReviewFormProps,\n BillReviewLineItem,\n BillReviewLocation,\n BillReviewSaveInput,\n BillStatusSummaryProps,\n BillSubmissionRoute,\n} from \"./native-bill-review\";\n","\"use client\";\n\nimport type { MindBillAppearance } from \"@mindbill/embed\";\nimport type { CSSProperties, FormEvent, ReactElement } from \"react\";\nimport { useEffect, useId, useMemo, useState } from \"react\";\n\nexport type BillReviewDocumentType =\n | \"final_report\"\n | \"letter_of_attestation\"\n | \"proof_of_service\"\n | \"form_122\"\n | \"return_to_work_voucher\"\n | \"w9\"\n | \"medical_records\"\n | \"appeal\"\n | \"other\";\n\nexport type BillReviewBillingProvider = {\n id?: string;\n name: string;\n taxId: string;\n npi: string;\n billType: \"Professional\" | \"Institutional\";\n phone?: string;\n billingStreet?: string;\n billingCity?: string;\n billingState?: string;\n billingZip?: string;\n};\n\nexport type BillReviewClinician = {\n id?: string;\n name: string;\n specialty: string;\n npi: string;\n taxonomy?: string;\n licenseNumber?: string;\n licenseState?: string;\n signaturePng?: string;\n signatureKey?: string;\n isQME?: boolean;\n isAME?: boolean;\n email?: string;\n active?: boolean;\n};\n\nexport type BillReviewLocation = {\n id?: string;\n billingProviderId?: string;\n name: string;\n nickname?: string;\n street: string;\n city: string;\n state: string;\n zip: string;\n county?: string;\n posCode?: string;\n isPrimary?: boolean;\n active?: boolean;\n};\n\nexport type BillReviewLineItem = {\n id?: string;\n code: string;\n modifiers: string[];\n units: number;\n charge: number;\n feeSchedule?: number;\n};\n\nexport type BillReviewAttachment = {\n id: string;\n filename: string;\n description?: string | null;\n documentType: string;\n reportType?: string | null;\n source?: string;\n addedAt?: string;\n contentUrl?: string;\n};\n\nexport type BillReviewData = {\n bill: {\n id: string;\n billNumber: string | number;\n status: string;\n transmissionState?: string;\n dos: string;\n dosEnd?: string | null;\n placeOfServiceId?: string;\n authorizationNumber?: string | null;\n billingProviderId?: string;\n renderingProviderId?: string;\n billingSnapshot?: {\n billingProvider?: BillReviewBillingProvider;\n renderingProvider?: BillReviewClinician;\n placeOfService?: BillReviewLocation;\n } | null;\n lineItems: BillReviewLineItem[];\n attachments: BillReviewAttachment[];\n totalCharge: number;\n totalPaid: number;\n balanceDue: number;\n };\n patient: { name: string; dob?: string };\n injury: {\n claimNumber?: string;\n employer?: string;\n doi?: string;\n claimsAdminId?: string;\n };\n options?: {\n billingProviders?: BillReviewBillingProvider[];\n renderingProviders?: BillReviewClinician[];\n locations?: BillReviewLocation[];\n };\n};\n\nexport type BillReviewSaveInput = {\n dos: string;\n dosEnd?: string | null;\n authorizationNumber?: string | null;\n billingProviderId?: string;\n billingProvider?: Omit<BillReviewBillingProvider, \"id\">;\n renderingProviderId?: string;\n renderingProvider?: Omit<BillReviewClinician, \"id\">;\n placeOfServiceId?: string;\n placeOfService?: Omit<BillReviewLocation, \"id\">;\n lineItems: Array<{\n id?: string;\n code: string;\n modifiers: string[];\n units: number;\n }>;\n};\n\nexport type BillSubmissionRoute = \"ebill\" | \"fax\" | \"mail\" | \"email\";\n\nexport type BillReviewFormProps = {\n data: BillReviewData;\n onSave: (input: BillReviewSaveInput) => Promise<BillReviewData | void>;\n onSubmit: (\n input: BillReviewSaveInput,\n route: BillSubmissionRoute,\n ) => Promise<void>;\n onAddAttachment: (\n file: File,\n documentType: BillReviewDocumentType,\n description?: string,\n ) => Promise<void>;\n onRemoveAttachment: (attachmentId: string) => Promise<void>;\n onOpenAttachment?: (attachment: BillReviewAttachment) => void;\n className?: string;\n style?: CSSProperties;\n appearance?: MindBillAppearance;\n disabled?: boolean;\n};\n\nexport type BillReviewDraft = {\n dos: string;\n dosEnd: string;\n authorizationNumber: string;\n billingProvider: BillReviewBillingProvider;\n clinician: BillReviewClinician;\n location: BillReviewLocation;\n lineItems: BillReviewLineItem[];\n};\n\nconst EMPTY_BILLING_PROVIDER: BillReviewBillingProvider = {\n name: \"\",\n taxId: \"\",\n npi: \"\",\n billType: \"Professional\",\n};\nconst EMPTY_CLINICIAN: BillReviewClinician = {\n name: \"\",\n specialty: \"\",\n npi: \"\",\n};\nconst EMPTY_LOCATION: BillReviewLocation = {\n name: \"\",\n street: \"\",\n city: \"\",\n state: \"\",\n zip: \"\",\n posCode: \"11\",\n};\n\nconst DOCUMENT_LABELS: Record<BillReviewDocumentType, string> = {\n final_report: \"Final medical-legal report\",\n letter_of_attestation: \"Letter of attestation\",\n proof_of_service: \"Proof of service\",\n form_122: \"DWC Form 122\",\n return_to_work_voucher: \"Return-to-work voucher\",\n w9: \"W-9\",\n medical_records: \"Medical records\",\n appeal: \"Appeal or review support\",\n other: \"Other supporting document\",\n};\n\nfunction withoutId<T extends { id?: string }>(value: T): Omit<T, \"id\"> {\n const result = { ...value };\n delete result.id;\n return result;\n}\n\nfunction toDraft(data: BillReviewData): BillReviewDraft {\n const snapshot = data.bill.billingSnapshot;\n return {\n dos: data.bill.dos || \"\",\n dosEnd: data.bill.dosEnd || \"\",\n authorizationNumber: data.bill.authorizationNumber || \"\",\n billingProvider: {\n ...EMPTY_BILLING_PROVIDER,\n ...(snapshot?.billingProvider ?? {}),\n },\n clinician: { ...EMPTY_CLINICIAN, ...(snapshot?.renderingProvider ?? {}) },\n location: { ...EMPTY_LOCATION, ...(snapshot?.placeOfService ?? {}) },\n lineItems: data.bill.lineItems.map((line) => ({ ...line })),\n };\n}\n\nexport function buildBillReviewSaveInput(\n draft: BillReviewDraft,\n): BillReviewSaveInput {\n return {\n dos: draft.dos,\n dosEnd: draft.dosEnd || null,\n authorizationNumber: draft.authorizationNumber.trim() || null,\n ...(draft.billingProvider.id\n ? { billingProviderId: draft.billingProvider.id }\n : {}),\n billingProvider: withoutId(draft.billingProvider),\n ...(draft.clinician.id\n ? { renderingProviderId: draft.clinician.id }\n : {}),\n renderingProvider: withoutId(draft.clinician),\n ...(draft.location.id ? { placeOfServiceId: draft.location.id } : {}),\n placeOfService: withoutId(draft.location),\n lineItems: draft.lineItems.map(({ id, code, modifiers, units }) => ({\n ...(id ? { id } : {}),\n code: code.trim().toUpperCase(),\n modifiers,\n units,\n })),\n };\n}\n\nfunction money(value: number): string {\n return new Intl.NumberFormat(\"en-US\", {\n style: \"currency\",\n currency: \"USD\",\n }).format(value);\n}\n\nfunction appearanceStyle(\n appearance: MindBillAppearance | undefined,\n style: CSSProperties | undefined,\n): CSSProperties {\n return {\n ...(appearance?.accentColor\n ? { \"--mb-accent\": appearance.accentColor }\n : {}),\n ...(appearance?.textColor ? { \"--mb-text\": appearance.textColor } : {}),\n ...(appearance?.mutedColor\n ? { \"--mb-muted\": appearance.mutedColor }\n : {}),\n ...(appearance?.borderColor\n ? { \"--mb-border\": appearance.borderColor }\n : {}),\n ...(appearance?.backgroundColor\n ? { \"--mb-soft\": appearance.backgroundColor }\n : {}),\n ...(appearance?.surfaceColor\n ? { \"--mb-surface\": appearance.surfaceColor }\n : {}),\n ...(appearance?.fontFamily\n ? { \"--mb-font\": appearance.fontFamily }\n : {}),\n ...style,\n } as CSSProperties;\n}\n\nfunction Field({\n label,\n value,\n onChange,\n type = \"text\",\n optional,\n required,\n}: {\n label: string;\n value: string;\n onChange: (value: string) => void;\n type?: string;\n optional?: boolean;\n required?: boolean;\n}): ReactElement {\n return (\n <label className=\"mb-native-field\">\n <span>\n {label} {optional ? <small>Optional</small> : null}\n </span>\n <input\n type={type}\n value={value}\n required={required}\n onChange={(event) => onChange(event.target.value)}\n />\n </label>\n );\n}\n\nexport function BillReviewForm({\n data,\n onSave,\n onSubmit,\n onAddAttachment,\n onRemoveAttachment,\n onOpenAttachment,\n className,\n style,\n appearance,\n disabled = false,\n}: BillReviewFormProps): ReactElement {\n const [draft, setDraft] = useState(() => toDraft(data));\n const [route, setRoute] = useState<BillSubmissionRoute>(\"ebill\");\n const [file, setFile] = useState<File | null>(null);\n const [documentType, setDocumentType] =\n useState<BillReviewDocumentType>(\"other\");\n const [busy, setBusy] = useState<\"save\" | \"submit\" | \"attachment\" | \"\">(\"\");\n const [error, setError] = useState(\"\");\n const [notice, setNotice] = useState(\"\");\n const routeName = useId();\n const editable = data.bill.status === \"incomplete\" && !disabled;\n\n useEffect(() => setDraft(toDraft(data)), [data]);\n\n const canSubmit = useMemo(\n () =>\n Boolean(\n draft.dos &&\n draft.billingProvider.name.trim() &&\n draft.billingProvider.taxId.trim() &&\n draft.billingProvider.npi.trim() &&\n draft.clinician.name.trim() &&\n draft.clinician.npi.trim() &&\n draft.location.name.trim() &&\n draft.location.street.trim() &&\n draft.location.city.trim() &&\n draft.location.state.trim() &&\n draft.location.zip.trim() &&\n draft.lineItems.length &&\n draft.lineItems.every((line) => line.code.trim() && line.units > 0),\n ),\n [draft],\n );\n\n const updateBillingProvider = <K extends keyof BillReviewBillingProvider>(\n key: K,\n value: BillReviewBillingProvider[K],\n ) =>\n setDraft((current) => ({\n ...current,\n billingProvider: { ...current.billingProvider, [key]: value },\n }));\n const updateClinician = <K extends keyof BillReviewClinician>(\n key: K,\n value: BillReviewClinician[K],\n ) =>\n setDraft((current) => ({\n ...current,\n clinician: { ...current.clinician, [key]: value },\n }));\n const updateLocation = <K extends keyof BillReviewLocation>(\n key: K,\n value: BillReviewLocation[K],\n ) =>\n setDraft((current) => ({\n ...current,\n location: { ...current.location, [key]: value },\n }));\n\n async function run(action: \"save\" | \"submit\", task: () => Promise<void>) {\n setBusy(action);\n setError(\"\");\n setNotice(\"\");\n try {\n await task();\n setNotice(action === \"save\" ? \"Changes saved.\" : \"Bill submitted.\");\n } catch (cause) {\n setError(\n cause instanceof Error ? cause.message : \"MindBill could not complete this request.\",\n );\n } finally {\n setBusy(\"\");\n }\n }\n\n const handleSave = (event: FormEvent) => {\n event.preventDefault();\n void run(\"save\", async () => {\n const updated = await onSave(buildBillReviewSaveInput(draft));\n if (updated) setDraft(toDraft(updated));\n });\n };\n\n const handleSubmit = () =>\n run(\"submit\", () => onSubmit(buildBillReviewSaveInput(draft), route));\n\n const attach = async () => {\n if (!file) return;\n setBusy(\"attachment\");\n setError(\"\");\n try {\n await onAddAttachment(file, documentType, DOCUMENT_LABELS[documentType]);\n setFile(null);\n setDocumentType(\"other\");\n setNotice(\"Document added to the payer packet.\");\n } catch (cause) {\n setError(cause instanceof Error ? cause.message : \"Document could not be attached.\");\n } finally {\n setBusy(\"\");\n }\n };\n\n const sectionClass = \"mb-native-section\";\n return (\n <form\n className={[\"mb-native-review\", className].filter(Boolean).join(\" \")}\n style={appearanceStyle(appearance, style)}\n onSubmit={handleSave}\n >\n <style>{NATIVE_BILL_REVIEW_STYLES}</style>\n <header className=\"mb-native-heading\">\n <div>\n <span className=\"mb-native-eyebrow\">Billing review</span>\n <h2>Bill #{data.bill.billNumber}</h2>\n <p>Review the prefilled claim and payer packet, then submit.</p>\n </div>\n <div className=\"mb-native-total\">\n <span>{data.bill.status}</span>\n <strong>{money(data.bill.totalCharge)}</strong>\n </div>\n </header>\n\n <dl className=\"mb-native-summary\">\n <div><dt>Patient</dt><dd>{data.patient.name || \"—\"}</dd></div>\n <div><dt>Claim</dt><dd>{data.injury.claimNumber || \"—\"}</dd></div>\n <div><dt>Employer</dt><dd>{data.injury.employer || \"—\"}</dd></div>\n <div><dt>Date of injury</dt><dd>{data.injury.doi || \"—\"}</dd></div>\n </dl>\n\n <section className={sectionClass}>\n <div className=\"mb-native-section-head\"><div><h3>Claim and service</h3><p>These values print on the bill.</p></div></div>\n <div className=\"mb-native-grid three\">\n <Field label=\"Date of service\" type=\"date\" required value={draft.dos} onChange={(dos) => setDraft((current) => ({ ...current, dos }))} />\n <Field label=\"End date\" type=\"date\" optional value={draft.dosEnd} onChange={(dosEnd) => setDraft((current) => ({ ...current, dosEnd }))} />\n <Field label=\"Authorization number\" optional value={draft.authorizationNumber} onChange={(authorizationNumber) => setDraft((current) => ({ ...current, authorizationNumber }))} />\n </div>\n </section>\n\n <section className={sectionClass}>\n <div className=\"mb-native-section-head\"><div><h3>Billing practice</h3><p>Payee identity and billing address for this claim.</p></div><span>Prefilled</span></div>\n <div className=\"mb-native-grid three\">\n <Field label=\"Practice name\" required value={draft.billingProvider.name} onChange={(value) => updateBillingProvider(\"name\", value)} />\n <Field label=\"Tax ID\" required value={draft.billingProvider.taxId} onChange={(value) => updateBillingProvider(\"taxId\", value)} />\n <Field label=\"Group NPI\" required value={draft.billingProvider.npi} onChange={(value) => updateBillingProvider(\"npi\", value)} />\n <Field label=\"Phone\" optional value={draft.billingProvider.phone || \"\"} onChange={(value) => updateBillingProvider(\"phone\", value)} />\n <Field label=\"Billing street\" required value={draft.billingProvider.billingStreet || \"\"} onChange={(value) => updateBillingProvider(\"billingStreet\", value)} />\n <Field label=\"City\" required value={draft.billingProvider.billingCity || \"\"} onChange={(value) => updateBillingProvider(\"billingCity\", value)} />\n <Field label=\"State\" required value={draft.billingProvider.billingState || \"\"} onChange={(value) => updateBillingProvider(\"billingState\", value)} />\n <Field label=\"ZIP\" required value={draft.billingProvider.billingZip || \"\"} onChange={(value) => updateBillingProvider(\"billingZip\", value)} />\n </div>\n </section>\n\n <section className={sectionClass}>\n <div className=\"mb-native-section-head\"><div><h3>Clinician</h3><p>Provider identity printed on the claim.</p></div><span>Prefilled</span></div>\n <div className=\"mb-native-grid three\">\n <Field label=\"Clinician name\" required value={draft.clinician.name} onChange={(value) => updateClinician(\"name\", value)} />\n <Field label=\"Specialty\" value={draft.clinician.specialty} onChange={(value) => updateClinician(\"specialty\", value)} />\n <Field label=\"NPI\" required value={draft.clinician.npi} onChange={(value) => updateClinician(\"npi\", value)} />\n <Field label=\"Taxonomy\" optional value={draft.clinician.taxonomy || \"\"} onChange={(value) => updateClinician(\"taxonomy\", value)} />\n <Field label=\"License number\" optional value={draft.clinician.licenseNumber || \"\"} onChange={(value) => updateClinician(\"licenseNumber\", value)} />\n <Field label=\"License state\" optional value={draft.clinician.licenseState || \"\"} onChange={(value) => updateClinician(\"licenseState\", value)} />\n </div>\n </section>\n\n <section className={sectionClass}>\n <div className=\"mb-native-section-head\"><div><h3>Service location</h3><p>The exact place of service for this bill.</p></div><span>Prefilled</span></div>\n <div className=\"mb-native-grid three\">\n <Field label=\"Location name\" required value={draft.location.name} onChange={(value) => updateLocation(\"name\", value)} />\n <Field label=\"Street\" required value={draft.location.street} onChange={(value) => updateLocation(\"street\", value)} />\n <Field label=\"City\" required value={draft.location.city} onChange={(value) => updateLocation(\"city\", value)} />\n <Field label=\"State\" required value={draft.location.state} onChange={(value) => updateLocation(\"state\", value)} />\n <Field label=\"ZIP\" required value={draft.location.zip} onChange={(value) => updateLocation(\"zip\", value)} />\n <Field label=\"Place of service code\" required value={draft.location.posCode || \"11\"} onChange={(value) => updateLocation(\"posCode\", value)} />\n </div>\n </section>\n\n <section className={sectionClass}>\n <div className=\"mb-native-section-head\"><div><h3>Procedure lines</h3><p>MindBill recalculates the allowed amount when changes are saved.</p></div><button type=\"button\" className=\"mb-native-button quiet\" disabled={!editable} onClick={() => setDraft((current) => ({ ...current, lineItems: [...current.lineItems, { code: \"\", modifiers: [], units: 1, charge: 0 }] }))}>+ Add line</button></div>\n <div className=\"mb-native-lines\">\n {draft.lineItems.map((line, index) => (\n <div className=\"mb-native-line\" key={line.id || index}>\n <Field label=\"Procedure\" required value={line.code} onChange={(value) => setDraft((current) => ({ ...current, lineItems: current.lineItems.map((item, itemIndex) => itemIndex === index ? { ...item, code: value } : item) }))} />\n <Field label=\"Modifiers\" value={line.modifiers.join(\", \")} onChange={(value) => setDraft((current) => ({ ...current, lineItems: current.lineItems.map((item, itemIndex) => itemIndex === index ? { ...item, modifiers: value.split(\",\").map((part) => part.trim()).filter(Boolean) } : item) }))} />\n <label className=\"mb-native-field\"><span>Units</span><input type=\"number\" min=\"1\" required value={line.units} onChange={(event) => setDraft((current) => ({ ...current, lineItems: current.lineItems.map((item, itemIndex) => itemIndex === index ? { ...item, units: Number(event.target.value) } : item) }))} /></label>\n <div className=\"mb-native-allowed\"><span>Allowed</span><strong>{money(line.charge)}</strong></div>\n <button type=\"button\" className=\"mb-native-remove\" aria-label={`Remove ${line.code || \"procedure\"}`} disabled={!editable || draft.lineItems.length === 1} onClick={() => setDraft((current) => ({ ...current, lineItems: current.lineItems.filter((_, itemIndex) => itemIndex !== index) }))}>×</button>\n </div>\n ))}\n </div>\n </section>\n\n <section className={sectionClass}>\n <div className=\"mb-native-section-head\"><div><h3>Payer billing packet</h3><p>Review exactly what will be sent with this bill.</p></div><span>{data.bill.attachments.length} files</span></div>\n <div className=\"mb-native-note\"><strong>Separate from attorney report service.</strong> Final reports, proof of service, and required billing forms may be preselected. Medical records are never silently attached.</div>\n <ul className=\"mb-native-documents\">\n {data.bill.attachments.map((attachment) => (\n <li key={attachment.id}>\n <span className=\"mb-native-file\">PDF</span>\n <div><strong>{attachment.filename}</strong><span>{DOCUMENT_LABELS[attachment.documentType as BillReviewDocumentType] || attachment.description || \"Supporting document\"}</span></div>\n {onOpenAttachment ? <button type=\"button\" className=\"mb-native-button quiet\" onClick={() => onOpenAttachment(attachment)}>View</button> : null}\n <button type=\"button\" className=\"mb-native-remove\" disabled={!editable || busy === \"attachment\"} aria-label={`Remove ${attachment.filename}`} onClick={() => void onRemoveAttachment(attachment.id).catch((cause) => setError(cause instanceof Error ? cause.message : \"Document could not be removed.\"))}>×</button>\n </li>\n ))}\n </ul>\n <div className=\"mb-native-attach\">\n <div><strong>Add supporting PDF</strong><span>Choose any additional document intentionally. Up to 25 MB.</span></div>\n <select aria-label=\"Document type\" value={documentType} disabled={!editable} onChange={(event) => setDocumentType(event.target.value as BillReviewDocumentType)}>{Object.entries(DOCUMENT_LABELS).map(([value, label]) => <option key={value} value={value}>{label}</option>)}</select>\n <input aria-label=\"Choose supporting PDF\" type=\"file\" accept=\"application/pdf,.pdf\" disabled={!editable} onChange={(event) => setFile(event.target.files?.[0] || null)} />\n <button className=\"mb-native-button secondary\" type=\"button\" disabled={!editable || !file || busy === \"attachment\"} onClick={() => void attach()}>{busy === \"attachment\" ? \"Attaching…\" : \"Attach document\"}</button>\n </div>\n </section>\n\n <section className=\"mb-native-submit\">\n <div><span className=\"mb-native-eyebrow\">Delivery</span><h3>Submit this bill</h3><p>MindBill will send the claim and own status, payment, denial, and resubmission.</p></div>\n <fieldset><legend>Send via</legend>{([\"ebill\", \"fax\", \"mail\", \"email\"] as const).map((value) => <label key={value}><input type=\"radio\" name={routeName} value={value} checked={route === value} onChange={() => setRoute(value)} />{value === \"ebill\" ? \"E-bill\" : value.charAt(0).toUpperCase() + value.slice(1)}</label>)}</fieldset>\n {error ? <div className=\"mb-native-message error\" role=\"alert\">{error}</div> : null}\n {notice ? <div className=\"mb-native-message success\" role=\"status\">{notice}</div> : null}\n <div className=\"mb-native-actions\">\n <button className=\"mb-native-button secondary\" type=\"submit\" disabled={!editable || busy !== \"\"}>{busy === \"save\" ? \"Saving…\" : \"Save changes\"}</button>\n <button className=\"mb-native-button primary\" type=\"button\" disabled={!editable || !canSubmit || busy !== \"\"} onClick={() => void handleSubmit()}>{busy === \"submit\" ? \"Submitting…\" : \"Submit bill\"}</button>\n </div>\n </section>\n </form>\n );\n}\n\nexport type BillStatusSummaryProps = {\n status: string;\n submittedAt?: string | null;\n totalCharge: number;\n totalPaid: number;\n balanceDue: number;\n className?: string;\n style?: CSSProperties;\n appearance?: MindBillAppearance;\n};\n\nexport function BillStatusSummary({ status, submittedAt, totalCharge, totalPaid, balanceDue, className, style, appearance }: BillStatusSummaryProps): ReactElement {\n return <section className={[\"mb-native-status\", className].filter(Boolean).join(\" \")} style={appearanceStyle(appearance, style)}>\n <style>{NATIVE_BILL_REVIEW_STYLES}</style>\n <div><span className=\"mb-native-eyebrow\">Bill status</span><h3>{status.replaceAll(\"_\", \" \")}</h3>{submittedAt ? <p>Submitted {new Date(submittedAt).toLocaleDateString()}</p> : null}</div>\n <dl><div><dt>Charged</dt><dd>{money(totalCharge)}</dd></div><div><dt>Paid</dt><dd>{money(totalPaid)}</dd></div><div><dt>Balance</dt><dd>{money(balanceDue)}</dd></div></dl>\n </section>;\n}\n\nconst NATIVE_BILL_REVIEW_STYLES = `\n.mb-native-review,.mb-native-status{font-family:var(--mb-font,Inter,ui-sans-serif,system-ui,sans-serif)}\n.mb-native-review,.mb-native-status{--mb-accent:#238dbd;--mb-accent-dark:#176f98;--mb-text:#203743;--mb-muted:#657982;--mb-border:#dbe6ea;--mb-soft:#f3f8fa;--mb-surface:#fff;color:var(--mb-text);font:14px/1.45 Inter,ui-sans-serif,system-ui,sans-serif}.mb-native-review *,.mb-native-status *{box-sizing:border-box}.mb-native-review{display:grid;gap:16px}.mb-native-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;padding:6px 2px}.mb-native-heading h2,.mb-native-section h3,.mb-native-submit h3,.mb-native-status h3{margin:3px 0 2px;line-height:1.2}.mb-native-heading h2{font-size:25px}.mb-native-heading p,.mb-native-section p,.mb-native-submit p,.mb-native-status p{margin:0;color:var(--mb-muted)}.mb-native-eyebrow{color:#59727d;font-size:11px;font-weight:800;letter-spacing:.14em;text-transform:uppercase}.mb-native-total{display:flex;align-items:center;gap:18px}.mb-native-total span,.mb-native-section-head>span{border-radius:999px;background:var(--mb-soft);color:#58717c;font-size:11px;font-weight:800;padding:6px 10px;text-transform:capitalize}.mb-native-total strong{font-size:24px}.mb-native-summary{display:grid;grid-template-columns:repeat(4,1fr);margin:0;border:1px solid var(--mb-border);border-radius:12px;background:var(--mb-surface);overflow:hidden}.mb-native-summary div{padding:17px 20px;border-right:1px solid var(--mb-border)}.mb-native-summary div:last-child{border:0}.mb-native-summary dt,.mb-native-allowed span{color:#647982;font-size:10px;font-weight:800;letter-spacing:.12em;text-transform:uppercase}.mb-native-summary dd{margin:5px 0 0;font-weight:750}.mb-native-section{padding:20px;border:1px solid var(--mb-border);border-radius:14px;background:var(--mb-surface);box-shadow:0 8px 24px rgba(28,58,72,.04)}.mb-native-section-head{display:flex;align-items:start;justify-content:space-between;gap:16px;margin-bottom:17px}.mb-native-section h3,.mb-native-submit h3,.mb-native-status h3{font-size:19px}.mb-native-grid{display:grid;gap:14px}.mb-native-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.mb-native-field{display:grid;gap:6px;min-width:0;color:var(--mb-text);font-size:12px;font-weight:750}.mb-native-field small{color:var(--mb-muted);font-size:inherit;font-weight:500}.mb-native-field input,.mb-native-attach select,.mb-native-attach input{width:100%;min-height:43px;border:1px solid var(--mb-border);border-radius:8px;background:#fff;color:var(--mb-text);font:inherit;padding:10px 12px}.mb-native-field input:focus,.mb-native-attach select:focus,.mb-native-attach input:focus{border-color:var(--mb-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--mb-accent) 14%,transparent);outline:0}.mb-native-lines{display:grid;gap:10px}.mb-native-line{display:grid;grid-template-columns:1.1fr 1.1fr 110px 120px 28px;align-items:end;gap:12px;padding:13px;background:var(--mb-soft);border:1px solid #e3edf0;border-radius:10px}.mb-native-allowed{display:grid;gap:5px;padding:0 8px 11px;text-align:right}.mb-native-allowed strong{font-size:16px}.mb-native-remove{border:0;background:transparent;color:#667d86;cursor:pointer;font-size:20px;padding:7px}.mb-native-note{padding:13px 15px;border:1px solid #bdd9e4;border-radius:9px;background:#f2f9fc;color:#526d78}.mb-native-note strong{color:var(--mb-text);margin-right:12px}.mb-native-documents{list-style:none;margin:14px 0;padding:0}.mb-native-documents li{display:grid;grid-template-columns:42px 1fr auto 28px;align-items:center;gap:12px;padding:12px 4px;border-bottom:1px solid var(--mb-border)}.mb-native-documents li>div{display:grid}.mb-native-documents li span{color:var(--mb-muted);font-size:12px}.mb-native-file{display:grid;place-items:center;width:40px;height:40px;border-radius:8px;background:#eaf5f9;color:var(--mb-accent)!important;font-size:11px!important;font-weight:850}.mb-native-attach{display:grid;grid-template-columns:1fr 230px minmax(220px,1fr) auto;align-items:end;gap:12px;padding:15px;border-radius:10px;background:var(--mb-soft)}.mb-native-attach>div{display:grid;gap:3px}.mb-native-attach span{color:var(--mb-muted);font-size:12px}.mb-native-button{min-height:40px;border:1px solid var(--mb-border);border-radius:8px;background:#fff;color:var(--mb-text);cursor:pointer;font:inherit;font-weight:750;padding:9px 14px}.mb-native-button.primary{border-color:var(--mb-accent);background:var(--mb-accent);color:#fff}.mb-native-button.primary:hover{background:var(--mb-accent-dark)}.mb-native-button.secondary{background:#fff}.mb-native-button.quiet{min-height:auto;background:var(--mb-soft);padding:7px 11px}.mb-native-button:disabled,.mb-native-remove:disabled{cursor:not-allowed;opacity:.5}.mb-native-submit{display:grid;grid-template-columns:1fr auto;align-items:end;gap:18px;padding:22px;border:1px solid #bcd8e2;border-radius:14px;background:linear-gradient(135deg,#f3fafc,#eaf6fa)}.mb-native-submit fieldset{display:flex;gap:6px;margin:0;padding:0;border:0}.mb-native-submit legend{position:absolute;width:1px;height:1px;overflow:hidden}.mb-native-submit fieldset label{display:flex;align-items:center;gap:6px;padding:9px 11px;border:1px solid #c9dce3;border-radius:8px;background:#fff;font-weight:700}.mb-native-actions{display:flex;justify-content:flex-end;gap:10px;grid-column:1/-1}.mb-native-message{grid-column:1/-1;padding:10px 12px;border-radius:8px}.mb-native-message.error{background:#fff0ef;color:#9d3029}.mb-native-message.success{background:#edf9f2;color:#217449}.mb-native-status{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px;border:1px solid var(--mb-border);border-radius:12px;background:#fff}.mb-native-status h3{text-transform:capitalize}.mb-native-status dl{display:flex;margin:0}.mb-native-status dl div{min-width:110px;padding:0 18px;border-left:1px solid var(--mb-border)}.mb-native-status dt{color:var(--mb-muted);font-size:11px}.mb-native-status dd{margin:4px 0 0;font-size:17px;font-weight:800}@media(max-width:900px){.mb-native-grid.three{grid-template-columns:repeat(2,minmax(0,1fr))}.mb-native-summary{grid-template-columns:repeat(2,1fr)}.mb-native-summary div:nth-child(2){border-right:0}.mb-native-summary div:nth-child(-n+2){border-bottom:1px solid var(--mb-border)}.mb-native-line{grid-template-columns:1fr 1fr 90px}.mb-native-allowed{align-self:center}.mb-native-attach{grid-template-columns:1fr 1fr}.mb-native-submit{grid-template-columns:1fr}.mb-native-submit fieldset,.mb-native-actions{grid-column:1}.mb-native-actions{justify-content:start}}@media(max-width:620px){.mb-native-heading,.mb-native-total,.mb-native-status{align-items:start;flex-direction:column}.mb-native-grid.three,.mb-native-summary,.mb-native-line,.mb-native-attach{grid-template-columns:1fr}.mb-native-summary div,.mb-native-summary div:nth-child(2){border-right:0;border-bottom:1px solid var(--mb-border)}.mb-native-line{align-items:stretch}.mb-native-allowed{text-align:left}.mb-native-submit fieldset{display:grid;grid-template-columns:1fr 1fr}.mb-native-status dl{width:100%}.mb-native-status dl div{min-width:0;flex:1;padding:0 10px}.mb-native-status dl div:first-child{padding-left:0;border-left:0}}\n.mb-native-review,.mb-native-status{font-family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O,SAAS,uBACd,OACc;AACd,SAAO,OAAO,6BAA6B,KAAK;AAClD;AACO,SAAS,oBAAoB,OAA0C;AAC5E,SAAO,OAAO,wBAAwB,KAAK;AAC7C;AACO,SAAS,mBAAmB,OAA0C;AAC3E,SAAO,OAAO,uBAAuB,KAAK;AAC5C;AAEO,IAAM,qBAAqB;AAC3B,IAAM,mBAAmB;AACzB,IAAM,uBAAuB;AAC7B,IAAM,oBAAoB;AAC1B,IAAM,mBAAmB;","names":["useEffect","useEffect"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mindbill/react",
3
- "version": "0.4.0",
4
- "description": "React components for MindBill hosted billing workflows",
3
+ "version": "0.6.0",
4
+ "description": "Native React components and hosted workflows for MindBill billing",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",
@@ -20,7 +20,7 @@
20
20
  "react": ">=18"
21
21
  },
22
22
  "dependencies": {
23
- "@mindbill/embed": "^0.4.0"
23
+ "@mindbill/embed": "^0.5.0"
24
24
  },
25
25
  "keywords": [
26
26
  "mindbill",