@mindbill/react 0.51.0 → 0.52.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1227,11 +1227,14 @@ type ConnectedPaymentReviewProps = BillingOperationsClientOptions & {
1227
1227
  declare function ConnectedPaymentReview({ initialQuery, onSelectBill, onPostPayment, appearance, className, style, ...options }: ConnectedPaymentReviewProps): ReactElement;
1228
1228
 
1229
1229
  type NotificationAgingDay = 30 | 60 | 90;
1230
+ type NotificationReportDigest = "off" | "daily" | "weekly";
1230
1231
  type NotificationPreferences = {
1231
1232
  enabled: boolean;
1232
1233
  statusUpdates: boolean;
1233
1234
  agingDays: NotificationAgingDay[];
1234
1235
  quietHours: boolean;
1236
+ /** Optional for existing adapters; omitted means off. */
1237
+ reportDigest?: NotificationReportDigest;
1235
1238
  };
1236
1239
  /** A projection from the host's authenticated server, not the raw administrative API. */
1237
1240
  type NotificationSettingsSnapshot = {
@@ -1273,6 +1276,8 @@ type NotificationRecipientInvitation = {
1273
1276
  statusUpdates: boolean;
1274
1277
  agingDays: NotificationAgingDay[];
1275
1278
  quietHours: boolean;
1279
+ /** Optional for existing hosts; omitted means off. */
1280
+ reportDigest?: NotificationReportDigest;
1276
1281
  };
1277
1282
  type NotificationRecipient = Omit<NotificationRecipientInvitation, "requestId"> & {
1278
1283
  externalUserId: string;
@@ -1640,4 +1645,4 @@ type MindBillWidgetProps = {
1640
1645
  declare function MindBillBillTimeline(props: MindBillWidgetProps): ReactElement;
1641
1646
  declare function MindBillBillReview(props: MindBillWidgetProps): ReactElement;
1642
1647
 
1643
- export { BILL_STATUS_AGING_BUCKETS, BILL_SUBMISSION_DIAGNOSIS_QUICK_PICKS, BILL_SUBMISSION_DOCUMENT_TYPES, BILL_SUBMISSION_REPORT_TYPES, BILL_SUBMISSION_REQUIRED_FIELDS, type BillActivityEvent, BillActivityTimeline, type BillActivityTimelineProps, type BillAgingBucket, type BillAgingBucketId, BillAgingSummary, type BillAgingSummaryProps, BillCourtesyCopyForm, type BillCourtesyCopyFormProps, BillExplanationOfReview, type BillExplanationOfReviewProps, BillHistoryTable, type BillHistoryTableProps, BillLifecycleActions, type BillLifecycleActionsProps, BillLifecycleProgress, type BillLifecycleProgressProps, type BillLifecycleProgressStepsOptions, type BillLifecycleStage, BillList, type BillListProps, BillPayerContactCard, type BillPayerContactCardProps, BillPaymentLedger, type BillPaymentLedgerProps, BillReadOnlyForm, type BillReadOnlyFormProps, type BillRegistryAge, type BillRegistryItem, type BillRegistryQuery, type BillRegistryResult, type BillRegistrySort, type BillRegistryStatus, BillRejectionNotice, type BillRejectionNoticeProps, BillRemittanceCard, type BillRemittanceCardProps, type BillReviewAttachment, type BillReviewBillingProvider, type BillReviewClinician, type BillReviewData, type BillReviewDocumentType, type BillReviewDraft, type BillReviewFeatures, BillReviewForm, type BillReviewFormProps, type BillReviewLineItem, type BillReviewLocation, type BillReviewPayer, type BillReviewSaveInput, BillSnapshotSummary, type BillSnapshotSummaryProps, type BillStatusAction, type BillStatusAgingCell, BillStatusAgingMatrix, type BillStatusAgingMatrixData, type BillStatusAgingMatrixProps, type BillStatusAgingRow, type BillStatusClient, type BillStatusClientOptions, type BillStatusData, type BillStatusSession, type BillStatusSessionProvider, type BillStatusSessionRequest, BillStatusSummary, type BillStatusSummaryProps, BillSubmissionActions, type BillSubmissionAddress, type BillSubmissionAttachmentReportTypeMode, BillSubmissionAttachmentsSection, BillSubmissionClaimSection, type BillSubmissionDiagnosisOption, type BillSubmissionDocumentType, type BillSubmissionEvaluationType, BillSubmissionForm, type BillSubmissionFormProps, type BillSubmissionFormValue, BillSubmissionHeader, type BillSubmissionInput$1 as BillSubmissionInput, type BillSubmissionModifierOption, BillSubmissionPatientSection, type BillSubmissionPostalPlace, type BillSubmissionProcedureOption, type BillSubmissionProfileOption, type BillSubmissionProfileOptions, BillSubmissionProvidersSection, type BillSubmissionReportTypeOption, type BillSubmissionRibbonItem, type BillSubmissionRoute, type BillSubmissionSectionId, BillSubmissionServiceLinesSection, type BillSubmissionSourceAttachment, type BillSubmissionTaxonomyOption, type BillSubmissionUpload, type BillSubmissionValidation, BillSubmissionsRibbon, type BillSubmissionsRibbonProps, BillTasksDashboard, type BillTasksDashboardCell, type BillTasksDashboardProps, type BillTasksResult, type BillingComponentProps, BillingDashboard, type BillingDashboardBill, type BillingDashboardProps, type BillingDashboardSummary, type BillingOperationsClient, type BillingOperationsClientOptions, BillingReport, type BillingReportDimension, type BillingReportProps, type BillingReportRow, BillingSettings, ClaimsAdministratorDirectoryDialog, type ClaimsAdministratorDirectoryDialogProps, ConnectedBillLifecycle, type ConnectedBillLifecycleProps, ConnectedBillSearch, type ConnectedBillSearchProps, ConnectedBillStatus, type ConnectedBillStatusProps, ConnectedBillTasksDashboard, type ConnectedBillTasksDashboardProps, ConnectedBillingWorkspace, type ConnectedBillingWorkspaceProps, ConnectedNotificationRecipientsSettings, ConnectedNotificationSettings, ConnectedPaymentReview, type ConnectedPaymentReviewProps, ConnectedProductivityReport, ConnectedServiceLineItemsReport, type CourtesyCopyRecipientOption, DEFAULT_BILL_SUBMISSION_MODIFIERS, DEFAULT_BILL_SUBMISSION_PROCEDURES, DEFAULT_BILL_SUBMISSION_TAXONOMIES, MED_LEGAL_REPORT_TYPE_CODE, MindBillBillReview, MindBillBillTimeline, type MindBillReactAppearance, type MindBillThemePreset, type MindBillWidgetProps, type NotificationAgingDay, type NotificationPreferences, type NotificationRecipient, type NotificationRecipientInvitation, type NotificationRecipientsAdapter, NotificationRecipientsSettings, type NotificationRecipientsSettingsProps, type NotificationRecipientsSnapshot, NotificationSettings, type NotificationSettingsAdapter, type NotificationSettingsProps, type NotificationSettingsSnapshot, type NotificationSettingsUpdate, OrganizationOnboarding, type OrganizationOnboardingProps, PSYCH_QME_DEFAULT_DIAGNOSIS, type PaymentReviewItem, type PaymentReviewQuery, type PaymentReviewRange, type PaymentReviewResult, type ProductivityReport, ReportBillStatusDialog, type ReportBillStatusDialogProps, SECOND_REVIEW_REASON_TEMPLATES, SecondReviewForm, type SecondReviewFormProps, SendRouteDialog, type SendRouteDialogProps, type SendRouteSubmission, type ServiceLineItemsReport, type UseBillLifecycleOptions, type UseBillLifecycleResult, type UseBillStatusOptions, type UseBillStatusResult, type W9ExtractionStatus, W9Upload, type W9UploadProps, applyBillSubmissionEvaluationDiagnoses, applyBillSubmissionEvaluationModifiers, billActivityEventLabel, billAgingBucket, billAgingDays, billLifecycleDisplayLabel, billLifecycleStage, billSubmissionsRibbonDeliveryLabel, billSubmissionsRibbonFromHistory, buildBillReviewSaveInput, buildBillStatusAgingCsv, buildBillStatusAgingMatrix, buildBillingReportCsv, buildBillingReportRows, calculateBillSubmissionAllowedAmount, chooseClaimsAdministrator, claimsAdministratorRecommendations, createBillStatusClient, createBillingOperationsClient, ensureTrailingBillSubmissionLine, ensureTrailingProcedureLine, exactClaimsAdministratorMatch, extractSendRouteEmail, formatBillSubmissionDate, formatSendRouteFax, isBillLifecycleDraft, mindBillAppearanceStyle, mindBillThemePresets, normalizeClaimsAdministratorName, organizationProfileOptions, parseBillSubmissionDate, prepareBillSubmissionDocuments, resolveMindBillAppearance, submittedClaimsAdministrator, summarizeBillingDashboard, useBillLifecycle, useBillStatus, validateBillSubmission, visibleBillLifecycleActions };
1648
+ export { BILL_STATUS_AGING_BUCKETS, BILL_SUBMISSION_DIAGNOSIS_QUICK_PICKS, BILL_SUBMISSION_DOCUMENT_TYPES, BILL_SUBMISSION_REPORT_TYPES, BILL_SUBMISSION_REQUIRED_FIELDS, type BillActivityEvent, BillActivityTimeline, type BillActivityTimelineProps, type BillAgingBucket, type BillAgingBucketId, BillAgingSummary, type BillAgingSummaryProps, BillCourtesyCopyForm, type BillCourtesyCopyFormProps, BillExplanationOfReview, type BillExplanationOfReviewProps, BillHistoryTable, type BillHistoryTableProps, BillLifecycleActions, type BillLifecycleActionsProps, BillLifecycleProgress, type BillLifecycleProgressProps, type BillLifecycleProgressStepsOptions, type BillLifecycleStage, BillList, type BillListProps, BillPayerContactCard, type BillPayerContactCardProps, BillPaymentLedger, type BillPaymentLedgerProps, BillReadOnlyForm, type BillReadOnlyFormProps, type BillRegistryAge, type BillRegistryItem, type BillRegistryQuery, type BillRegistryResult, type BillRegistrySort, type BillRegistryStatus, BillRejectionNotice, type BillRejectionNoticeProps, BillRemittanceCard, type BillRemittanceCardProps, type BillReviewAttachment, type BillReviewBillingProvider, type BillReviewClinician, type BillReviewData, type BillReviewDocumentType, type BillReviewDraft, type BillReviewFeatures, BillReviewForm, type BillReviewFormProps, type BillReviewLineItem, type BillReviewLocation, type BillReviewPayer, type BillReviewSaveInput, BillSnapshotSummary, type BillSnapshotSummaryProps, type BillStatusAction, type BillStatusAgingCell, BillStatusAgingMatrix, type BillStatusAgingMatrixData, type BillStatusAgingMatrixProps, type BillStatusAgingRow, type BillStatusClient, type BillStatusClientOptions, type BillStatusData, type BillStatusSession, type BillStatusSessionProvider, type BillStatusSessionRequest, BillStatusSummary, type BillStatusSummaryProps, BillSubmissionActions, type BillSubmissionAddress, type BillSubmissionAttachmentReportTypeMode, BillSubmissionAttachmentsSection, BillSubmissionClaimSection, type BillSubmissionDiagnosisOption, type BillSubmissionDocumentType, type BillSubmissionEvaluationType, BillSubmissionForm, type BillSubmissionFormProps, type BillSubmissionFormValue, BillSubmissionHeader, type BillSubmissionInput$1 as BillSubmissionInput, type BillSubmissionModifierOption, BillSubmissionPatientSection, type BillSubmissionPostalPlace, type BillSubmissionProcedureOption, type BillSubmissionProfileOption, type BillSubmissionProfileOptions, BillSubmissionProvidersSection, type BillSubmissionReportTypeOption, type BillSubmissionRibbonItem, type BillSubmissionRoute, type BillSubmissionSectionId, BillSubmissionServiceLinesSection, type BillSubmissionSourceAttachment, type BillSubmissionTaxonomyOption, type BillSubmissionUpload, type BillSubmissionValidation, BillSubmissionsRibbon, type BillSubmissionsRibbonProps, BillTasksDashboard, type BillTasksDashboardCell, type BillTasksDashboardProps, type BillTasksResult, type BillingComponentProps, BillingDashboard, type BillingDashboardBill, type BillingDashboardProps, type BillingDashboardSummary, type BillingOperationsClient, type BillingOperationsClientOptions, BillingReport, type BillingReportDimension, type BillingReportProps, type BillingReportRow, BillingSettings, ClaimsAdministratorDirectoryDialog, type ClaimsAdministratorDirectoryDialogProps, ConnectedBillLifecycle, type ConnectedBillLifecycleProps, ConnectedBillSearch, type ConnectedBillSearchProps, ConnectedBillStatus, type ConnectedBillStatusProps, ConnectedBillTasksDashboard, type ConnectedBillTasksDashboardProps, ConnectedBillingWorkspace, type ConnectedBillingWorkspaceProps, ConnectedNotificationRecipientsSettings, ConnectedNotificationSettings, ConnectedPaymentReview, type ConnectedPaymentReviewProps, ConnectedProductivityReport, ConnectedServiceLineItemsReport, type CourtesyCopyRecipientOption, DEFAULT_BILL_SUBMISSION_MODIFIERS, DEFAULT_BILL_SUBMISSION_PROCEDURES, DEFAULT_BILL_SUBMISSION_TAXONOMIES, MED_LEGAL_REPORT_TYPE_CODE, MindBillBillReview, MindBillBillTimeline, type MindBillReactAppearance, type MindBillThemePreset, type MindBillWidgetProps, type NotificationAgingDay, type NotificationPreferences, type NotificationRecipient, type NotificationRecipientInvitation, type NotificationRecipientsAdapter, NotificationRecipientsSettings, type NotificationRecipientsSettingsProps, type NotificationRecipientsSnapshot, type NotificationReportDigest, NotificationSettings, type NotificationSettingsAdapter, type NotificationSettingsProps, type NotificationSettingsSnapshot, type NotificationSettingsUpdate, OrganizationOnboarding, type OrganizationOnboardingProps, PSYCH_QME_DEFAULT_DIAGNOSIS, type PaymentReviewItem, type PaymentReviewQuery, type PaymentReviewRange, type PaymentReviewResult, type ProductivityReport, ReportBillStatusDialog, type ReportBillStatusDialogProps, SECOND_REVIEW_REASON_TEMPLATES, SecondReviewForm, type SecondReviewFormProps, SendRouteDialog, type SendRouteDialogProps, type SendRouteSubmission, type ServiceLineItemsReport, type UseBillLifecycleOptions, type UseBillLifecycleResult, type UseBillStatusOptions, type UseBillStatusResult, type W9ExtractionStatus, W9Upload, type W9UploadProps, applyBillSubmissionEvaluationDiagnoses, applyBillSubmissionEvaluationModifiers, billActivityEventLabel, billAgingBucket, billAgingDays, billLifecycleDisplayLabel, billLifecycleStage, billSubmissionsRibbonDeliveryLabel, billSubmissionsRibbonFromHistory, buildBillReviewSaveInput, buildBillStatusAgingCsv, buildBillStatusAgingMatrix, buildBillingReportCsv, buildBillingReportRows, calculateBillSubmissionAllowedAmount, chooseClaimsAdministrator, claimsAdministratorRecommendations, createBillStatusClient, createBillingOperationsClient, ensureTrailingBillSubmissionLine, ensureTrailingProcedureLine, exactClaimsAdministratorMatch, extractSendRouteEmail, formatBillSubmissionDate, formatSendRouteFax, isBillLifecycleDraft, mindBillAppearanceStyle, mindBillThemePresets, normalizeClaimsAdministratorName, organizationProfileOptions, parseBillSubmissionDate, prepareBillSubmissionDocuments, resolveMindBillAppearance, submittedClaimsAdministrator, summarizeBillingDashboard, useBillLifecycle, useBillStatus, validateBillSubmission, visibleBillLifecycleActions };
package/dist/index.js CHANGED
@@ -5422,7 +5422,7 @@ function ConnectedPaymentReview({ initialQuery, onSelectBill, onPostPayment, app
5422
5422
  import { useEffect as useEffect10, useId as useId3, useRef as useRef5, useState as useState12 } from "react";
5423
5423
  import { Fragment as Fragment11, jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
5424
5424
  function defaultNotificationPreferences() {
5425
- return { enabled: false, statusUpdates: false, agingDays: [], quietHours: true };
5425
+ return { enabled: false, statusUpdates: false, agingDays: [], quietHours: true, reportDigest: "off" };
5426
5426
  }
5427
5427
  function notificationSettingsUpdate(preferences, consent) {
5428
5428
  return {
@@ -5430,15 +5430,18 @@ function notificationSettingsUpdate(preferences, consent) {
5430
5430
  statusUpdates: preferences.statusUpdates === true,
5431
5431
  agingDays: [30, 60, 90].filter((day) => preferences.agingDays.includes(day)),
5432
5432
  quietHours: preferences.quietHours === true,
5433
+ reportDigest: preferences.reportDigest === "daily" || preferences.reportDigest === "weekly" ? preferences.reportDigest : "off",
5433
5434
  consent: consent === true
5434
5435
  };
5435
5436
  }
5436
5437
  function notificationSettingsNeedsConsent(previous, next) {
5437
5438
  if (!next.enabled) return false;
5439
+ if ((previous?.reportDigest ?? "off") !== (next.reportDigest ?? "off")) return true;
5438
5440
  if (!previous?.enabled || previous.statusUpdates !== next.statusUpdates || previous.quietHours !== next.quietHours) return true;
5439
5441
  return JSON.stringify(notificationSettingsUpdate(previous, false).agingDays) !== JSON.stringify(notificationSettingsUpdate(next, false).agingDays);
5440
5442
  }
5441
5443
  var css11 = `
5444
+ .mbns-digest{display:grid;gap:6px;margin-top:12px}.mbns-digest select{font:inherit;min-height:44px;border:1px solid var(--mb-border);border-radius:var(--mb-control-radius);background:var(--mb-surface);color:var(--mb-text);padding:10px 12px}.mbns-digest select:focus-visible{outline:2px solid var(--mb-accent);outline-offset:3px}
5442
5445
  .mbns{color:var(--mb-text);font-family:var(--mb-font);font-size:14px;line-height:1.5;min-width:0}.mbns *{box-sizing:border-box}.mbns h2,.mbns p{margin:0}.mbns-card{padding:24px;background:var(--mb-surface);border:1px solid var(--mb-border);border-radius:var(--mb-radius);box-shadow:var(--mb-shadow)}
5443
5446
  .mbns-header{display:flex;gap:16px;align-items:flex-start;justify-content:space-between;margin-bottom:24px}.mbns h2{font-size:20px;line-height:1.3;font-weight:700}.mbns-muted{color:var(--mb-muted)}.mbns-header p{margin-top:6px;max-width:56ch}.mbns-badge{flex-shrink:0;background:var(--mb-soft);color:var(--mb-muted);padding:4px 9px;border-radius:var(--mb-control-radius);font-size:12px;font-weight:650}
5444
5447
  .mbns-account{padding:14px 16px;background:var(--mb-soft);border-radius:var(--mb-control-radius);margin-bottom:20px;overflow-wrap:anywhere}.mbns-account strong{display:block;font-weight:650}.mbns-account p{margin-top:3px;font-size:13px}
@@ -5481,7 +5484,7 @@ function NotificationSettingsSession({ adapter, appearance, className, style, on
5481
5484
  };
5482
5485
  }, [adapter, reload]);
5483
5486
  const needsConsent = notificationSettingsNeedsConsent(snapshot?.preferences ?? null, draft);
5484
- const hasCategory = draft.statusUpdates || draft.agingDays.length > 0;
5487
+ const hasCategory = draft.statusUpdates || draft.agingDays.length > 0 || (draft.reportDigest ?? "off") !== "off";
5485
5488
  const changed = JSON.stringify(notificationSettingsUpdate(draft, false)) !== JSON.stringify(notificationSettingsUpdate(snapshot?.preferences ?? defaultNotificationPreferences(), false));
5486
5489
  const busy = phase !== "ready";
5487
5490
  const canSave = !busy && changed && (!draft.enabled || !!snapshot?.canEnable && hasCategory && (!needsConsent || consent));
@@ -5570,6 +5573,15 @@ function NotificationSettingsSession({ adapter, appearance, className, style, on
5570
5573
  /* @__PURE__ */ jsx16("strong", { children: "Quiet hours" }),
5571
5574
  /* @__PURE__ */ jsx16("small", { children: "Hold emails from 7 pm to 7 am Pacific time." })
5572
5575
  ] })
5576
+ ] }),
5577
+ /* @__PURE__ */ jsxs16("label", { className: "mbns-digest", children: [
5578
+ /* @__PURE__ */ jsx16("strong", { children: "Scheduled activity digest" }),
5579
+ /* @__PURE__ */ jsxs16("select", { value: draft.reportDigest ?? "off", onChange: (event) => update({ reportDigest: event.target.value }), children: [
5580
+ /* @__PURE__ */ jsx16("option", { value: "off", children: "Off" }),
5581
+ /* @__PURE__ */ jsx16("option", { value: "daily", children: "Daily" }),
5582
+ /* @__PURE__ */ jsx16("option", { value: "weekly", children: "Weekly" })
5583
+ ] }),
5584
+ /* @__PURE__ */ jsx16("small", { className: "mbns-muted", children: "Activity counts at 9 am Pacific, every day or every Monday. No patient details, financial reports or attachments." })
5573
5585
  ] })
5574
5586
  ] }),
5575
5587
  draft.enabled && !hasCategory && /* @__PURE__ */ jsx16("p", { className: "mbns-notice", children: "Select at least one update type to enable notifications." }),
@@ -5603,16 +5615,25 @@ function notificationRecipientInvitation(input, requestId) {
5603
5615
  audience: input.audience,
5604
5616
  statusUpdates: preferences.statusUpdates,
5605
5617
  agingDays: preferences.agingDays,
5606
- quietHours: preferences.quietHours
5618
+ quietHours: preferences.quietHours,
5619
+ reportDigest: preferences.reportDigest ?? "off"
5607
5620
  };
5608
5621
  }
5609
5622
  var css12 = `
5623
+ .mbnr-digest{margin-top:12px}.mbnr-digest small{display:block;margin-top:6px}
5610
5624
  .mbnr{font:14px/1.5 var(--mb-font);color:var(--mb-text);min-width:0}.mbnr *{box-sizing:border-box}.mbnr h2,.mbnr h3,.mbnr p{margin:0}.mbnr h2{font-size:20px}.mbnr h3{font-size:15px}.mbnr-card{border:1px solid var(--mb-border);border-radius:var(--mb-radius);background:var(--mb-surface);padding:24px}.mbnr header{display:flex;gap:16px;justify-content:space-between;align-items:start;margin-bottom:24px}.mbnr-muted{color:var(--mb-muted)}.mbnr header p{margin-top:6px;max-width:65ch}.mbnr-badge{background:var(--mb-soft);padding:4px 9px;border-radius:var(--mb-control-radius);white-space:nowrap;font-size:12px}.mbnr-form{display:grid;gap:16px;padding:20px;background:var(--mb-soft);border-radius:var(--mb-control-radius)}.mbnr-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px}.mbnr label{display:block}.mbnr label>span{display:block;font-weight:600;margin-bottom:6px}.mbnr input[type=email],.mbnr select{width:100%;min-height:44px;background:var(--mb-surface);color:var(--mb-text);font:inherit;border:1px solid var(--mb-border);border-radius:var(--mb-control-radius);padding:10px 12px}.mbnr-check{display:flex!important;gap:10px;align-items:center;min-height:36px}.mbnr input[type=checkbox]{width:17px;height:17px;accent-color:var(--mb-accent)}.mbnr fieldset{border:0;margin:0;padding:0;min-width:0}.mbnr legend{font-weight:600;margin-bottom:6px}.mbnr-days{display:flex;gap:20px;flex-wrap:wrap}.mbnr button{font:inherit;font-weight:600;min-height:44px;padding:10px 14px;border:1px solid var(--mb-border);border-radius:var(--mb-control-radius);background:var(--mb-surface);color:var(--mb-text);cursor:pointer}.mbnr button:disabled{opacity:.5;cursor:not-allowed}.mbnr button.mbnr-primary{background:var(--mb-accent);border-color:var(--mb-accent);color:var(--mb-accent-contrast)}.mbnr :is(input,button,select):focus-visible{outline:2px solid var(--mb-accent);outline-offset:3px}.mbnr-actions{display:flex;gap:12px;flex-wrap:wrap;align-items:center}.mbnr-list{margin-top:28px;display:grid;gap:12px}.mbnr-recipient{border-top:1px solid var(--mb-border);padding-top:16px;display:flex;gap:16px;justify-content:space-between;align-items:start}.mbnr-email{overflow-wrap:anywhere;font-weight:600}.mbnr-state{display:flex;gap:10px;align-items:center;flex-shrink:0}.mbnr-error{color:var(--mb-danger)}.mbnr-notice{margin-top:16px!important}.mbnr-pagination{margin-top:20px}.mbnr-empty{padding:20px 0;color:var(--mb-muted)}@media(max-width:600px){.mbnr-card{padding:18px}.mbnr-form{padding:16px}.mbnr-fields{grid-template-columns:1fr}.mbnr-recipient{flex-direction:column}.mbnr-state{width:100%;justify-content:space-between}.mbnr header{flex-wrap:wrap}}
5611
5625
  `;
5612
5626
  function NotificationRecipientsSettings(props) {
5613
5627
  return /* @__PURE__ */ jsx17(RecipientSettingsSession, { ...props }, props.identityKey);
5614
5628
  }
5615
5629
  var ConnectedNotificationRecipientsSettings = NotificationRecipientsSettings;
5630
+ function recipientCategories(recipient) {
5631
+ return [
5632
+ recipient.statusUpdates ? "Status and payment updates" : "",
5633
+ recipient.agingDays.length ? `${recipient.agingDays.join(" / ")} day reminders` : "",
5634
+ recipient.reportDigest === "daily" ? "Daily activity digest" : recipient.reportDigest === "weekly" ? "Weekly activity digest" : ""
5635
+ ].filter(Boolean).join(" \xB7 ") || "No email categories";
5636
+ }
5616
5637
  function RecipientSettingsSession({ adapter, appearance, className, style }) {
5617
5638
  const titleId = useId4();
5618
5639
  const [snapshot, setSnapshot] = useState13(null);
@@ -5664,7 +5685,7 @@ function RecipientSettingsSession({ adapter, appearance, className, style }) {
5664
5685
  setNotice("We couldn't confirm the request. Retry unchanged to check the same invitation, or reload recipients. Do not assume an email was sent.");
5665
5686
  }
5666
5687
  }
5667
- const canInvite = !busy && !!snapshot?.available && !!email.trim() && (preferences.statusUpdates || preferences.agingDays.length > 0);
5688
+ const canInvite = !busy && !!snapshot?.available && !!email.trim() && (preferences.statusUpdates || preferences.agingDays.length > 0 || (preferences.reportDigest ?? "off") !== "off");
5668
5689
  return /* @__PURE__ */ jsxs17("section", { className: `mbnr ${className ?? ""}`, style: { ...mindBillAppearanceStyle(appearance), ...style }, "aria-labelledby": titleId, "aria-busy": busy, children: [
5669
5690
  /* @__PURE__ */ jsx17("style", { children: css12 }),
5670
5691
  /* @__PURE__ */ jsxs17("div", { className: "mbnr-card", children: [
@@ -5721,9 +5742,18 @@ function RecipientSettingsSession({ adapter, appearance, className, style }) {
5721
5742
  /* @__PURE__ */ jsxs17("label", { className: "mbnr-check", children: [
5722
5743
  /* @__PURE__ */ jsx17("input", { type: "checkbox", checked: preferences.quietHours, onChange: (event) => setPreferences((value) => ({ ...value, quietHours: event.target.checked })) }),
5723
5744
  "Quiet hours \xB7 7 pm\u20137 am Pacific"
5745
+ ] }),
5746
+ /* @__PURE__ */ jsxs17("label", { className: "mbnr-digest", children: [
5747
+ /* @__PURE__ */ jsx17("span", { children: "Scheduled activity digest" }),
5748
+ /* @__PURE__ */ jsxs17("select", { value: preferences.reportDigest ?? "off", onChange: (event) => setPreferences((value) => ({ ...value, reportDigest: event.target.value })), children: [
5749
+ /* @__PURE__ */ jsx17("option", { value: "off", children: "Off" }),
5750
+ /* @__PURE__ */ jsx17("option", { value: "daily", children: "Daily" }),
5751
+ /* @__PURE__ */ jsx17("option", { value: "weekly", children: "Weekly" })
5752
+ ] }),
5753
+ /* @__PURE__ */ jsx17("small", { className: "mbnr-muted", children: "Activity counts at 9 am Pacific, every day or every Monday. No financial reports or attachments." })
5724
5754
  ] })
5725
5755
  ] }),
5726
- /* @__PURE__ */ jsx17("p", { className: "mbnr-muted", children: "Emails contain general alerts, not patient details, reports or attachments. The recipient reviews these choices and can unsubscribe at any time." }),
5756
+ /* @__PURE__ */ jsx17("p", { className: "mbnr-muted", children: "Emails contain general alerts and activity counts, not patient details, reports or attachments. The recipient reviews these choices and can unsubscribe at any time." }),
5727
5757
  /* @__PURE__ */ jsxs17("div", { className: "mbnr-actions", children: [
5728
5758
  /* @__PURE__ */ jsx17("button", { type: "submit", className: "mbnr-primary", disabled: !canInvite, children: busy ? "Please wait\u2026" : "Send confirmation invitation" }),
5729
5759
  hasReceipt && /* @__PURE__ */ jsx17("button", { type: "button", disabled: busy, onClick: () => {
@@ -5744,8 +5774,7 @@ function RecipientSettingsSession({ adapter, appearance, className, style }) {
5744
5774
  /* @__PURE__ */ jsxs17("p", { className: "mbnr-muted", children: [
5745
5775
  recipient.audience === "practice" ? "Practice-wide" : `${recipient.assignedBillCount} assigned bills`,
5746
5776
  " \xB7 ",
5747
- recipient.statusUpdates ? "Status and payment updates" : "Reminders only",
5748
- recipient.agingDays.length ? ` \xB7 ${recipient.agingDays.join(" / ")} day reminders` : ""
5777
+ recipientCategories(recipient)
5749
5778
  ] }),
5750
5779
  recipient.deliveryStatus === "unknown" && /* @__PURE__ */ jsx17("p", { className: "mbnr-muted", children: "Invitation delivery unconfirmed. No automatic resend." })
5751
5780
  ] }),