@alfadocs/ui-kit 1.4.11 → 1.4.13
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/_chunks/actions-cell-renderer-BD-jruqA.js +1784 -0
- package/dist/_chunks/{address-fields-pHsfkXGk.js → address-fields-D-8akw2m.js} +2 -2
- package/dist/_chunks/{agenda-card-BCGaQazD.js → agenda-card-BQDs2ZMp.js} +2 -2
- package/dist/_chunks/{agenda-tray-CG6FuccE.js → agenda-tray-BTyWsVwT.js} +2 -2
- package/dist/_chunks/{ai-consent-banner-CpF_rbG9.js → ai-consent-banner-gVcoiXxv.js} +2 -2
- package/dist/_chunks/{anamnesis-card-C4FVp9wO.js → anamnesis-card-Bt0twrML.js} +2 -2
- package/dist/_chunks/anamnesis-summary-card-BKGVcwny.js +350 -0
- package/dist/_chunks/{anamnesis-summary-rows-Dw3l6nOD.js → anamnesis-summary-rows-B5MAYkJ-.js} +2768 -2951
- package/dist/_chunks/{antenatal-schedule-timeline-u8TsS2QJ.js → antenatal-schedule-timeline-BSLrOQ3S.js} +2 -2
- package/dist/_chunks/{appointment-card-DgKI5QKD.js → appointment-card-kcUC7vWR.js} +2 -2
- package/dist/_chunks/{appointment-timeline-CUijZCxZ.js → appointment-timeline-BC3dlZu5.js} +2 -2
- package/dist/_chunks/{appointment-tray-B1aUk46V.js → appointment-tray-BPY5rATW.js} +2 -2
- package/dist/_chunks/{badge-DCOqV9mI.js → badge-CIt-UFEx.js} +28 -28
- package/dist/_chunks/{bishop-score-Bpe20Ctl.js → bishop-score-B6iYYO0c.js} +3 -3
- package/dist/_chunks/{bmi-calculator-DF5bNsDD.js → bmi-calculator-DC5SaqXT.js} +5 -5
- package/dist/_chunks/{booking-DuSkvE5x.js → booking-CmHX15dh.js} +2 -2
- package/dist/_chunks/{care-plan-card-DiyK3Eys.js → care-plan-card-9tLgsDYY.js} +3 -3
- package/dist/_chunks/{care-plan-entry-card-6du8PYVk.js → care-plan-entry-card-CSan4h7A.js} +2 -2
- package/dist/_chunks/{care-plan-header-BWvDvly-.js → care-plan-header-D_BTi77b.js} +2 -2
- package/dist/_chunks/{clinical-note-card-D63x_AkK.js → clinical-note-card-ByzQ86uz.js} +2 -2
- package/dist/_chunks/{connection-status-Bi4Hwpd1.js → connection-status-D8mZ4klk.js} +2 -2
- package/dist/_chunks/{contact-profile-card-CGS_NABR.js → contact-profile-card-DuW6VpzY.js} +2 -2
- package/dist/_chunks/{cycle-calculator-Bd4_fJhq.js → cycle-calculator-B_NlctlQ.js} +4 -4
- package/dist/_chunks/{date-time-picker-DafkGDGO.js → date-time-picker-DVETwpzc.js} +2 -2
- package/dist/_chunks/{dependent-selector-DyFpdzZV.js → dependent-selector-BUvrZRi0.js} +2 -2
- package/dist/_chunks/{document-preview-DuMzmupZ.js → document-preview-Di15VrpQ.js} +2 -2
- package/dist/_chunks/{due-date-calculator-Do67C-Z-.js → due-date-calculator-le1z3KpW.js} +6 -6
- package/dist/_chunks/{fetal-weight-DHxXx7Uz.js → fetal-weight-DXA6ZpMq.js} +4 -4
- package/dist/_chunks/{field-value-C5A4t4OE.js → field-value-BCFLVBmu.js} +2 -2
- package/dist/_chunks/{file-manager-BY6FdHAt.js → file-manager-BjCM2fZB.js} +3 -3
- package/dist/_chunks/form-field-D1oqYisL.js +127 -0
- package/dist/_chunks/{gestational-age-calculator-CMhOtFE_.js → gestational-age-calculator-Ch8vmJAl.js} +5 -5
- package/dist/_chunks/{hcg-doubling-DNG9Q2go.js → hcg-doubling-BT6lki_i.js} +5 -5
- package/dist/_chunks/{link-cell-renderer-C8npOgmM.js → link-cell-renderer-C7GvyK66.js} +3 -3
- package/dist/_chunks/{marketplace-app-shell-BxOiy25s.js → marketplace-app-shell-BhRH7Zi4.js} +2 -2
- package/dist/_chunks/{notes-panel-BoyzMHI_.js → notes-panel-Bz83SO4-.js} +2 -2
- package/dist/_chunks/number-input-CM1q9zvH.js +414 -0
- package/dist/_chunks/{operator-hero-DVy0RGoD.js → operator-hero-CpJkDNAM.js} +2 -2
- package/dist/_chunks/{optical-prescription-Brs0CeP3.js → optical-prescription-CQR_WJiS.js} +2 -2
- package/dist/_chunks/{patient-details-Bf4iTAPp.js → patient-details-CnFgF3MU.js} +3 -3
- package/dist/_chunks/{patient-summary-card-dkV6a53T.js → patient-summary-card-DfbOtOV6.js} +3 -3
- package/dist/_chunks/{patient-table-zifAcsjV.js → patient-table-BXzcrC79.js} +4 -4
- package/dist/_chunks/{payment-automation-upsell-CZZPGfs0.js → payment-automation-upsell-Ckh3b7Xx.js} +2 -2
- package/dist/_chunks/{payment-request-card-Dy7_DA-2.js → payment-request-card-Dn6-tH-D.js} +2 -2
- package/dist/_chunks/{periodontal-chart-CfFgKXWa.js → periodontal-chart-B0yko9Xm.js} +2 -2
- package/dist/_chunks/{periodontal-chart-card--6yTUsrQ.js → periodontal-chart-card-HbYTmWlo.js} +2 -2
- package/dist/_chunks/{periodontal-diagnosis-cco40xTa.js → periodontal-diagnosis-Qk4F3Wc_.js} +3 -3
- package/dist/_chunks/{periodontal-risk-chart-bUGkMwDg.js → periodontal-risk-chart-ByKuM4cF.js} +2 -2
- package/dist/_chunks/{practice-results-Mys11x9p.js → practice-results-C5exrEn0.js} +2 -2
- package/dist/_chunks/{pregnancy-dating-t3oM4ZzC.js → pregnancy-dating-4tPV_Yko.js} +6 -6
- package/dist/_chunks/{pregnancy-weight-gain-Bfz7SbIw.js → pregnancy-weight-gain-BBgbWBGe.js} +5 -5
- package/dist/_chunks/radio-group-BmIqhIT2.js +171 -0
- package/dist/_chunks/{radiograph-panel.agent-DyA4wsZA.js → radiograph-panel.agent-Drj0hYVV.js} +3 -3
- package/dist/_chunks/signature-status-chip-DlLJk1VA.js +97 -0
- package/dist/_chunks/{tab-bar-BYESZINM.js → tab-bar-Ddp_ZbnL.js} +2 -2
- package/dist/_chunks/{tasks-panel-CoESdfZI.js → tasks-panel-T7vaKJcA.js} +2 -2
- package/dist/_chunks/{time-picker-BPlJWm8w.js → time-picker-D0RS391l.js} +66 -63
- package/dist/_chunks/{unit-converter-lUW9Q888.js → unit-converter-Dsk__pjA.js} +3 -3
- package/dist/_chunks/{widget-picker-DEmTVuFL.js → widget-picker-DqMbjQy_.js} +2 -2
- package/dist/_chunks/{workflow-map-C5PGP6cD.js → workflow-map-BNBeG2zn.js} +2 -2
- package/dist/agent-catalog.json +34 -34
- package/dist/agent-i18n/en.json +4 -4
- package/dist/components/address-fields/index.js +1 -1
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-consent-banner/index.js +1 -1
- package/dist/components/anamnesis-card/index.js +1 -1
- package/dist/components/anamnesis-summary-card/index.js +1 -1
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/badge/badge.d.ts +1 -0
- package/dist/components/badge/index.js +1 -1
- package/dist/components/bishop-score/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/care-plan-header/index.js +1 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/connection-status/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/data-table.d.ts +19 -0
- package/dist/components/data-table/expanded-row-renderer.d.ts +47 -0
- package/dist/components/data-table/index.d.ts +2 -0
- package/dist/components/data-table/index.js +31 -27
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/dependent-selector/index.js +1 -1
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/form-field/form-field.d.ts +6 -0
- package/dist/components/form-field/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/number-input/number-input.d.ts +11 -0
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/optical-prescription/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/periodontal-chart/index.js +1 -1
- package/dist/components/periodontal-chart-card/index.js +1 -1
- package/dist/components/periodontal-diagnosis/index.js +1 -1
- package/dist/components/periodontal-risk-chart/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/radio-group/index.js +1 -1
- package/dist/components/radio-group/radio-group.d.ts +3 -0
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/signature-status-chip/index.d.ts +3 -0
- package/dist/components/signature-status-chip/index.js +6 -0
- package/dist/components/signature-status-chip/signature-status-chip.d.ts +29 -0
- package/dist/components/tab-bar/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/time-picker/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/widget-picker/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/host-compat.css +4 -1
- package/dist/i18n/locales/ar.d.ts +17 -0
- package/dist/i18n/locales/ar.js +11 -0
- package/dist/i18n/locales/de.d.ts +17 -0
- package/dist/i18n/locales/de.js +11 -0
- package/dist/i18n/locales/el.d.ts +17 -0
- package/dist/i18n/locales/el.js +11 -0
- package/dist/i18n/locales/en.d.ts +17 -0
- package/dist/i18n/locales/en.js +11 -0
- package/dist/i18n/locales/es.d.ts +17 -0
- package/dist/i18n/locales/es.js +11 -0
- package/dist/i18n/locales/fr.d.ts +17 -0
- package/dist/i18n/locales/fr.js +11 -0
- package/dist/i18n/locales/hi.d.ts +17 -0
- package/dist/i18n/locales/hi.js +11 -0
- package/dist/i18n/locales/it.d.ts +17 -0
- package/dist/i18n/locales/it.js +11 -0
- package/dist/i18n/locales/ja.d.ts +17 -0
- package/dist/i18n/locales/ja.js +11 -0
- package/dist/i18n/locales/nl.d.ts +17 -0
- package/dist/i18n/locales/nl.js +11 -0
- package/dist/i18n/locales/pl.d.ts +17 -0
- package/dist/i18n/locales/pl.js +11 -0
- package/dist/i18n/locales/pt.d.ts +17 -0
- package/dist/i18n/locales/pt.js +11 -0
- package/dist/i18n/locales/ro.d.ts +17 -0
- package/dist/i18n/locales/ro.js +11 -0
- package/dist/i18n/locales/ru.d.ts +17 -0
- package/dist/i18n/locales/ru.js +11 -0
- package/dist/i18n/locales/sq.d.ts +17 -0
- package/dist/i18n/locales/sq.js +11 -0
- package/dist/i18n/locales/sv.d.ts +17 -0
- package/dist/i18n/locales/sv.js +11 -0
- package/dist/i18n/locales/tr.d.ts +17 -0
- package/dist/i18n/locales/tr.js +11 -0
- package/dist/i18n/locales/zh.d.ts +17 -0
- package/dist/i18n/locales/zh.js +11 -0
- package/dist/index.js +799 -792
- package/dist/locales/ar.json +17 -0
- package/dist/locales/de.json +17 -0
- package/dist/locales/el.json +17 -0
- package/dist/locales/en.json +17 -0
- package/dist/locales/es.json +17 -0
- package/dist/locales/fr.json +17 -0
- package/dist/locales/hi.json +17 -0
- package/dist/locales/it.json +17 -0
- package/dist/locales/ja.json +17 -0
- package/dist/locales/nl.json +17 -0
- package/dist/locales/pl.json +17 -0
- package/dist/locales/pt.json +17 -0
- package/dist/locales/ro.json +17 -0
- package/dist/locales/ru.json +17 -0
- package/dist/locales/sq.json +17 -0
- package/dist/locales/sv.json +17 -0
- package/dist/locales/tr.json +17 -0
- package/dist/locales/zh.json +17 -0
- package/dist/patterns/anamnesis/anamnesis-baseline.d.ts +6 -0
- package/dist/patterns/anamnesis/anamnesis-compile.d.ts +4 -1
- package/dist/patterns/anamnesis/anamnesis-evolution-grid.d.ts +8 -9
- package/dist/patterns/anamnesis/anamnesis-evolution.d.ts +24 -12
- package/dist/patterns/anamnesis/anamnesis-intake.d.ts +5 -1
- package/dist/patterns/anamnesis/anamnesis-questionnaire.d.ts +4 -1
- package/dist/patterns/anamnesis/anamnesis-readonly.d.ts +4 -1
- package/dist/patterns/anamnesis/anamnesis-source-blocks.d.ts +29 -0
- package/dist/patterns/anamnesis/anamnesis-window.d.ts +3 -5
- package/dist/patterns/anamnesis/anamnesis.d.ts +4 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/payment-automation-upsell/index.js +1 -1
- package/dist/tokens.css +5 -2
- package/package.json +5 -1
- package/dist/_chunks/actions-cell-renderer-C67oj7mR.js +0 -1581
- package/dist/_chunks/anamnesis-summary-card-CpQViN5l.js +0 -392
- package/dist/_chunks/form-field-M5UpX65Z.js +0 -123
- package/dist/_chunks/number-input-DOe5VYei.js +0 -370
- package/dist/_chunks/radio-group-CI-6SmSw.js +0 -167
- package/dist/patterns/anamnesis/anamnesis-compare-panel.d.ts +0 -89
|
@@ -1,370 +0,0 @@
|
|
|
1
|
-
import { jsxs as Ie, jsx as F } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as Y, forwardRef as De, useRef as K, useCallback as z, useState as q, useEffect as xe } from "react";
|
|
3
|
-
import { c as Ce } from "./index-D2ZczOXr.js";
|
|
4
|
-
import { useTranslation as Fe } from "react-i18next";
|
|
5
|
-
import { u as Se } from "./use-controllable-state-BiY4xTzM.js";
|
|
6
|
-
import { u as Ve } from "./form-field-context-B3APVHKx.js";
|
|
7
|
-
import { c as Me } from "./compose-refs-C0k0tdqF.js";
|
|
8
|
-
import { u as ke } from "./registry-DvAUVLHh.js";
|
|
9
|
-
import { C as Te } from "./chevron-down-DWE7GSq9.js";
|
|
10
|
-
import { C as Pe } from "./chevron-up-umRGgtJA.js";
|
|
11
|
-
const ze = {
|
|
12
|
-
id: "number-input",
|
|
13
|
-
capabilities: ["set_value"],
|
|
14
|
-
state: {
|
|
15
|
-
value: {
|
|
16
|
-
type: "number | null",
|
|
17
|
-
descriptionKey: "ui.agent.numberInput.state.value",
|
|
18
|
-
description: "Current numeric value, or null when empty.",
|
|
19
|
-
read: (n) => n.getValue()
|
|
20
|
-
},
|
|
21
|
-
isEmpty: {
|
|
22
|
-
type: "boolean",
|
|
23
|
-
descriptionKey: "ui.agent.numberInput.state.isEmpty",
|
|
24
|
-
description: "Whether the input has no value.",
|
|
25
|
-
read: (n) => n.getValue() === null
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
actions: {
|
|
29
|
-
set_value: {
|
|
30
|
-
safety: "write",
|
|
31
|
-
argsType: "{ value: number | null }",
|
|
32
|
-
argsSchema: {
|
|
33
|
-
type: "object",
|
|
34
|
-
properties: { value: { type: ["number", "null"] } },
|
|
35
|
-
required: ["value"]
|
|
36
|
-
},
|
|
37
|
-
idempotent: !0,
|
|
38
|
-
examples: [{ args: { value: 42 } }, { args: { value: null } }],
|
|
39
|
-
descriptionKey: "ui.agent.numberInput.actions.setValue",
|
|
40
|
-
description: "Replace the numeric value, or pass null to clear.",
|
|
41
|
-
invoke: (n, s) => {
|
|
42
|
-
n.setValue(s.value);
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
clear: {
|
|
46
|
-
safety: "destructive",
|
|
47
|
-
idempotent: !0,
|
|
48
|
-
descriptionKey: "ui.agent.numberInput.actions.clear",
|
|
49
|
-
description: "Empty the input. Loses any typed value.",
|
|
50
|
-
invoke: (n) => {
|
|
51
|
-
n.clear();
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
focus: {
|
|
55
|
-
safety: "read",
|
|
56
|
-
idempotent: !0,
|
|
57
|
-
descriptionKey: "ui.agent.numberInput.actions.focus",
|
|
58
|
-
description: "Move keyboard focus to the input.",
|
|
59
|
-
invoke: (n) => {
|
|
60
|
-
n.focus();
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
domHooks: {
|
|
65
|
-
root: {
|
|
66
|
-
attr: "data-component",
|
|
67
|
-
value: "number-input",
|
|
68
|
-
description: "Marks the NumberInput wrapper."
|
|
69
|
-
},
|
|
70
|
-
instanceId: {
|
|
71
|
-
attr: "data-component-id",
|
|
72
|
-
sourceProp: "id",
|
|
73
|
-
description: "Sourced from the id prop."
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
function Re(n) {
|
|
78
|
-
let s = "";
|
|
79
|
-
for (const l of n) {
|
|
80
|
-
const r = l.codePointAt(0);
|
|
81
|
-
r !== void 0 && (r >= 1632 && r <= 1641 ? s += String.fromCodePoint(48 + (r - 1632)) : r >= 1776 && r <= 1785 ? s += String.fromCodePoint(48 + (r - 1776)) : s += l);
|
|
82
|
-
}
|
|
83
|
-
return s;
|
|
84
|
-
}
|
|
85
|
-
function Ae(n, s, l) {
|
|
86
|
-
return Y(() => {
|
|
87
|
-
var V, M;
|
|
88
|
-
const r = new Intl.NumberFormat(n).formatToParts(1234.5), u = ((V = r.find((a) => a.type === "decimal")) == null ? void 0 : V.value) ?? ".", S = ((M = r.find((a) => a.type === "group")) == null ? void 0 : M.value) ?? ",", p = s === "currency" ? new Intl.NumberFormat(n, {
|
|
89
|
-
style: "currency",
|
|
90
|
-
currency: l ?? "USD"
|
|
91
|
-
}) : s === "percentage" ? new Intl.NumberFormat(n, {
|
|
92
|
-
style: "percent",
|
|
93
|
-
maximumFractionDigits: 4
|
|
94
|
-
}) : s === "integer" ? new Intl.NumberFormat(n, { maximumFractionDigits: 0 }) : new Intl.NumberFormat(n, { maximumFractionDigits: 10 }), R = (a) => Number.isFinite(a) ? p.format(a) : "", A = (a) => {
|
|
95
|
-
if (!a) return NaN;
|
|
96
|
-
const k = Re(a), h = k.trim(), I = h.startsWith("-") || h.startsWith("−");
|
|
97
|
-
let d = "";
|
|
98
|
-
for (const N of k)
|
|
99
|
-
N >= "0" && N <= "9" ? d += N : N === u && (d += ".");
|
|
100
|
-
if (!d || d === ".") return NaN;
|
|
101
|
-
let m = Number(d);
|
|
102
|
-
return Number.isFinite(m) ? (I && (m = -m), s === "percentage" && (m = m / 100), m) : NaN;
|
|
103
|
-
};
|
|
104
|
-
let g = "decimal";
|
|
105
|
-
if (s === "integer")
|
|
106
|
-
g = "numeric";
|
|
107
|
-
else if (s === "currency")
|
|
108
|
-
try {
|
|
109
|
-
const { maximumFractionDigits: a } = new Intl.NumberFormat(n, {
|
|
110
|
-
style: "currency",
|
|
111
|
-
currency: l ?? "USD"
|
|
112
|
-
}).resolvedOptions();
|
|
113
|
-
g = a === 0 ? "numeric" : "decimal";
|
|
114
|
-
} catch {
|
|
115
|
-
g = "decimal";
|
|
116
|
-
}
|
|
117
|
-
return {
|
|
118
|
-
format: R,
|
|
119
|
-
parse: A,
|
|
120
|
-
decimalSeparator: u,
|
|
121
|
-
groupingSeparator: S,
|
|
122
|
-
inputMode: g
|
|
123
|
-
};
|
|
124
|
-
}, [n, s, l]);
|
|
125
|
-
}
|
|
126
|
-
const je = Ce(
|
|
127
|
-
[
|
|
128
|
-
"ds:flex ds:items-center ds:w-full ds:rounded-[var(--radius-sm)]",
|
|
129
|
-
"ds:border ds:bg-input ds:text-foreground",
|
|
130
|
-
"ds:shadow-[var(--shadow-input)]",
|
|
131
|
-
"ds:transition-[colors,box-shadow] ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
|
|
132
|
-
"ds:focus-within:outline-[length:var(--focus-ring-width)] ds:focus-within:outline-solid",
|
|
133
|
-
"ds:focus-within:outline-ring ds:focus-within:outline-offset-[length:var(--focus-ring-offset)]",
|
|
134
|
-
"ds:has-[:disabled]:cursor-not-allowed ds:has-[:disabled]:opacity-50"
|
|
135
|
-
].join(" "),
|
|
136
|
-
{
|
|
137
|
-
variants: {
|
|
138
|
-
size: {
|
|
139
|
-
sm: "ds:h-8 ds:text-[length:var(--font-size-sm)]",
|
|
140
|
-
md: "ds:h-[var(--min-target-size)] ds:text-[length:var(--font-size-base)]",
|
|
141
|
-
lg: "ds:h-12 ds:text-[length:var(--font-size-lg)]"
|
|
142
|
-
},
|
|
143
|
-
tone: {
|
|
144
|
-
default: "ds:border-border",
|
|
145
|
-
error: "ds:border-destructive ds:focus-within:outline-destructive"
|
|
146
|
-
}
|
|
147
|
-
},
|
|
148
|
-
defaultVariants: { size: "md", tone: "default" }
|
|
149
|
-
}
|
|
150
|
-
), X = [
|
|
151
|
-
"ds:inline-flex ds:items-center ds:justify-center",
|
|
152
|
-
"ds:h-full ds:shrink-0",
|
|
153
|
-
"ds:text-muted-foreground ds:hover:text-foreground",
|
|
154
|
-
"ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
|
|
155
|
-
"ds:disabled:cursor-not-allowed ds:disabled:opacity-50"
|
|
156
|
-
].join(" "), Be = () => typeof navigator < "u" && navigator.language ? navigator.language : "en-US", Ee = (n) => typeof n == "string" && n.trim() !== "" ? n : void 0;
|
|
157
|
-
function Ue(n) {
|
|
158
|
-
if (!Number.isFinite(n)) return 0;
|
|
159
|
-
const s = String(n), l = s.indexOf(".");
|
|
160
|
-
return l === -1 ? 0 : s.length - l - 1;
|
|
161
|
-
}
|
|
162
|
-
function Le(n, s) {
|
|
163
|
-
if (s <= 0 || !Number.isFinite(s)) return n;
|
|
164
|
-
const r = 10 ** Ue(s);
|
|
165
|
-
return Math.round(n * r) / r;
|
|
166
|
-
}
|
|
167
|
-
const Ke = De(
|
|
168
|
-
({
|
|
169
|
-
value: n,
|
|
170
|
-
defaultValue: s,
|
|
171
|
-
onChange: l,
|
|
172
|
-
min: r,
|
|
173
|
-
max: u,
|
|
174
|
-
step: S = 1,
|
|
175
|
-
mode: p = "integer",
|
|
176
|
-
currency: R,
|
|
177
|
-
locale: A,
|
|
178
|
-
size: g = "md",
|
|
179
|
-
tone: V,
|
|
180
|
-
className: M,
|
|
181
|
-
id: a,
|
|
182
|
-
disabled: k,
|
|
183
|
-
onFocus: h,
|
|
184
|
-
onBlur: I,
|
|
185
|
-
onKeyDown: d,
|
|
186
|
-
...m
|
|
187
|
-
}, N) => {
|
|
188
|
-
const { t: H, i18n: Z } = Fe(), D = Ve(), ee = a ?? D.id, T = !!(D.disabled || k), te = A ?? Ee(Z.language) ?? Be(), j = Ae(te, p, R), {
|
|
189
|
-
decimalSeparator: P,
|
|
190
|
-
groupingSeparator: W,
|
|
191
|
-
format: B,
|
|
192
|
-
parse: O
|
|
193
|
-
} = j, _ = K(null), ne = Me(N, _), [re, se] = Se({
|
|
194
|
-
value: n,
|
|
195
|
-
defaultValue: s ?? null,
|
|
196
|
-
onChange: l
|
|
197
|
-
}), i = re ?? null, $ = K(i);
|
|
198
|
-
$.current = i;
|
|
199
|
-
const x = z(
|
|
200
|
-
(e) => {
|
|
201
|
-
const t = p === "percentage" ? e * 100 : e;
|
|
202
|
-
return (Number.isInteger(t) ? String(t) : t.toString()).replace(".", P);
|
|
203
|
-
},
|
|
204
|
-
[p, P]
|
|
205
|
-
), v = z(
|
|
206
|
-
(e) => e == null || Number.isNaN(e) ? "" : B(e),
|
|
207
|
-
[B]
|
|
208
|
-
), [E, c] = q(
|
|
209
|
-
() => v(i)
|
|
210
|
-
), y = K(!1), [oe, b] = q(!1), [U, C] = q(!1), L = z(
|
|
211
|
-
(e) => {
|
|
212
|
-
if (e >= "0" && e <= "9") return !0;
|
|
213
|
-
const t = e.codePointAt(0) ?? 0;
|
|
214
|
-
return t >= 1632 && t <= 1641 || t >= 1776 && t <= 1785 ? !0 : e === P || e === W || e === "-" || e === "−";
|
|
215
|
-
},
|
|
216
|
-
[P, W]
|
|
217
|
-
), ie = z(
|
|
218
|
-
(e) => {
|
|
219
|
-
let t = "";
|
|
220
|
-
for (const o of e)
|
|
221
|
-
L(o) && (t += o);
|
|
222
|
-
return t;
|
|
223
|
-
},
|
|
224
|
-
[L]
|
|
225
|
-
);
|
|
226
|
-
xe(() => {
|
|
227
|
-
!y.current && !U && c(v(i));
|
|
228
|
-
}, [i, v, U]);
|
|
229
|
-
const ae = oe || U || i !== null && (r !== void 0 && i < r || u !== void 0 && i > u), G = D.invalid || ae, ue = G ? "error" : V ?? "default", f = (e) => {
|
|
230
|
-
se(e);
|
|
231
|
-
}, w = (e) => {
|
|
232
|
-
let o = (i ?? 0) + S * e;
|
|
233
|
-
r !== void 0 && (o = Math.max(r, o)), u !== void 0 && (o = Math.min(u, o)), o = Le(o, S), f(o), b(!1), c(
|
|
234
|
-
y.current ? x(o) : v(o)
|
|
235
|
-
);
|
|
236
|
-
}, J = (e) => {
|
|
237
|
-
f(e), b(!1), c(
|
|
238
|
-
y.current ? x(e) : v(e)
|
|
239
|
-
);
|
|
240
|
-
}, le = (e) => {
|
|
241
|
-
if (d == null || d(e), e.defaultPrevented || T) return;
|
|
242
|
-
const { key: t, shiftKey: o } = e;
|
|
243
|
-
t === "ArrowUp" ? (e.preventDefault(), w(o ? 10 : 1)) : t === "ArrowDown" ? (e.preventDefault(), w(o ? -10 : -1)) : t === "PageUp" ? (e.preventDefault(), w(100)) : t === "PageDown" ? (e.preventDefault(), w(-100)) : t === "Home" && r !== void 0 ? (e.preventDefault(), J(r)) : t === "End" && u !== void 0 && (e.preventDefault(), J(u));
|
|
244
|
-
}, de = (e) => {
|
|
245
|
-
const t = ie(e.target.value);
|
|
246
|
-
if (c(t), t.trim() === "") {
|
|
247
|
-
f(null), b(!1), C(!1);
|
|
248
|
-
return;
|
|
249
|
-
}
|
|
250
|
-
const o = O(t);
|
|
251
|
-
Number.isNaN(o) || (f(o), C(!1));
|
|
252
|
-
}, ce = (e) => {
|
|
253
|
-
const { data: t } = e.nativeEvent;
|
|
254
|
-
typeof t != "string" || t.length !== 1 || L(t) || e.preventDefault();
|
|
255
|
-
}, fe = (e) => {
|
|
256
|
-
h == null || h(e), y.current = !0, i != null && c(x(i));
|
|
257
|
-
}, pe = (e) => {
|
|
258
|
-
if (I == null || I(e), y.current = !1, E.trim() === "") {
|
|
259
|
-
f(null), b(!1), C(!1), c("");
|
|
260
|
-
return;
|
|
261
|
-
}
|
|
262
|
-
const t = O(E);
|
|
263
|
-
if (Number.isNaN(t)) {
|
|
264
|
-
C(!0), b(!1), f(null);
|
|
265
|
-
return;
|
|
266
|
-
}
|
|
267
|
-
const o = r !== void 0 && t < r || u !== void 0 && t > u;
|
|
268
|
-
b(o), C(!1), f(t), c(v(t));
|
|
269
|
-
}, Q = (e) => {
|
|
270
|
-
e.preventDefault();
|
|
271
|
-
}, me = () => w(1), ve = () => w(-1), be = Y(
|
|
272
|
-
() => ({
|
|
273
|
-
getValue: () => $.current,
|
|
274
|
-
setValue: (e) => {
|
|
275
|
-
f(e), c(
|
|
276
|
-
e === null ? "" : y.current ? x(e) : v(e)
|
|
277
|
-
);
|
|
278
|
-
},
|
|
279
|
-
clear: () => {
|
|
280
|
-
f(null), c(""), b(!1);
|
|
281
|
-
},
|
|
282
|
-
focus: () => {
|
|
283
|
-
var e;
|
|
284
|
-
return (e = _.current) == null ? void 0 : e.focus();
|
|
285
|
-
}
|
|
286
|
-
}),
|
|
287
|
-
// The handle is reconstructed per render; consumers (the agent runtime)
|
|
288
|
-
// re-register only when the identity changes, which is a cheap no-op.
|
|
289
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
290
|
-
[x, v]
|
|
291
|
-
);
|
|
292
|
-
ke(ze, be, a);
|
|
293
|
-
const ge = T || r !== void 0 && i !== null && i <= r, he = T || u !== void 0 && i !== null && i >= u, Ne = i ?? void 0, ye = (p === "currency" || p === "percentage") && i !== null && i !== null ? B(i) : void 0, we = j.inputMode === "numeric" ? "[0-9]*" : void 0;
|
|
294
|
-
return /* @__PURE__ */ Ie(
|
|
295
|
-
"div",
|
|
296
|
-
{
|
|
297
|
-
className: je({
|
|
298
|
-
size: g,
|
|
299
|
-
tone: ue,
|
|
300
|
-
className: M
|
|
301
|
-
}),
|
|
302
|
-
"data-component": "number-input",
|
|
303
|
-
"data-component-id": a,
|
|
304
|
-
"data-mode": p,
|
|
305
|
-
children: [
|
|
306
|
-
/* @__PURE__ */ F(
|
|
307
|
-
"button",
|
|
308
|
-
{
|
|
309
|
-
type: "button",
|
|
310
|
-
tabIndex: -1,
|
|
311
|
-
"aria-label": H("inputs.number.decrement", "Decrement"),
|
|
312
|
-
onClick: ve,
|
|
313
|
-
onMouseDown: Q,
|
|
314
|
-
disabled: ge,
|
|
315
|
-
className: `${X} ds:ps-2 ds:pe-1`,
|
|
316
|
-
children: /* @__PURE__ */ F(Te, { "aria-hidden": "true", className: "ds:size-4" })
|
|
317
|
-
}
|
|
318
|
-
),
|
|
319
|
-
/* @__PURE__ */ F(
|
|
320
|
-
"input",
|
|
321
|
-
{
|
|
322
|
-
ref: ne,
|
|
323
|
-
id: ee,
|
|
324
|
-
type: "text",
|
|
325
|
-
role: "spinbutton",
|
|
326
|
-
inputMode: j.inputMode,
|
|
327
|
-
pattern: we,
|
|
328
|
-
autoComplete: "off",
|
|
329
|
-
value: E,
|
|
330
|
-
disabled: T,
|
|
331
|
-
"aria-valuemin": r,
|
|
332
|
-
"aria-valuemax": u,
|
|
333
|
-
"aria-valuenow": Ne,
|
|
334
|
-
"aria-valuetext": ye,
|
|
335
|
-
"aria-invalid": G || void 0,
|
|
336
|
-
"aria-required": D.required || void 0,
|
|
337
|
-
"aria-describedby": D.describedBy || void 0,
|
|
338
|
-
onBeforeInput: ce,
|
|
339
|
-
onChange: de,
|
|
340
|
-
onFocus: fe,
|
|
341
|
-
onBlur: pe,
|
|
342
|
-
onKeyDown: le,
|
|
343
|
-
className: "ds:flex-1 ds:w-full ds:min-w-0 ds:bg-transparent ds:outline-none ds:ps-2 ds:pe-2 ds:text-start ds:tabular-nums ds:disabled:cursor-not-allowed",
|
|
344
|
-
...m
|
|
345
|
-
}
|
|
346
|
-
),
|
|
347
|
-
/* @__PURE__ */ F(
|
|
348
|
-
"button",
|
|
349
|
-
{
|
|
350
|
-
type: "button",
|
|
351
|
-
tabIndex: -1,
|
|
352
|
-
"aria-label": H("inputs.number.increment", "Increment"),
|
|
353
|
-
onClick: me,
|
|
354
|
-
onMouseDown: Q,
|
|
355
|
-
disabled: he,
|
|
356
|
-
className: `${X} ds:ps-1 ds:pe-2`,
|
|
357
|
-
children: /* @__PURE__ */ F(Pe, { "aria-hidden": "true", className: "ds:size-4" })
|
|
358
|
-
}
|
|
359
|
-
)
|
|
360
|
-
]
|
|
361
|
-
}
|
|
362
|
-
);
|
|
363
|
-
}
|
|
364
|
-
);
|
|
365
|
-
Ke.displayName = "NumberInput";
|
|
366
|
-
export {
|
|
367
|
-
Ke as N,
|
|
368
|
-
Ae as u
|
|
369
|
-
};
|
|
370
|
-
//# sourceMappingURL=number-input-DOe5VYei.js.map
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
import { jsx as e, jsxs as d } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as q, useId as E, useMemo as k, useRef as z, useState as F } from "react";
|
|
3
|
-
import * as J from "@radix-ui/react-radio-group";
|
|
4
|
-
import { c as L } from "./index-D2ZczOXr.js";
|
|
5
|
-
import { a as B } from "./radio-TWf9Q-mp.js";
|
|
6
|
-
import { c as O } from "./compose-refs-C0k0tdqF.js";
|
|
7
|
-
import { u as Q } from "./registry-DvAUVLHh.js";
|
|
8
|
-
import { u as U } from "./use-direction-Dp8h70PP.js";
|
|
9
|
-
import { C as W } from "./circle-alert-rGDZ73Wh.js";
|
|
10
|
-
const X = {
|
|
11
|
-
id: "radio-group",
|
|
12
|
-
capabilities: ["select_single"],
|
|
13
|
-
state: {
|
|
14
|
-
value: {
|
|
15
|
-
type: "string",
|
|
16
|
-
descriptionKey: "ui.agent.radioGroup.state.value",
|
|
17
|
-
description: "Currently selected radio value, or empty string when none.",
|
|
18
|
-
read: (t) => t.getValue()
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
actions: {
|
|
22
|
-
set_value: {
|
|
23
|
-
safety: "write",
|
|
24
|
-
argsType: "{ value: string }",
|
|
25
|
-
descriptionKey: "ui.agent.radioGroup.actions.setValue",
|
|
26
|
-
description: "Select the radio with the given value.",
|
|
27
|
-
invoke: (t, o) => {
|
|
28
|
-
t.setValue(o.value);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
domHooks: {
|
|
33
|
-
root: {
|
|
34
|
-
attr: "data-component",
|
|
35
|
-
value: "radio-group",
|
|
36
|
-
description: "Marks the RadioGroup root."
|
|
37
|
-
},
|
|
38
|
-
instanceId: {
|
|
39
|
-
attr: "data-component-id",
|
|
40
|
-
sourceProp: "id",
|
|
41
|
-
description: "Sourced from the id prop."
|
|
42
|
-
},
|
|
43
|
-
item: {
|
|
44
|
-
attr: "data-option-id",
|
|
45
|
-
description: "Stable opaque value emitted on each rendered Radio child."
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}, Y = L("ds:flex", {
|
|
49
|
-
variants: {
|
|
50
|
-
variant: {
|
|
51
|
-
vertical: "ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
52
|
-
horizontal: "ds:flex-row ds:flex-wrap ds:gap-[var(--spacing-md)]",
|
|
53
|
-
card: "ds:flex-col ds:gap-[var(--spacing-md)]"
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
defaultVariants: {
|
|
57
|
-
variant: "vertical"
|
|
58
|
-
}
|
|
59
|
-
}), Z = q(
|
|
60
|
-
({
|
|
61
|
-
children: t,
|
|
62
|
-
variant: o = "vertical",
|
|
63
|
-
label: n,
|
|
64
|
-
description: l,
|
|
65
|
-
error: a,
|
|
66
|
-
required: c,
|
|
67
|
-
disabled: S,
|
|
68
|
-
className: $,
|
|
69
|
-
id: p,
|
|
70
|
-
value: u,
|
|
71
|
-
defaultValue: v,
|
|
72
|
-
onValueChange: s,
|
|
73
|
-
...j
|
|
74
|
-
}, A) => {
|
|
75
|
-
const m = E(), f = `${m}-legend`, g = `${m}-description`, h = `${m}-error`, C = [l ? g : null, a ? h : null].filter(Boolean).join(" ") || void 0, P = n ? f : void 0, H = o === "horizontal" ? "horizontal" : "vertical", x = k(
|
|
76
|
-
() => ({ variant: o }),
|
|
77
|
-
[o]
|
|
78
|
-
), y = l ? /* @__PURE__ */ e("p", { id: g, className: "type-body-sm ds:text-muted-foreground", children: l }) : null, R = a ? /* @__PURE__ */ d(
|
|
79
|
-
"p",
|
|
80
|
-
{
|
|
81
|
-
id: h,
|
|
82
|
-
role: "alert",
|
|
83
|
-
className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] type-body-sm ds:text-destructive",
|
|
84
|
-
children: [
|
|
85
|
-
/* @__PURE__ */ e(W, { "aria-hidden": "true", className: "ds:size-4 ds:shrink-0" }),
|
|
86
|
-
/* @__PURE__ */ e("span", { children: a })
|
|
87
|
-
]
|
|
88
|
-
}
|
|
89
|
-
) : null, b = z(null), K = O(A, b), M = U(b), r = u !== void 0, [_, D] = F(
|
|
90
|
-
v ?? ""
|
|
91
|
-
), N = r ? u ?? "" : _, G = z(N);
|
|
92
|
-
G.current = N;
|
|
93
|
-
const V = (i) => {
|
|
94
|
-
r || D(i), s == null || s(i);
|
|
95
|
-
}, T = k(
|
|
96
|
-
() => ({
|
|
97
|
-
getValue: () => G.current,
|
|
98
|
-
setValue: (i) => V(i)
|
|
99
|
-
}),
|
|
100
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
101
|
-
[r, s]
|
|
102
|
-
);
|
|
103
|
-
Q(X, T, p);
|
|
104
|
-
const I = /* @__PURE__ */ e(
|
|
105
|
-
J.Root,
|
|
106
|
-
{
|
|
107
|
-
ref: K,
|
|
108
|
-
id: p,
|
|
109
|
-
orientation: H,
|
|
110
|
-
dir: M,
|
|
111
|
-
disabled: S,
|
|
112
|
-
required: c,
|
|
113
|
-
value: r ? u : void 0,
|
|
114
|
-
defaultValue: r ? void 0 : v,
|
|
115
|
-
onValueChange: V,
|
|
116
|
-
"aria-labelledby": P,
|
|
117
|
-
"aria-describedby": C,
|
|
118
|
-
"aria-invalid": !!a || void 0,
|
|
119
|
-
"aria-required": c || void 0,
|
|
120
|
-
className: Y({ variant: o, className: $ }),
|
|
121
|
-
"data-component": "radio-group",
|
|
122
|
-
"data-component-id": p,
|
|
123
|
-
...j,
|
|
124
|
-
children: t
|
|
125
|
-
}
|
|
126
|
-
), w = "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:min-w-0";
|
|
127
|
-
return n ? /* @__PURE__ */ e(B.Provider, { value: x, children: /* @__PURE__ */ d(
|
|
128
|
-
"fieldset",
|
|
129
|
-
{
|
|
130
|
-
role: "presentation",
|
|
131
|
-
className: `${w} ds:border-0 ds:p-0 ds:m-0`,
|
|
132
|
-
children: [
|
|
133
|
-
/* @__PURE__ */ d(
|
|
134
|
-
"legend",
|
|
135
|
-
{
|
|
136
|
-
id: f,
|
|
137
|
-
className: "type-label ds:text-foreground ds:p-0",
|
|
138
|
-
children: [
|
|
139
|
-
n,
|
|
140
|
-
c ? /* @__PURE__ */ e(
|
|
141
|
-
"span",
|
|
142
|
-
{
|
|
143
|
-
"aria-hidden": "true",
|
|
144
|
-
className: "ds:text-destructive ds:ms-[var(--spacing-xs)]",
|
|
145
|
-
children: "*"
|
|
146
|
-
}
|
|
147
|
-
) : null
|
|
148
|
-
]
|
|
149
|
-
}
|
|
150
|
-
),
|
|
151
|
-
y,
|
|
152
|
-
I,
|
|
153
|
-
R
|
|
154
|
-
]
|
|
155
|
-
}
|
|
156
|
-
) }) : /* @__PURE__ */ e(B.Provider, { value: x, children: /* @__PURE__ */ d("div", { className: w, children: [
|
|
157
|
-
y,
|
|
158
|
-
I,
|
|
159
|
-
R
|
|
160
|
-
] }) });
|
|
161
|
-
}
|
|
162
|
-
);
|
|
163
|
-
Z.displayName = "RadioGroup";
|
|
164
|
-
export {
|
|
165
|
-
Z as R
|
|
166
|
-
};
|
|
167
|
-
//# sourceMappingURL=radio-group-CI-6SmSw.js.map
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import type { TFunction } from 'i18next';
|
|
2
|
-
import type { SparklineAnnotation } from '../../components/sparkline';
|
|
3
|
-
import { type DeltaInfo, type SpanDiff } from './anamnesis-derive';
|
|
4
|
-
import type { NumericParameterDef, PathologyCode, Visit } from './anamnesis-types';
|
|
5
|
-
import type { VisitColumn } from './anamnesis-window';
|
|
6
|
-
/** The one grammar every category speaks. */
|
|
7
|
-
export type CompareChangeKind = 'added' | 'removed' | 'changed' | 'notMeasured';
|
|
8
|
-
/** One line of the compare table. Every field is already display-ready, so
|
|
9
|
-
* the renderer below never reaches back into the domain model. */
|
|
10
|
-
export interface CompareRow {
|
|
11
|
-
/** Stable row id — `<category>:<subject>`. */
|
|
12
|
-
id: string;
|
|
13
|
-
/** Owning category's id (see `COMPARE_CATEGORIES`). */
|
|
14
|
-
categoryId: string;
|
|
15
|
-
/** What changed, in the clinician's words. */
|
|
16
|
-
item: string;
|
|
17
|
-
/** Second line under `item` — the unit and reference range, where there is
|
|
18
|
-
* one. Numeric rows only; the grid puts the same thing in the same place. */
|
|
19
|
-
meta?: string;
|
|
20
|
-
change: CompareChangeKind;
|
|
21
|
-
/** Translated change word — what the Change cell says when there is no
|
|
22
|
-
* number to say it with. */
|
|
23
|
-
changeLabel: string;
|
|
24
|
-
/** One display string per compared visit, in the diff's (record) order. */
|
|
25
|
-
values: string[];
|
|
26
|
-
/** Numeric rows only: the FULL-RECORD series, so the sparkline here is the
|
|
27
|
-
* same line as the grid's — not a shorter one drawn from the picked visits,
|
|
28
|
-
* which would move every event annotation. */
|
|
29
|
-
series?: (number | null)[];
|
|
30
|
-
/** Numeric rows only: the net first→last change, direction-aware. */
|
|
31
|
-
delta?: DeltaInfo | null;
|
|
32
|
-
/** Numeric rows only: needed to colour the delta by valence. */
|
|
33
|
-
def?: NumericParameterDef;
|
|
34
|
-
}
|
|
35
|
-
export interface CompareRowContext {
|
|
36
|
-
t: TFunction;
|
|
37
|
-
pathologies: Record<string, PathologyCode>;
|
|
38
|
-
/** Full-record sparkline series by parameter key. */
|
|
39
|
-
seriesByKey: ReadonlyMap<string, (number | null)[]>;
|
|
40
|
-
}
|
|
41
|
-
export interface CompareCategoryDef {
|
|
42
|
-
/** Stable id; also the i18n leaf under `anamnesis.compare.category.*`. */
|
|
43
|
-
id: string;
|
|
44
|
-
/** Pull this category's rows out of one span diff. */
|
|
45
|
-
rows: (diff: SpanDiff, ctx: CompareRowContext) => CompareRow[];
|
|
46
|
-
}
|
|
47
|
-
/** One entry per `SpanDiff` array, in reading order. A future symptom or
|
|
48
|
-
* event diff is ADDED here — the grammar, the columns and the renderer below
|
|
49
|
-
* stay untouched. Adding a category is data, never a rewrite. */
|
|
50
|
-
export declare const COMPARE_CATEGORIES: readonly CompareCategoryDef[];
|
|
51
|
-
/** Every difference across the compared visits as one flat, ordered list.
|
|
52
|
-
* Category order is the registry's order; within a category, the diff's own
|
|
53
|
-
* order. Nothing is sorted here — the record's order is the reading order. */
|
|
54
|
-
export declare function buildCompareRows(diff: SpanDiff, ctx: CompareRowContext): CompareRow[];
|
|
55
|
-
export interface AnamnesisComparePanelProps {
|
|
56
|
-
/** The record's visits, in record order — the picker's options. */
|
|
57
|
-
visits: Visit[];
|
|
58
|
-
/** The compared columns, resolved in RECORD order (never tick order). */
|
|
59
|
-
columns: readonly VisitColumn[];
|
|
60
|
-
/** Currently compared visit ids. */
|
|
61
|
-
selectedIds: readonly string[];
|
|
62
|
-
onSelectionChange: (ids: string[]) => void;
|
|
63
|
-
/** The computed diff, or `null` when fewer than two visits are compared. */
|
|
64
|
-
diff: SpanDiff | null;
|
|
65
|
-
/** Full-record sparkline series by parameter key. */
|
|
66
|
-
seriesByKey: ReadonlyMap<string, (number | null)[]>;
|
|
67
|
-
pathologies: Record<string, PathologyCode>;
|
|
68
|
-
/** The event lines drawn on the grid, so they are drawn here too. */
|
|
69
|
-
annotations?: readonly SparklineAnnotation[];
|
|
70
|
-
/** Make those lines pointer-selectable, exactly as they are on the grid.
|
|
71
|
-
* The event bar above the grid stays the keyboard route for both. */
|
|
72
|
-
onSelectAnnotation?: (eventId: string) => void;
|
|
73
|
-
t: TFunction;
|
|
74
|
-
/** Exit compare mode from inside the panel. The toggle that opened it is a
|
|
75
|
-
* full grid above, so without this the only way out is off-screen. */
|
|
76
|
-
onClose?: () => void;
|
|
77
|
-
/** Draw the table's own border/surface. `false` to match a grid rendered
|
|
78
|
-
* unframed above it — the two read as one surface, not a boxed table under
|
|
79
|
-
* a bare one. */
|
|
80
|
-
framed?: boolean;
|
|
81
|
-
/** The first visits the merged baseline column folds together, oldest
|
|
82
|
-
* first — its header lists them exactly as the grid's does. */
|
|
83
|
-
baselineSources?: readonly Visit[];
|
|
84
|
-
}
|
|
85
|
-
/** Slot 4's contents: a header carrying the way out, the visit picker, then
|
|
86
|
-
* one matrix of differences. The enclosing `Collapsible` lives in
|
|
87
|
-
* `anamnesis-evolution.tsx`. */
|
|
88
|
-
export declare function AnamnesisComparePanel({ visits, columns, selectedIds, onSelectionChange, diff, seriesByKey, pathologies, annotations, onSelectAnnotation, t, onClose, framed, baselineSources, }: AnamnesisComparePanelProps): import("react/jsx-runtime").JSX.Element;
|
|
89
|
-
//# sourceMappingURL=anamnesis-compare-panel.d.ts.map
|