@mindbill/react 0.41.0 → 0.41.2

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
@@ -195,7 +195,7 @@ The component includes the interaction model, not just the markup:
195
195
  - QME, AME, and Psych QME evaluation modes with medical-legal modifier defaults; Psych QME also seeds `Z04.6` when no more specific diagnosis was supplied, and exposes it as a Psych quick pick;
196
196
  - a searchable rendering-provider taxonomy combobox that accepts either a human-readable specialty search or an exact 10-character taxonomy code;
197
197
  - searchable workers-comp procedure/modifier controls, medical-legal fee-schedule amounts, totals, valid manual CPT/HCPCS entry, and an automatically maintained empty line;
198
- - removable source documents with new-tab previews, a locked auto-attached practice W-9, and a full-width click, panel-drop, or whole-page PDF upload area. Med-legal mode assigns every document to `J4 - Med-Legal Report` without showing another control; professional mode shows the complete searchable PWK01 report-type directory. Override that presentation with `attachmentReportTypeMode`, `attachmentReportTypes`, and `defaultAttachmentReportType`.
198
+ - removable source documents with new-tab previews and a full-width click, panel-drop, or whole-page PDF upload area. Auto-attached documents can be removable when the host sets `removable: true`; otherwise they remain locked by default. Med-legal mode assigns every document to `J4 - Med-Legal Report` without showing another control; professional mode shows the complete searchable PWK01 report-type directory. Override that presentation with `attachmentReportTypeMode`, `attachmentReportTypes`, and `defaultAttachmentReportType`.
199
199
 
200
200
  Partners supply tenant-specific bootstrap data, one short-lived browser session callback, and optionally an `onSubmitted` callback to persist the returned `billId`. Required fields, validation, ZIP lookup, ICD-10 and payer directories, service-line behavior, PDF encoding, wire-format serialization, atomic submission, 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.
201
201
 
package/dist/index.d.ts CHANGED
@@ -532,8 +532,9 @@ type BillSubmissionSourceAttachment = {
532
532
  description?: string;
533
533
  /** @deprecated Source attachments shown in the form are included until removed. */
534
534
  selected?: boolean;
535
- /** Auto-attached documents such as a practice W-9 cannot be deselected. */
535
+ /** Marks a document that the host selected by default. This does not imply that it is locked. */
536
536
  autoAttached?: boolean;
537
+ /** Controls whether the user can remove the document from this submission packet. Defaults to false for auto-attached documents and true otherwise. */
537
538
  removable?: boolean;
538
539
  previewUrl?: string;
539
540
  /** Authenticated source loader used when the document is not available at a public URL. */
package/dist/index.js CHANGED
@@ -1699,10 +1699,10 @@ import { useEffect as useEffect4, useState as useState4 } from "react";
1699
1699
  import { Fragment as Fragment3, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
1700
1700
  var css2 = `
1701
1701
  .mbcad-backdrop{position:fixed;z-index:1000;inset:0;display:grid;place-items:center;padding:24px;background:rgba(17,28,38,.44)}
1702
- .mbcad-dialog{display:grid;grid-template-rows:auto auto minmax(0,1fr);width:min(1180px,100%);max-height:min(860px,92vh);overflow:hidden;border:1px solid var(--mb-border);border-radius:14px;background:var(--mb-surface);color:var(--mb-text);box-shadow:0 28px 80px rgba(14,31,43,.28);font-family:var(--mb-font)}
1703
- .mbcad-head{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px 22px;border-bottom:1px solid var(--mb-border)}.mbcad-head h2{margin:0;font-size:24px;line-height:1.2}.mbcad-close{width:40px;height:40px;border:0;border-radius:9px;background:color-mix(in srgb,var(--mb-muted) 9%,var(--mb-surface));color:var(--mb-accent);font:inherit;font-size:28px;line-height:1;cursor:pointer}
1704
- .mbcad-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));margin:18px 22px 0;border-radius:10px;background:color-mix(in srgb,var(--mb-muted) 8%,var(--mb-surface));overflow:hidden}.mbcad-tab{min-height:64px;padding:10px;border:0;border-right:1px solid var(--mb-border);border-top:4px solid transparent;background:transparent;color:var(--mb-muted);font:inherit;font-weight:750;cursor:pointer}.mbcad-tab:last-child{border-right:0}.mbcad-tab[aria-selected=true]{border-top-color:var(--mb-accent);background:var(--mb-surface);color:var(--mb-text)}
1705
- .mbcad-body{overflow:auto;padding:24px 22px 28px}.mbcad-grid{display:grid;gap:0;border:1px solid var(--mb-border);border-radius:10px;overflow:hidden}.mbcad-row{display:grid;grid-template-columns:minmax(180px,.8fr) minmax(0,2fr);gap:18px;padding:11px 14px;border-bottom:1px solid var(--mb-border)}.mbcad-row:last-child{border-bottom:0}.mbcad-row strong{font-weight:750}.mbcad-list{display:grid;gap:5px;margin:0;padding:0;list-style:none}.mbcad-list a,.mbcad-table a{color:var(--mb-accent);overflow-wrap:anywhere}.mbcad-table{width:100%;border-collapse:collapse;border:1px solid var(--mb-border);border-radius:10px;overflow:hidden}.mbcad-table th,.mbcad-table td{padding:13px 14px;border-bottom:1px solid var(--mb-border);text-align:left;vertical-align:top}.mbcad-table th{background:color-mix(in srgb,var(--mb-muted) 7%,var(--mb-surface));font-size:13px}.mbcad-empty{padding:36px;text-align:center;color:var(--mb-muted)}.mbcad-notice{padding:14px 16px;border:1px solid color-mix(in srgb,var(--mb-accent) 70%,var(--mb-border));border-radius:9px;background:color-mix(in srgb,var(--mb-accent) 5%,var(--mb-surface));font-weight:650}
1702
+ .mbcad-dialog{--mbcad-accent:var(--mb-accent,#176c70);--mbcad-border:var(--mb-border,#d7e0df);--mbcad-surface:var(--mb-surface,#fff);--mbcad-text:var(--mb-text,#17282d);--mbcad-muted:var(--mb-muted,#607176);display:grid;grid-template-rows:auto auto minmax(0,1fr);width:min(1180px,100%);max-height:min(860px,92vh);overflow:hidden;border:1px solid var(--mbcad-border);border-radius:14px;background:var(--mbcad-surface);color:var(--mbcad-text);box-shadow:0 28px 80px rgba(14,31,43,.28);font-family:var(--mb-font,Inter,ui-sans-serif,system-ui,sans-serif)}
1703
+ .mbcad-head{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px 22px;border-bottom:1px solid var(--mbcad-border)}.mbcad-head h2{margin:0;font-size:24px;line-height:1.2}.mbcad-close{width:40px;height:40px;border:0;border-radius:9px;background:color-mix(in srgb,var(--mbcad-muted) 9%,var(--mbcad-surface));color:var(--mbcad-accent);font:inherit;font-size:28px;line-height:1;cursor:pointer}
1704
+ .mbcad-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));margin:18px 22px 0;border-radius:10px;background:color-mix(in srgb,var(--mbcad-muted) 8%,var(--mbcad-surface));overflow:hidden}.mbcad-tab{min-height:64px;padding:10px;border:0;border-right:1px solid var(--mbcad-border);border-top:4px solid transparent;background:transparent;color:var(--mbcad-muted);font:inherit;font-weight:750;cursor:pointer}.mbcad-tab:last-child{border-right:0}.mbcad-tab[aria-selected=true]{border-top-color:var(--mbcad-accent);background:var(--mbcad-surface);color:var(--mbcad-text)}
1705
+ .mbcad-body{overflow:auto;padding:24px 22px 28px}.mbcad-grid{display:grid;gap:0;border:1px solid var(--mbcad-border);border-radius:10px;overflow:hidden}.mbcad-row{display:grid;grid-template-columns:minmax(180px,.8fr) minmax(0,2fr);gap:18px;padding:11px 14px;border-bottom:1px solid var(--mbcad-border)}.mbcad-row:last-child{border-bottom:0}.mbcad-row strong{font-weight:750}.mbcad-list{display:grid;gap:5px;margin:0;padding:0;list-style:none}.mbcad-list a,.mbcad-table a{color:var(--mbcad-accent);overflow-wrap:anywhere}.mbcad-table{width:100%;border-collapse:collapse;border:1px solid var(--mbcad-border);border-radius:10px;overflow:hidden}.mbcad-table th,.mbcad-table td{padding:13px 14px;border-bottom:1px solid var(--mbcad-border);text-align:left;vertical-align:top}.mbcad-table th{background:color-mix(in srgb,var(--mbcad-muted) 7%,var(--mbcad-surface));font-size:13px}.mbcad-empty{padding:36px;text-align:center;color:var(--mbcad-muted)}.mbcad-notice{padding:14px 16px;border:1px solid color-mix(in srgb,var(--mbcad-accent) 70%,var(--mbcad-border));border-radius:9px;background:color-mix(in srgb,var(--mbcad-accent) 5%,var(--mbcad-surface));font-weight:650}
1706
1706
  @media(max-width:760px){.mbcad-backdrop{padding:8px}.mbcad-dialog{max-height:96vh}.mbcad-head{padding:14px}.mbcad-head h2{font-size:19px}.mbcad-tabs{display:flex;overflow-x:auto;margin:10px 12px 0}.mbcad-tab{min-width:145px}.mbcad-body{padding:14px 12px 18px}.mbcad-row{grid-template-columns:1fr;gap:5px}.mbcad-table{display:block;overflow-x:auto}}
1707
1707
  `;
1708
1708
  function outbound(value, kind) {
@@ -3020,11 +3020,11 @@ function BillSubmissionForm({
3020
3020
  /* @__PURE__ */ jsxs5("div", { className: "mbsf-attach-list", children: [
3021
3021
  attachments.filter((attachment) => !removedSourceIds.includes(attachment.id)).map((attachment) => {
3022
3022
  const auto = attachment.autoAttached || attachment.documentType === "w9";
3023
- const removable = !auto && attachment.removable !== false;
3023
+ const removable = attachment.removable ?? !auto;
3024
3024
  const reportTypeCode = sourceAttachmentReportTypes[attachment.id] || attachment.reportTypeCode || defaultAttachmentReportType || "";
3025
3025
  return /* @__PURE__ */ jsxs5("div", { className: "mbsf-attach-row", "data-auto": auto, children: [
3026
3026
  /* @__PURE__ */ jsxs5("div", { className: "mbsf-attach-main", children: [
3027
- auto ? /* @__PURE__ */ jsx5("span", { "aria-label": "Always attached", role: "img", children: "\u2713" }) : null,
3027
+ auto ? /* @__PURE__ */ jsx5("span", { "aria-label": "Auto-attached", role: "img", children: "\u2713" }) : null,
3028
3028
  /* @__PURE__ */ jsxs5("span", { className: "mbsf-file", children: [
3029
3029
  /* @__PURE__ */ jsx5("strong", { children: attachment.fileName }),
3030
3030
  /* @__PURE__ */ jsx5("span", { className: "mbsf-badge", children: auto ? "Auto-attached" : documentLabels[attachment.documentType] }),