@alfadocs/ui-kit 1.4.10 → 1.4.12
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/{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-BWjPUp0m.js → anamnesis-summary-rows-DAIpD0Or.js} +2919 -3002
- 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-CxPn0T0s.js} +4 -4
- 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-D9M7IKfh.js} +3 -3
- 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-BkqZEvL4.js} +5 -5
- package/dist/_chunks/{fetal-weight-DHxXx7Uz.js → fetal-weight-C7JXGg6E.js} +3 -3
- package/dist/_chunks/{field-value-C5A4t4OE.js → field-value-BCFLVBmu.js} +2 -2
- package/dist/_chunks/{file-manager-BY6FdHAt.js → file-manager-DzWYcRpE.js} +2 -2
- 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-CFJlMH7Z.js} +4 -4
- package/dist/_chunks/{link-cell-renderer-C8npOgmM.js → link-cell-renderer-DCCca2m3.js} +2 -2
- 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/{operator-hero-DVy0RGoD.js → operator-hero-CpJkDNAM.js} +2 -2
- package/dist/_chunks/{patient-details-Bf4iTAPp.js → patient-details-CGhnfdUB.js} +2 -2
- package/dist/_chunks/{patient-summary-card-dkV6a53T.js → patient-summary-card-DfbOtOV6.js} +3 -3
- package/dist/_chunks/{patient-table-zifAcsjV.js → patient-table-D2fhV4mV.js} +3 -3
- 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-iI6_j2K2.js} +5 -5
- package/dist/_chunks/{pregnancy-weight-gain-Bfz7SbIw.js → pregnancy-weight-gain-Co-YFMJZ.js} +4 -4
- 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-DUcTgQ0E.js +95 -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-BeTicruA.js} +2 -2
- 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 +22 -28
- package/dist/agent-i18n/en.json +2 -3
- 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/index.js +1 -1
- 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/operator-hero/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/i18n/locales/ar.d.ts +16 -0
- package/dist/i18n/locales/ar.js +10 -0
- package/dist/i18n/locales/de.d.ts +16 -0
- package/dist/i18n/locales/de.js +10 -0
- package/dist/i18n/locales/el.d.ts +16 -0
- package/dist/i18n/locales/el.js +10 -0
- package/dist/i18n/locales/en.d.ts +16 -0
- package/dist/i18n/locales/en.js +10 -0
- package/dist/i18n/locales/es.d.ts +16 -0
- package/dist/i18n/locales/es.js +10 -0
- package/dist/i18n/locales/fr.d.ts +16 -0
- package/dist/i18n/locales/fr.js +10 -0
- package/dist/i18n/locales/hi.d.ts +16 -0
- package/dist/i18n/locales/hi.js +10 -0
- package/dist/i18n/locales/it.d.ts +16 -0
- package/dist/i18n/locales/it.js +10 -0
- package/dist/i18n/locales/ja.d.ts +16 -0
- package/dist/i18n/locales/ja.js +10 -0
- package/dist/i18n/locales/nl.d.ts +16 -0
- package/dist/i18n/locales/nl.js +10 -0
- package/dist/i18n/locales/pl.d.ts +16 -0
- package/dist/i18n/locales/pl.js +10 -0
- package/dist/i18n/locales/pt.d.ts +16 -0
- package/dist/i18n/locales/pt.js +10 -0
- package/dist/i18n/locales/ro.d.ts +16 -0
- package/dist/i18n/locales/ro.js +10 -0
- package/dist/i18n/locales/ru.d.ts +16 -0
- package/dist/i18n/locales/ru.js +10 -0
- package/dist/i18n/locales/sq.d.ts +16 -0
- package/dist/i18n/locales/sq.js +10 -0
- package/dist/i18n/locales/sv.d.ts +16 -0
- package/dist/i18n/locales/sv.js +10 -0
- package/dist/i18n/locales/tr.d.ts +16 -0
- package/dist/i18n/locales/tr.js +10 -0
- package/dist/i18n/locales/zh.d.ts +16 -0
- package/dist/i18n/locales/zh.js +10 -0
- package/dist/index.js +261 -258
- package/dist/locales/ar.json +16 -0
- package/dist/locales/de.json +16 -0
- package/dist/locales/el.json +16 -0
- package/dist/locales/en.json +16 -0
- package/dist/locales/es.json +16 -0
- package/dist/locales/fr.json +16 -0
- package/dist/locales/hi.json +16 -0
- package/dist/locales/it.json +16 -0
- package/dist/locales/ja.json +16 -0
- package/dist/locales/nl.json +16 -0
- package/dist/locales/pl.json +16 -0
- package/dist/locales/pt.json +16 -0
- package/dist/locales/ro.json +16 -0
- package/dist/locales/ru.json +16 -0
- package/dist/locales/sq.json +16 -0
- package/dist/locales/sv.json +16 -0
- package/dist/locales/tr.json +16 -0
- package/dist/locales/zh.json +16 -0
- package/dist/patterns/anamnesis/anamnesis-baseline.d.ts +35 -0
- package/dist/patterns/anamnesis/anamnesis-compile.d.ts +4 -1
- package/dist/patterns/anamnesis/anamnesis-evolution-grid.d.ts +15 -9
- package/dist/patterns/anamnesis/anamnesis-evolution.d.ts +24 -12
- package/dist/patterns/anamnesis/anamnesis-matrix.d.ts +6 -2
- 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 +6 -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 +1 -1
- package/package.json +5 -1
- package/dist/_chunks/anamnesis-summary-card-CpQViN5l.js +0 -392
- package/dist/_chunks/form-field-M5UpX65Z.js +0 -123
- package/dist/_chunks/radio-group-CI-6SmSw.js +0 -167
- package/dist/patterns/anamnesis/anamnesis-compare-panel.d.ts +0 -86
|
@@ -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,86 +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
|
-
}
|
|
82
|
-
/** Slot 4's contents: a header carrying the way out, the visit picker, then
|
|
83
|
-
* one matrix of differences. The enclosing `Collapsible` lives in
|
|
84
|
-
* `anamnesis-evolution.tsx`. */
|
|
85
|
-
export declare function AnamnesisComparePanel({ visits, columns, selectedIds, onSelectionChange, diff, seriesByKey, pathologies, annotations, onSelectAnnotation, t, onClose, framed, }: AnamnesisComparePanelProps): import("react/jsx-runtime").JSX.Element;
|
|
86
|
-
//# sourceMappingURL=anamnesis-compare-panel.d.ts.map
|