@mindbill/react 0.21.2 → 0.21.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +15 -11
- package/dist/index.js +69 -19
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -51,20 +51,20 @@ declare const mindBillThemePresets: {
|
|
|
51
51
|
readonly fontFamily: "Inter, ui-sans-serif, system-ui, sans-serif";
|
|
52
52
|
};
|
|
53
53
|
readonly "orange-bright": {
|
|
54
|
-
readonly accentColor: "#
|
|
54
|
+
readonly accentColor: "#f4510b";
|
|
55
55
|
readonly accentTextColor: "#ffffff";
|
|
56
56
|
readonly backgroundColor: "#fffaf6";
|
|
57
|
-
readonly surfaceColor: "#
|
|
57
|
+
readonly surfaceColor: "#fffefd";
|
|
58
58
|
readonly inputBackgroundColor: "#ffffff";
|
|
59
|
-
readonly textColor: "#
|
|
59
|
+
readonly textColor: "#090f1f";
|
|
60
60
|
readonly mutedColor: "#626a73";
|
|
61
|
-
readonly borderColor: "#
|
|
62
|
-
readonly borderRadius: "
|
|
63
|
-
readonly controlRadius: "
|
|
64
|
-
readonly shadow: "0
|
|
65
|
-
readonly dangerColor: "#
|
|
66
|
-
readonly successColor: "#
|
|
67
|
-
readonly warningColor: "#
|
|
61
|
+
readonly borderColor: "#e7e1da";
|
|
62
|
+
readonly borderRadius: "16px";
|
|
63
|
+
readonly controlRadius: "10px";
|
|
64
|
+
readonly shadow: "0 12px 36px rgba(244,81,11,.08), 0 1px 2px rgba(9,15,31,.05)";
|
|
65
|
+
readonly dangerColor: "#c4322b";
|
|
66
|
+
readonly successColor: "#16835b";
|
|
67
|
+
readonly warningColor: "#a65f00";
|
|
68
68
|
readonly fontFamily: "Inter, ui-sans-serif, system-ui, sans-serif";
|
|
69
69
|
};
|
|
70
70
|
readonly "clinical-blue": {
|
|
@@ -613,6 +613,8 @@ declare function BillActivityTimeline({ events, emptyLabel, appearance, classNam
|
|
|
613
613
|
type BillLifecycleStage = "submitted" | "accepted" | "processed" | "closed";
|
|
614
614
|
/** Maps MindBill's detailed lifecycle state into a compact progress stage. */
|
|
615
615
|
declare function billLifecycleStage(state: string): BillLifecycleStage;
|
|
616
|
+
/** Returns the end-user label for a canonical lifecycle state. */
|
|
617
|
+
declare function billLifecycleDisplayLabel(state: string, nativeStatus?: string): string;
|
|
616
618
|
type BillLifecycleProgressProps = SurfaceProps & {
|
|
617
619
|
state: string;
|
|
618
620
|
nativeStatus?: string;
|
|
@@ -657,6 +659,8 @@ type UseBillLifecycleResult = {
|
|
|
657
659
|
reopenBill: BillLifecycleClient["reopenBill"];
|
|
658
660
|
postPayment: BillLifecycleClient["postPayment"];
|
|
659
661
|
submitSecondReview: BillLifecycleClient["submitSecondReview"];
|
|
662
|
+
resubmitBill: BillLifecycleClient["resubmitBill"];
|
|
663
|
+
simulateSandbox: BillLifecycleClient["simulateSandbox"];
|
|
660
664
|
};
|
|
661
665
|
declare function useBillLifecycle({ billId: providedBillId, sessionEndpoint, getSession, apiBaseUrl, refreshInterval, enabled, initialData, fetch: fetchOverride, }: UseBillLifecycleOptions): UseBillLifecycleResult;
|
|
662
666
|
type ConnectedBillLifecycleProps = UseBillLifecycleOptions & {
|
|
@@ -681,4 +685,4 @@ type MindBillWidgetProps = {
|
|
|
681
685
|
declare function MindBillBillTimeline(props: MindBillWidgetProps): ReactElement;
|
|
682
686
|
declare function MindBillBillReview(props: MindBillWidgetProps): ReactElement;
|
|
683
687
|
|
|
684
|
-
export { BILL_SUBMISSION_DIAGNOSIS_QUICK_PICKS, BILL_SUBMISSION_DOCUMENT_TYPES, BILL_SUBMISSION_REQUIRED_FIELDS, type BillActivityEvent, BillActivityTimeline, type BillActivityTimelineProps, BillLifecycleActions, type BillLifecycleActionsProps, BillLifecycleProgress, type BillLifecycleProgressProps, type BillLifecycleStage, BillPayerContactCard, type BillPayerContactCardProps, BillPaymentLedger, type BillPaymentLedgerProps, BillReadOnlyForm, type BillReadOnlyFormProps, BillRemittanceCard, type BillRemittanceCardProps, type BillReviewAttachment, type BillReviewBillingProvider, type BillReviewClinician, type BillReviewData, type BillReviewDocumentType, type BillReviewDraft, type BillReviewFeatures, BillReviewForm, type BillReviewFormProps, type BillReviewLineItem, type BillReviewLocation, type BillReviewPayer, type BillReviewSaveInput, BillSnapshotSummary, type BillSnapshotSummaryProps, type BillStatusAction, type BillStatusClient, type BillStatusClientOptions, type BillStatusData, type BillStatusSession, type BillStatusSessionProvider, type BillStatusSessionRequest, BillStatusSummary, type BillStatusSummaryProps, type BillSubmissionAddress, type BillSubmissionDiagnosisOption, type BillSubmissionDocumentType, type BillSubmissionEvaluationType, BillSubmissionForm, type BillSubmissionFormProps, type BillSubmissionFormValue, type BillSubmissionInput, type BillSubmissionModifierOption, type BillSubmissionPostalPlace, type BillSubmissionProcedureOption, type BillSubmissionRoute, type BillSubmissionSourceAttachment, type BillSubmissionUpload, type BillSubmissionValidation, ConnectedBillLifecycle, type ConnectedBillLifecycleProps, ConnectedBillStatus, type ConnectedBillStatusProps, DEFAULT_BILL_SUBMISSION_MODIFIERS, DEFAULT_BILL_SUBMISSION_PROCEDURES, MindBillBillReview, MindBillBillTimeline, type MindBillReactAppearance, type MindBillThemePreset, type MindBillWidgetProps, type UseBillLifecycleOptions, type UseBillLifecycleResult, type UseBillStatusOptions, type UseBillStatusResult, applyBillSubmissionEvaluationModifiers, billActivityEventLabel, billLifecycleStage, buildBillReviewSaveInput, calculateBillSubmissionAllowedAmount, createBillStatusClient, ensureTrailingBillSubmissionLine, ensureTrailingProcedureLine, formatBillSubmissionDate, mindBillAppearanceStyle, mindBillThemePresets, parseBillSubmissionDate, resolveMindBillAppearance, useBillLifecycle, useBillStatus, validateBillSubmission, visibleBillLifecycleActions };
|
|
688
|
+
export { BILL_SUBMISSION_DIAGNOSIS_QUICK_PICKS, BILL_SUBMISSION_DOCUMENT_TYPES, BILL_SUBMISSION_REQUIRED_FIELDS, type BillActivityEvent, BillActivityTimeline, type BillActivityTimelineProps, BillLifecycleActions, type BillLifecycleActionsProps, BillLifecycleProgress, type BillLifecycleProgressProps, type BillLifecycleStage, BillPayerContactCard, type BillPayerContactCardProps, BillPaymentLedger, type BillPaymentLedgerProps, BillReadOnlyForm, type BillReadOnlyFormProps, BillRemittanceCard, type BillRemittanceCardProps, type BillReviewAttachment, type BillReviewBillingProvider, type BillReviewClinician, type BillReviewData, type BillReviewDocumentType, type BillReviewDraft, type BillReviewFeatures, BillReviewForm, type BillReviewFormProps, type BillReviewLineItem, type BillReviewLocation, type BillReviewPayer, type BillReviewSaveInput, BillSnapshotSummary, type BillSnapshotSummaryProps, type BillStatusAction, type BillStatusClient, type BillStatusClientOptions, type BillStatusData, type BillStatusSession, type BillStatusSessionProvider, type BillStatusSessionRequest, BillStatusSummary, type BillStatusSummaryProps, type BillSubmissionAddress, type BillSubmissionDiagnosisOption, type BillSubmissionDocumentType, type BillSubmissionEvaluationType, BillSubmissionForm, type BillSubmissionFormProps, type BillSubmissionFormValue, type BillSubmissionInput, type BillSubmissionModifierOption, type BillSubmissionPostalPlace, type BillSubmissionProcedureOption, type BillSubmissionRoute, type BillSubmissionSourceAttachment, type BillSubmissionUpload, type BillSubmissionValidation, ConnectedBillLifecycle, type ConnectedBillLifecycleProps, ConnectedBillStatus, type ConnectedBillStatusProps, DEFAULT_BILL_SUBMISSION_MODIFIERS, DEFAULT_BILL_SUBMISSION_PROCEDURES, MindBillBillReview, MindBillBillTimeline, type MindBillReactAppearance, type MindBillThemePreset, type MindBillWidgetProps, type UseBillLifecycleOptions, type UseBillLifecycleResult, type UseBillStatusOptions, type UseBillStatusResult, applyBillSubmissionEvaluationModifiers, billActivityEventLabel, billLifecycleDisplayLabel, billLifecycleStage, buildBillReviewSaveInput, calculateBillSubmissionAllowedAmount, createBillStatusClient, ensureTrailingBillSubmissionLine, ensureTrailingProcedureLine, formatBillSubmissionDate, mindBillAppearanceStyle, mindBillThemePresets, parseBillSubmissionDate, resolveMindBillAppearance, useBillLifecycle, useBillStatus, validateBillSubmission, visibleBillLifecycleActions };
|
package/dist/index.js
CHANGED
|
@@ -40,20 +40,20 @@ var mindBillThemePresets = {
|
|
|
40
40
|
fontFamily: "Inter, ui-sans-serif, system-ui, sans-serif"
|
|
41
41
|
},
|
|
42
42
|
"orange-bright": {
|
|
43
|
-
accentColor: "#
|
|
43
|
+
accentColor: "#f4510b",
|
|
44
44
|
accentTextColor: "#ffffff",
|
|
45
45
|
backgroundColor: "#fffaf6",
|
|
46
|
-
surfaceColor: "#
|
|
46
|
+
surfaceColor: "#fffefd",
|
|
47
47
|
inputBackgroundColor: "#ffffff",
|
|
48
|
-
textColor: "#
|
|
48
|
+
textColor: "#090f1f",
|
|
49
49
|
mutedColor: "#626a73",
|
|
50
|
-
borderColor: "#
|
|
51
|
-
borderRadius: "
|
|
52
|
-
controlRadius: "
|
|
53
|
-
shadow: "0
|
|
54
|
-
dangerColor: "#
|
|
55
|
-
successColor: "#
|
|
56
|
-
warningColor: "#
|
|
50
|
+
borderColor: "#e7e1da",
|
|
51
|
+
borderRadius: "16px",
|
|
52
|
+
controlRadius: "10px",
|
|
53
|
+
shadow: "0 12px 36px rgba(244,81,11,.08), 0 1px 2px rgba(9,15,31,.05)",
|
|
54
|
+
dangerColor: "#c4322b",
|
|
55
|
+
successColor: "#16835b",
|
|
56
|
+
warningColor: "#a65f00",
|
|
57
57
|
fontFamily: "Inter, ui-sans-serif, system-ui, sans-serif"
|
|
58
58
|
},
|
|
59
59
|
"clinical-blue": {
|
|
@@ -2252,7 +2252,7 @@ function BillActivityTimeline({ events, emptyLabel = "No bill activity yet.", ap
|
|
|
2252
2252
|
] });
|
|
2253
2253
|
}
|
|
2254
2254
|
var lifecycleStages = [
|
|
2255
|
-
{ id: "submitted", label: "
|
|
2255
|
+
{ id: "submitted", label: "Sent" },
|
|
2256
2256
|
{ id: "accepted", label: "Accepted" },
|
|
2257
2257
|
{ id: "processed", label: "Processed" },
|
|
2258
2258
|
{ id: "closed", label: "Closed" }
|
|
@@ -2260,17 +2260,28 @@ var lifecycleStages = [
|
|
|
2260
2260
|
function billLifecycleStage(state) {
|
|
2261
2261
|
const value = state.toLowerCase();
|
|
2262
2262
|
if (value.includes("closed") || value.includes("written_off")) return "closed";
|
|
2263
|
-
if (value.includes("
|
|
2263
|
+
if (value.includes("second_review") || value.includes("appeal") || value.includes("reject")) return "submitted";
|
|
2264
|
+
if (value.includes("processed") || value.includes("paid") || value.includes("denied") || value.includes("partial") || value.includes("response") || value.includes("ibr") || value.includes("lien")) return "processed";
|
|
2264
2265
|
if (value.includes("accepted")) return "accepted";
|
|
2265
2266
|
return "submitted";
|
|
2266
2267
|
}
|
|
2268
|
+
function billLifecycleDisplayLabel(state, nativeStatus) {
|
|
2269
|
+
const value = state.toLowerCase();
|
|
2270
|
+
if (value === "submitted") return "Sent";
|
|
2271
|
+
if (value === "second_review") return "Second Review sent";
|
|
2272
|
+
if (value === "rejected") return "Rejected";
|
|
2273
|
+
if (value === "denied") return "Denied";
|
|
2274
|
+
if (value === "partially_paid") return "Partially paid";
|
|
2275
|
+
if (value === "written_off") return "Written off";
|
|
2276
|
+
return humanize(state || nativeStatus || "submitted");
|
|
2277
|
+
}
|
|
2267
2278
|
function BillLifecycleProgress({ state, nativeStatus, submittedAt, agingDays, appearance, className, style }) {
|
|
2268
2279
|
const current = billLifecycleStage(state);
|
|
2269
2280
|
const currentIndex = lifecycleStages.findIndex((stage) => stage.id === current);
|
|
2270
2281
|
return /* @__PURE__ */ jsxs5("section", { className: classes("mb-surface mb-progress", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Bill lifecycle", children: [
|
|
2271
2282
|
/* @__PURE__ */ jsx5("style", { children: lifecycleSurfaceStyles }),
|
|
2272
2283
|
/* @__PURE__ */ jsx5("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs5("div", { children: [
|
|
2273
|
-
/* @__PURE__ */ jsx5("strong", { children:
|
|
2284
|
+
/* @__PURE__ */ jsx5("strong", { children: billLifecycleDisplayLabel(state, nativeStatus) }),
|
|
2274
2285
|
/* @__PURE__ */ jsxs5("span", { children: [
|
|
2275
2286
|
submittedAt ? `Submitted ${defaultFormatDate(submittedAt)}` : "Submitted",
|
|
2276
2287
|
typeof agingDays === "number" ? ` \xB7 ${agingDays} days old` : ""
|
|
@@ -2536,7 +2547,9 @@ function useBillLifecycle({
|
|
|
2536
2547
|
closeBill: (input) => mutate(() => client.closeBill(input)),
|
|
2537
2548
|
reopenBill: (input) => mutate(() => client.reopenBill(input)),
|
|
2538
2549
|
postPayment: (input) => mutate(() => client.postPayment(input)),
|
|
2539
|
-
submitSecondReview: (input) => mutate(() => client.submitSecondReview(input))
|
|
2550
|
+
submitSecondReview: (input) => mutate(() => client.submitSecondReview(input)),
|
|
2551
|
+
resubmitBill: (input) => mutate(() => client.resubmitBill(input)),
|
|
2552
|
+
simulateSandbox: (input) => mutate(() => client.simulateSandbox(input))
|
|
2540
2553
|
};
|
|
2541
2554
|
}
|
|
2542
2555
|
function LifecycleDialog({ children, title, onClose }) {
|
|
@@ -2560,16 +2573,25 @@ function today() {
|
|
|
2560
2573
|
const now = /* @__PURE__ */ new Date();
|
|
2561
2574
|
return new Date(now.getTime() - now.getTimezoneOffset() * 6e4).toISOString().slice(0, 10);
|
|
2562
2575
|
}
|
|
2563
|
-
function stateLabel(state) {
|
|
2564
|
-
return state.replace(/[._-]+/g, " ").replace(/\b\w/g, (letter) => letter.toUpperCase());
|
|
2565
|
-
}
|
|
2566
2576
|
function actionPanel(action) {
|
|
2577
|
+
if (action.id === "resubmit") return "resubmit";
|
|
2567
2578
|
if (action.id === "second_review") return "second_review";
|
|
2568
2579
|
if (action.id === "post_payment") return "payment";
|
|
2569
2580
|
if (action.id === "close") return "close";
|
|
2570
2581
|
if (action.id === "reopen") return "reopen";
|
|
2571
2582
|
return "";
|
|
2572
2583
|
}
|
|
2584
|
+
function sandboxScenarios(state) {
|
|
2585
|
+
if (state === "submitted") return [
|
|
2586
|
+
{ id: "accepted", label: "Accept submission", detail: "Add clearinghouse and payer acknowledgements." },
|
|
2587
|
+
{ id: "rejected", label: "Reject submission", detail: "Return a correctable routing rejection." }
|
|
2588
|
+
];
|
|
2589
|
+
if (state === "accepted" || state === "second_review") return [
|
|
2590
|
+
{ id: "processed", label: "Process with EOR", detail: "Attach a synthetic payer EOR and enable payment posting." },
|
|
2591
|
+
{ id: "denied", label: "Deny payment", detail: "Attach a realistic denial EOR and enable Second Review." }
|
|
2592
|
+
];
|
|
2593
|
+
return [];
|
|
2594
|
+
}
|
|
2573
2595
|
function ConnectedBillLifecycle({ appearance, className, style, loadingFallback, errorFallback, onChanged, ...options }) {
|
|
2574
2596
|
const lifecycle = useBillLifecycle(options);
|
|
2575
2597
|
const { data } = lifecycle;
|
|
@@ -2611,8 +2633,9 @@ function ConnectedBillLifecycle({ appearance, className, style, loadingFallback,
|
|
|
2611
2633
|
}
|
|
2612
2634
|
};
|
|
2613
2635
|
const viewEor = data.lifecycle.actions.find((action) => action.id === "view_eor" && action.enabled);
|
|
2614
|
-
const supportedActions = /* @__PURE__ */ new Set(["second_review", "post_payment", "close", "reopen"]);
|
|
2636
|
+
const supportedActions = /* @__PURE__ */ new Set(["resubmit", "second_review", "post_payment", "close", "reopen"]);
|
|
2615
2637
|
const actions = data.lifecycle.actions.filter((action) => action.enabled && supportedActions.has(action.id));
|
|
2638
|
+
const simulations = data.environment === "sandbox" ? sandboxScenarios(data.lifecycle.state) : [];
|
|
2616
2639
|
return /* @__PURE__ */ jsxs6("section", { className: ["mb-connected-lifecycle", className].filter(Boolean).join(" "), style: mindBillAppearanceStyle(appearance, style), children: [
|
|
2617
2640
|
/* @__PURE__ */ jsx6("style", { children: CONNECTED_LIFECYCLE_STYLES }),
|
|
2618
2641
|
/* @__PURE__ */ jsx6(BillLifecycleProgress, { state: data.lifecycle.state, nativeStatus: data.lifecycle.nativeStatus, submittedAt: data.lifecycle.submittedAt ?? null, agingDays: data.lifecycle.agingDays ?? null, ...appearance ? { appearance } : {} }),
|
|
@@ -2623,7 +2646,7 @@ function ConnectedBillLifecycle({ appearance, className, style, loadingFallback,
|
|
|
2623
2646
|
"Bill #",
|
|
2624
2647
|
data.bill.billNumber
|
|
2625
2648
|
] }),
|
|
2626
|
-
/* @__PURE__ */ jsx6("span", { children:
|
|
2649
|
+
/* @__PURE__ */ jsx6("span", { children: billLifecycleDisplayLabel(data.lifecycle.state, data.lifecycle.nativeStatus) })
|
|
2627
2650
|
] }),
|
|
2628
2651
|
/* @__PURE__ */ jsxs6("p", { children: [
|
|
2629
2652
|
"Claim ",
|
|
@@ -2640,6 +2663,17 @@ function ConnectedBillLifecycle({ appearance, className, style, loadingFallback,
|
|
|
2640
2663
|
/* @__PURE__ */ jsx6("span", { children: data.activity.length })
|
|
2641
2664
|
] })
|
|
2642
2665
|
] }),
|
|
2666
|
+
data.environment === "sandbox" ? /* @__PURE__ */ jsxs6("section", { className: "mb-lifecycle-simulator", "aria-label": "Sandbox lifecycle simulator", children: [
|
|
2667
|
+
/* @__PURE__ */ jsxs6("div", { children: [
|
|
2668
|
+
/* @__PURE__ */ jsx6("span", { children: "Sandbox demo controls" }),
|
|
2669
|
+
/* @__PURE__ */ jsx6("h3", { children: "Simulate the next payer response" }),
|
|
2670
|
+
/* @__PURE__ */ jsx6("p", { children: "This changes sandbox data only. QME Companion receives the result through the same lifecycle API and components partners use." })
|
|
2671
|
+
] }),
|
|
2672
|
+
simulations.length ? /* @__PURE__ */ jsx6("div", { className: "mb-lifecycle-simulator-actions", children: simulations.map((scenario) => /* @__PURE__ */ jsxs6("button", { type: "button", disabled: lifecycle.isMutating, onClick: () => void complete(`${scenario.label} simulated.`, () => lifecycle.simulateSandbox({ scenario: scenario.id })), children: [
|
|
2673
|
+
/* @__PURE__ */ jsx6("strong", { children: scenario.label }),
|
|
2674
|
+
/* @__PURE__ */ jsx6("span", { children: scenario.detail })
|
|
2675
|
+
] }, scenario.id)) }) : /* @__PURE__ */ jsx6("p", { className: "mb-lifecycle-simulator-idle", children: "No simulated payer transition is needed at this stage. Use the bill action below to continue." })
|
|
2676
|
+
] }) : null,
|
|
2643
2677
|
tab === "details" ? /* @__PURE__ */ jsxs6("div", { className: "mb-lifecycle-tabpanel", role: "tabpanel", children: [
|
|
2644
2678
|
/* @__PURE__ */ jsx6(BillReadOnlyForm, { data, onOpenAttachment: lifecycle.openAttachment, ...appearance ? { appearance } : {} }),
|
|
2645
2679
|
data.eors.length ? /* @__PURE__ */ jsxs6("section", { className: "mb-lifecycle-card", id: `mb-eors-${data.bill.id}`, children: [
|
|
@@ -2672,6 +2706,20 @@ function ConnectedBillLifecycle({ appearance, className, style, loadingFallback,
|
|
|
2672
2706
|
] })
|
|
2673
2707
|
] }) : null
|
|
2674
2708
|
] }) : /* @__PURE__ */ jsx6("div", { className: "mb-lifecycle-tabpanel", role: "tabpanel", children: /* @__PURE__ */ jsx6(BillActivityTimeline, { events: data.activity, ...appearance ? { appearance } : {} }) }),
|
|
2709
|
+
panel === "resubmit" ? /* @__PURE__ */ jsx6(LifecycleDialog, { title: "Correct and resubmit", onClose: () => setPanel(""), children: /* @__PURE__ */ jsxs6("section", { className: "mb-lifecycle-panel", children: [
|
|
2710
|
+
/* @__PURE__ */ jsxs6("div", { children: [
|
|
2711
|
+
/* @__PURE__ */ jsx6("h3", { children: "Correct and resubmit" }),
|
|
2712
|
+
/* @__PURE__ */ jsx6("p", { children: "The original submission remains immutable. This records a new submission attempt after the routing issue is corrected." })
|
|
2713
|
+
] }),
|
|
2714
|
+
/* @__PURE__ */ jsxs6("label", { children: [
|
|
2715
|
+
/* @__PURE__ */ jsx6("span", { children: "Correction note (optional)" }),
|
|
2716
|
+
/* @__PURE__ */ jsx6("textarea", { value: reason, placeholder: "What changed before resubmission?", onChange: (event) => setReason(event.target.value) })
|
|
2717
|
+
] }),
|
|
2718
|
+
/* @__PURE__ */ jsxs6("div", { className: "mb-lifecycle-panel-actions", children: [
|
|
2719
|
+
/* @__PURE__ */ jsx6("button", { type: "button", className: "mb-lifecycle-button secondary", onClick: () => setPanel(""), children: "Cancel" }),
|
|
2720
|
+
/* @__PURE__ */ jsx6("button", { type: "button", className: "mb-lifecycle-button primary", disabled: lifecycle.isMutating, onClick: () => void complete("Bill resubmitted.", () => lifecycle.resubmitBill({ reason })), children: lifecycle.isMutating ? "Resubmitting\u2026" : "Resubmit bill" })
|
|
2721
|
+
] })
|
|
2722
|
+
] }) }) : null,
|
|
2675
2723
|
panel === "second_review" ? /* @__PURE__ */ jsx6(LifecycleDialog, { title: "Submit Second Review", onClose: () => setPanel(""), children: /* @__PURE__ */ jsxs6("section", { className: "mb-lifecycle-panel", children: [
|
|
2676
2724
|
/* @__PURE__ */ jsxs6("div", { children: [
|
|
2677
2725
|
/* @__PURE__ */ jsx6("h3", { children: "Submit Second Review" }),
|
|
@@ -2770,6 +2818,7 @@ function ConnectedBillLifecycle({ appearance, className, style, loadingFallback,
|
|
|
2770
2818
|
] });
|
|
2771
2819
|
}
|
|
2772
2820
|
var CONNECTED_LIFECYCLE_STYLES = `
|
|
2821
|
+
.mb-lifecycle-simulator{display:grid;gap:14px;padding:18px;border:1px solid #b8dadd;border-radius:var(--mb-radius,14px);background:#f2fbfb}.mb-lifecycle-simulator>div:first-child>span{color:var(--mb-accent);font-size:.72rem;font-weight:850;letter-spacing:.09em;text-transform:uppercase}.mb-lifecycle-simulator h3{margin:3px 0 0;font-size:1.05rem}.mb-lifecycle-simulator p{margin:4px 0 0;color:var(--mb-muted)}.mb-lifecycle-simulator-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px}.mb-lifecycle-simulator-actions button{min-height:76px;border:1px solid #a9cccf;border-radius:10px;background:var(--mb-surface);color:var(--mb-text);cursor:pointer;padding:12px 14px;text-align:left;font:inherit}.mb-lifecycle-simulator-actions button:hover{border-color:var(--mb-accent);box-shadow:0 3px 14px rgba(23,108,112,.1)}.mb-lifecycle-simulator-actions button:disabled{cursor:not-allowed;opacity:.55}.mb-lifecycle-simulator-actions button strong,.mb-lifecycle-simulator-actions button span{display:block}.mb-lifecycle-simulator-actions button span{margin-top:3px;color:var(--mb-muted);font-size:.83rem}.mb-lifecycle-simulator-idle{padding:10px 12px;border-radius:8px;background:rgba(255,255,255,.72)}
|
|
2773
2822
|
.mb-connected-lifecycle{--mb-accent:#176c70;--mb-text:#17282d;--mb-muted:#607176;--mb-border:#d7e0df;--mb-soft:#f4f7f6;--mb-surface:#fff;display:grid;gap:18px;color:var(--mb-text);font:14px/1.45 var(--mb-font,Inter,ui-sans-serif,system-ui,sans-serif)}.mb-connected-lifecycle *{box-sizing:border-box}.mb-lifecycle-head{display:flex;align-items:center;justify-content:space-between;gap:20px}.mb-lifecycle-title{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.mb-lifecycle-title h2{margin:0;font-size:1.7rem}.mb-lifecycle-title span{border-radius:999px;background:var(--mb-soft);padding:5px 10px;font-weight:750}.mb-lifecycle-head p{margin:3px 0 0;color:var(--mb-muted)}.mb-lifecycle-tabs{display:grid;grid-template-columns:1fr 1fr;border:1px solid var(--mb-border);border-radius:12px;background:var(--mb-surface);padding:6px}.mb-lifecycle-tabs button{min-height:46px;border:0;border-radius:8px;background:transparent;color:var(--mb-muted);font:inherit;font-size:1rem;font-weight:750;cursor:pointer}.mb-lifecycle-tabs button[aria-selected=true]{background:var(--mb-accent);color:white}.mb-lifecycle-tabs span{display:inline-grid;place-items:center;min-width:24px;height:24px;margin-left:6px;border-radius:999px;background:rgba(127,127,127,.14);font-size:.8rem}.mb-lifecycle-tabpanel{display:grid;gap:18px}.mb-lifecycle-button{min-height:40px;border:1px solid var(--mb-border);border-radius:var(--mb-control-radius,8px);background:var(--mb-input,#fff);color:var(--mb-text);cursor:pointer;font:inherit;font-weight:750;padding:9px 14px}.mb-lifecycle-button.primary{border-color:var(--mb-accent);background:var(--mb-accent);color:var(--mb-accent-contrast,#fff)}.mb-lifecycle-button:disabled{cursor:not-allowed;opacity:.5}.mb-lifecycle-card,.mb-lifecycle-actions-sheet,.mb-lifecycle-panel{padding:20px;border:1px solid var(--mb-border);border-radius:var(--mb-radius,14px);background:var(--mb-surface)}.mb-lifecycle-card header,.mb-lifecycle-actions-sheet{display:flex;align-items:center;justify-content:space-between;gap:20px}.mb-lifecycle-card h3,.mb-lifecycle-actions-sheet h3,.mb-lifecycle-panel h3{margin:0;font-size:1.08rem}.mb-lifecycle-card p,.mb-lifecycle-actions-sheet p,.mb-lifecycle-panel p{margin:3px 0 0;color:var(--mb-muted)}.mb-lifecycle-card header>span{display:grid;place-items:center;min-width:28px;height:28px;border-radius:999px;background:var(--mb-soft);font-weight:750}.mb-lifecycle-actions-sheet>div:last-child{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}.mb-lifecycle-documents{list-style:none;margin:14px 0 0;padding:0}.mb-lifecycle-documents li{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 0;border-top:1px solid var(--mb-border)}.mb-lifecycle-documents li>div{display:grid;gap:3px;min-width:0}.mb-lifecycle-documents li span{color:var(--mb-muted);font-size:.85rem}.mb-lifecycle-dialog-backdrop{position:fixed;z-index:2147483000;inset:0;display:grid;place-items:center;padding:20px;background:rgba(18,35,43,.56);backdrop-filter:blur(3px)}.mb-lifecycle-dialog{position:relative;width:min(760px,100%);max-height:calc(100vh - 40px);overflow:auto;outline:0}.mb-lifecycle-dialog-close{position:absolute;z-index:1;top:12px;right:12px;width:34px;height:34px;border:1px solid var(--mb-border);border-radius:8px;background:var(--mb-surface);color:var(--mb-text);cursor:pointer;font:22px/1 inherit}.mb-lifecycle-panel{display:grid;gap:17px;padding-top:24px;box-shadow:0 24px 70px rgba(18,35,43,.22)}.mb-lifecycle-panel label{display:grid;gap:6px;font-size:.85rem;font-weight:750}.mb-lifecycle-panel label small{color:var(--mb-muted);font-weight:500}.mb-lifecycle-panel input,.mb-lifecycle-panel select,.mb-lifecycle-panel textarea{width:100%;min-height:44px;border:1px solid var(--mb-border);border-radius:var(--mb-control-radius,8px);background:var(--mb-input,#fff);color:var(--mb-text);font:inherit;padding:10px 12px}.mb-lifecycle-panel textarea{min-height:100px;resize:vertical}.mb-lifecycle-fields{display:grid;gap:13px}.mb-lifecycle-fields.two{grid-template-columns:repeat(2,minmax(0,1fr))}.mb-lifecycle-fields .full{grid-column:1/-1}.mb-lifecycle-panel-actions{display:flex;justify-content:flex-end;gap:8px}.mb-lifecycle-packet{display:grid;gap:0;margin:0;padding:0;border:0}.mb-lifecycle-packet legend{margin-bottom:7px;font-size:.85rem;font-weight:800}.mb-lifecycle-packet>label{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;padding:10px 2px;border-top:1px solid var(--mb-border)}.mb-lifecycle-packet>label>input{width:16px;min-height:16px}.mb-lifecycle-packet>label>span{display:grid}.mb-lifecycle-packet button{border:0;background:transparent;color:var(--mb-accent);cursor:pointer;font:inherit}.mb-lifecycle-message,.mb-lifecycle-error,.mb-lifecycle-loading{padding:12px 14px;border-radius:9px}.mb-lifecycle-message.success{background:#edf9f2;color:#217449}.mb-lifecycle-message.error,.mb-lifecycle-error{background:#fff0ef;color:#9d3029}.mb-lifecycle-error{display:flex;align-items:center;gap:12px}.mb-lifecycle-error span{flex:1}.mb-lifecycle-error button{border:1px solid currentColor;border-radius:7px;background:transparent;color:inherit;padding:7px 10px}
|
|
2774
2823
|
@media(max-width:700px){.mb-lifecycle-head,.mb-lifecycle-actions-sheet,.mb-lifecycle-card header{align-items:stretch;flex-direction:column}.mb-lifecycle-head>.mb-lifecycle-button{width:100%}.mb-lifecycle-actions-sheet>div:last-child{justify-content:stretch}.mb-lifecycle-actions-sheet .mb-lifecycle-button{width:100%}.mb-lifecycle-fields.two{grid-template-columns:1fr}.mb-lifecycle-fields .full{grid-column:auto}.mb-lifecycle-dialog-backdrop{align-items:end;padding:0}.mb-lifecycle-dialog{max-height:92vh}.mb-lifecycle-dialog .mb-lifecycle-panel{border-radius:18px 18px 0 0}.mb-lifecycle-tabs button{font-size:.9rem}.mb-lifecycle-title h2{font-size:1.4rem}}
|
|
2775
2824
|
`;
|
|
@@ -2837,6 +2886,7 @@ export {
|
|
|
2837
2886
|
MindBillBillTimeline,
|
|
2838
2887
|
applyBillSubmissionEvaluationModifiers,
|
|
2839
2888
|
billActivityEventLabel,
|
|
2889
|
+
billLifecycleDisplayLabel,
|
|
2840
2890
|
billLifecycleStage,
|
|
2841
2891
|
buildBillReviewSaveInput,
|
|
2842
2892
|
calculateBillSubmissionAllowedAmount,
|