react-advanced-odontogram 2.3.0 → 2.5.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/README.md +13 -3
- package/dist/index.d.ts +1121 -170
- package/dist/loader-BN_gLe6T.js.map +1 -1
- package/dist/notoArabic-En58EmGw.js.map +1 -1
- package/dist/notoSC-G1i3iX-D.js.map +1 -1
- package/dist/odontogram.js +18534 -6523
- package/dist/odontogram.js.map +1 -1
- package/dist/roboto-Bywi16HJ.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +4 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,19 +1,233 @@
|
|
|
1
|
+
import { Bundle } from 'fhir/r4';
|
|
1
2
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
import { Resource } from 'fhir/r4';
|
|
2
5
|
|
|
3
6
|
/** User accepted the divergence: run the deferred edit (status only — the plan
|
|
4
7
|
* stays as planned), then notify (post-edit refresh + close the modal). No-op
|
|
5
8
|
* when nothing is pending. */
|
|
6
9
|
export declare function acceptDualStateConfirm(): void;
|
|
7
10
|
|
|
11
|
+
export declare type ActiveCaries = {
|
|
12
|
+
surfaces: ActiveCariesSurface[];
|
|
13
|
+
subcrownChecked: boolean;
|
|
14
|
+
subcrownDisabled: boolean;
|
|
15
|
+
subcrownLabel: string;
|
|
16
|
+
cariesActiveDepth: number;
|
|
17
|
+
rootCariesDisplay: string;
|
|
18
|
+
cariesDepthVisible: boolean;
|
|
19
|
+
rootCariesVisible: boolean;
|
|
20
|
+
cariesSectionVisible: boolean;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** One caries surface-cross cell's fully-resolved render state. */
|
|
24
|
+
export declare type ActiveCariesSurface = {
|
|
25
|
+
value: string;
|
|
26
|
+
surface: string;
|
|
27
|
+
pos: string;
|
|
28
|
+
letter: string;
|
|
29
|
+
label: string;
|
|
30
|
+
checked: boolean;
|
|
31
|
+
disabled: boolean;
|
|
32
|
+
depth: string;
|
|
33
|
+
icdas: number;
|
|
34
|
+
isIcdas: boolean;
|
|
35
|
+
radio: string | null;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** The active-tooth diagnoses card view-model (return shape of
|
|
39
|
+
* {@link getActiveDiagnoses}). */
|
|
40
|
+
export declare type ActiveDiagnoses = {
|
|
41
|
+
visible: boolean;
|
|
42
|
+
rows: ActiveDiagnosisRow[];
|
|
43
|
+
addableKeys: {
|
|
44
|
+
key: string;
|
|
45
|
+
icd10: string;
|
|
46
|
+
}[];
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/** One row in the active-tooth diagnoses card: a RAW rule-derived key (whether
|
|
50
|
+
* or not it's currently suppressed) or a key the user explicitly ADDED that no
|
|
51
|
+
* rule would have derived. */
|
|
52
|
+
export declare type ActiveDiagnosisRow = {
|
|
53
|
+
key: string;
|
|
54
|
+
icd10: string;
|
|
55
|
+
source: "derived" | "added";
|
|
56
|
+
suppressed: boolean;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export declare type ActiveFillings = {
|
|
60
|
+
surfaces: ActiveFillingSurface[];
|
|
61
|
+
fillingMaterial: string;
|
|
62
|
+
fillingOptions: {
|
|
63
|
+
value: string;
|
|
64
|
+
label: string;
|
|
65
|
+
}[];
|
|
66
|
+
surfaceGridVisible: boolean;
|
|
67
|
+
defectDisabled: boolean;
|
|
68
|
+
simpleMode: boolean;
|
|
69
|
+
simpleRowVisible: boolean;
|
|
70
|
+
simpleToggleChecked: boolean;
|
|
71
|
+
simpleDefectRowVisible: boolean;
|
|
72
|
+
simpleDefectValue: string;
|
|
73
|
+
simpleDefectOptions: {
|
|
74
|
+
value: string;
|
|
75
|
+
label: string;
|
|
76
|
+
}[];
|
|
77
|
+
fissureSealing: boolean;
|
|
78
|
+
fissureRowVisible: boolean;
|
|
79
|
+
fillingSectionVisible: boolean;
|
|
80
|
+
subcariesSummary: string;
|
|
81
|
+
defectSummary: string;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
/** One filling-surface cell's fully-resolved render state (mirrors the DOM the
|
|
85
|
+
* imperative `buildSurfaceCross` + `syncFillingSubcariesIndicator` +
|
|
86
|
+
* `syncFillingDefectIndicator` produced for `#fillingSurfaceChecks`). */
|
|
87
|
+
export declare type ActiveFillingSurface = {
|
|
88
|
+
value: string;
|
|
89
|
+
surface: string;
|
|
90
|
+
pos: string;
|
|
91
|
+
letter: string;
|
|
92
|
+
label: string;
|
|
93
|
+
labelId: string;
|
|
94
|
+
checked: boolean;
|
|
95
|
+
material: string;
|
|
96
|
+
hasSubcaries: boolean;
|
|
97
|
+
subDepth: string;
|
|
98
|
+
subIcdas: number;
|
|
99
|
+
isIcdas: boolean;
|
|
100
|
+
hasDefect: boolean;
|
|
101
|
+
defectValue: string | null;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
export declare type ActiveOrtho = {
|
|
105
|
+
appliance: string;
|
|
106
|
+
drift: string;
|
|
107
|
+
vertical: string;
|
|
108
|
+
rotation: boolean;
|
|
109
|
+
visible: boolean;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export declare type ActiveRootPerio = {
|
|
113
|
+
sectionVisible: boolean;
|
|
114
|
+
rootBlockVisible: boolean;
|
|
115
|
+
perioBlockVisible: boolean;
|
|
116
|
+
pulpEndoValue: string;
|
|
117
|
+
pulpEndoNoneOption: RootPerioOption | null;
|
|
118
|
+
pulpEndoGroups: RootPerioOptGroup[];
|
|
119
|
+
pulpEndoDisabled: boolean;
|
|
120
|
+
apicalDxValue: string;
|
|
121
|
+
apicalDxOptions: RootPerioOption[];
|
|
122
|
+
apicalDxDisabled: boolean;
|
|
123
|
+
apicalDxRowVisible: boolean;
|
|
124
|
+
periapicalTypeValue: string;
|
|
125
|
+
periapicalTypeOptions: RootPerioOption[];
|
|
126
|
+
periapicalRowVisible: boolean;
|
|
127
|
+
resorptionValue: string;
|
|
128
|
+
resorptionOptions: RootPerioOption[];
|
|
129
|
+
resorptionDisabled: boolean;
|
|
130
|
+
resorptionRowVisible: boolean;
|
|
131
|
+
endoResectionChecked: boolean;
|
|
132
|
+
endoResectionDisabled: boolean;
|
|
133
|
+
parapulpalPinChecked: boolean;
|
|
134
|
+
parapulpalPinDisabled: boolean;
|
|
135
|
+
mobilityValue: string;
|
|
136
|
+
mobilityOptions: RootPerioOption[];
|
|
137
|
+
mobilityDisabled: boolean;
|
|
138
|
+
mobilityRowVisible: boolean;
|
|
139
|
+
perioRowVisible: boolean;
|
|
140
|
+
mods: ActiveRootPerioMod[];
|
|
141
|
+
calculusChecked: boolean;
|
|
142
|
+
calculusRowVisible: boolean;
|
|
143
|
+
periImplantValue: string;
|
|
144
|
+
periImplantOptions: RootPerioOption[];
|
|
145
|
+
periImplantRowVisible: boolean;
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
/** One `#modsChecks` checkbox's fully-resolved render state. `hiddenClass`
|
|
149
|
+
* reproduces the `.hidden` class the sub-syncs toggled on the wrapping
|
|
150
|
+
* `<label>`; `styleHidden` reproduces the `style.display:none` the
|
|
151
|
+
* `setDisabled()`→`syncControlLabelVisibility()` path applied. */
|
|
152
|
+
export declare type ActiveRootPerioMod = {
|
|
153
|
+
value: string;
|
|
154
|
+
label: string;
|
|
155
|
+
checked: boolean;
|
|
156
|
+
disabled: boolean;
|
|
157
|
+
hiddenClass: boolean;
|
|
158
|
+
styleHidden: boolean;
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
export declare type ActiveToothDetails = {
|
|
162
|
+
toothSelectValue: string;
|
|
163
|
+
toothSelectOptions: ToothDetailsOption[];
|
|
164
|
+
substrateValue: string;
|
|
165
|
+
substrateOptions: ToothDetailsOption[];
|
|
166
|
+
substrateRowVisible: boolean;
|
|
167
|
+
extractionWoundChecked: boolean;
|
|
168
|
+
extractionRowVisible: boolean;
|
|
169
|
+
missingClosedChecked: boolean;
|
|
170
|
+
missingClosedRowVisible: boolean;
|
|
171
|
+
restorationValue: string;
|
|
172
|
+
restorationOptions: ToothDetailsOption[];
|
|
173
|
+
restorationRowVisible: boolean;
|
|
174
|
+
crownLeakageChecked: boolean;
|
|
175
|
+
crownLeakageRowVisible: boolean;
|
|
176
|
+
brokenMesialChecked: boolean;
|
|
177
|
+
brokenIncisalChecked: boolean;
|
|
178
|
+
brokenDistalChecked: boolean;
|
|
179
|
+
brokenCrownRowVisible: boolean;
|
|
180
|
+
contactMesialChecked: boolean;
|
|
181
|
+
contactDistalChecked: boolean;
|
|
182
|
+
contactPointRowVisible: boolean;
|
|
183
|
+
bruxismRowVisible: boolean;
|
|
184
|
+
wearSimple: boolean;
|
|
185
|
+
wearEdgeValue: string;
|
|
186
|
+
wearEdgeOptions: ToothDetailsOption[];
|
|
187
|
+
wearEdgeToggleChecked: boolean;
|
|
188
|
+
wearCervicalValue: string;
|
|
189
|
+
wearCervicalOptions: ToothDetailsOption[];
|
|
190
|
+
wearCervicalToggleChecked: boolean;
|
|
191
|
+
discolorationRowVisible: boolean;
|
|
192
|
+
discoSimple: boolean;
|
|
193
|
+
discolorationValue: string;
|
|
194
|
+
discolorationOptions: ToothDetailsOption[];
|
|
195
|
+
discolorationToggleChecked: boolean;
|
|
196
|
+
crownActionsRowVisible: boolean;
|
|
197
|
+
bridgePillarChecked: boolean;
|
|
198
|
+
bridgePillarRowVisible: boolean;
|
|
199
|
+
extractionPlanChecked: boolean;
|
|
200
|
+
extractionPlanRowVisible: boolean;
|
|
201
|
+
extractionPlanParent: ExtractionPlanParent;
|
|
202
|
+
crownReplaceChecked: boolean;
|
|
203
|
+
crownReplaceRowVisible: boolean;
|
|
204
|
+
crownNeededChecked: boolean;
|
|
205
|
+
crownNeededRowVisible: boolean;
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
/** Add a tooth-level diagnosis by writing its chart axis on the selection — a
|
|
209
|
+
* real finding (glyph + derived + exported), through the same DS-1-gated,
|
|
210
|
+
* repainting path as the clinical controls. Prototype-safe key guard; a
|
|
211
|
+
* non-reverse-mappable key (e.g. `caries`) is a silent no-op. */
|
|
212
|
+
export declare function addDiagnosisToSelection(key: string): void;
|
|
213
|
+
|
|
8
214
|
declare type Any = any;
|
|
9
215
|
|
|
10
216
|
/**
|
|
11
|
-
* Root React component for the Odontogram Editor.
|
|
217
|
+
* Root React component for the Odontogram Editor (aka `OdontogramShell`).
|
|
12
218
|
*
|
|
13
219
|
* Renders the full dental chart UI: top bar with language/numbering/dark-mode
|
|
14
220
|
* controls, the SVG tooth grid, and the right-hand control panel for setting
|
|
15
221
|
* tooth states (caries, fillings, crowns, endo, inflammation, etc.).
|
|
16
222
|
*
|
|
223
|
+
* Since the composable-UI refactor (design/composable-ui.md, Tier 1) this is a
|
|
224
|
+
* THIN composition: it mounts {@link OdontogramProvider} (which owns all state,
|
|
225
|
+
* effects and handlers) and lays out the four surface components + the
|
|
226
|
+
* shell-managed perio bits and modals in the default arrangement. The default
|
|
227
|
+
* composition renders byte-identical DOM to the pre-refactor shell (frozen by
|
|
228
|
+
* `src/__tests__/parity/shell-dom.test.tsx`). A host can instead compose the
|
|
229
|
+
* exported surfaces under its own wrappers inside an `OdontogramProvider`.
|
|
230
|
+
*
|
|
17
231
|
* @example
|
|
18
232
|
* ```tsx
|
|
19
233
|
* // Standalone usage
|
|
@@ -30,128 +244,46 @@ declare type Any = any;
|
|
|
30
244
|
* />
|
|
31
245
|
* ```
|
|
32
246
|
*/
|
|
33
|
-
declare function App(
|
|
247
|
+
declare function App(props: Omit<OdontogramProviderProps, "children">): JSX_2.Element;
|
|
34
248
|
export { App as OdontogramShell }
|
|
35
249
|
export default App;
|
|
36
250
|
|
|
37
|
-
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
/** Callback when the user toggles dark mode. */
|
|
56
|
-
onDarkModeChange?: (dark: boolean) => void;
|
|
57
|
-
/**
|
|
58
|
-
* Custom theme configuration. Overrides the default color palette via
|
|
59
|
-
* CSS custom properties (`--odon-*`). See {@link OdontogramThemeConfig}.
|
|
60
|
-
*/
|
|
61
|
-
themeConfig?: OdontogramThemeConfig;
|
|
62
|
-
/**
|
|
63
|
-
* Custom SVG plugins for extending the odontogram with additional visual
|
|
64
|
-
* overlays and per-tooth custom state. See {@link OdontogramPlugin}.
|
|
65
|
-
*/
|
|
66
|
-
plugins?: OdontogramPlugin[];
|
|
67
|
-
/**
|
|
68
|
-
* When true, disables all interactions (click, touch, keyboard).
|
|
69
|
-
* Useful for print/report/view modes.
|
|
70
|
-
*/
|
|
71
|
-
readOnly?: boolean;
|
|
72
|
-
/**
|
|
73
|
-
* When true, enables per-tooth notes. Double-click a tooth to add/edit a note.
|
|
74
|
-
* Notes are shown in hover tooltips and included in JSON export/import.
|
|
75
|
-
*/
|
|
76
|
-
enableNotes?: boolean;
|
|
77
|
-
/**
|
|
78
|
-
* Enable ICDAS II per-surface caries scoring (0–6). When enabled, the depth
|
|
79
|
-
* selector/popup expose ICDAS codes 1–6 and the surface indicator shows a
|
|
80
|
-
* numeric badge; otherwise the 3-level scale is used.
|
|
81
|
-
*/
|
|
82
|
-
enableIcdas?: boolean;
|
|
83
|
-
/**
|
|
84
|
-
* Pulp-diagnosis detail level for the pulp control:
|
|
85
|
-
* `"simple"` (healthy / pulpitis), `"aae"` (4 AAE pulp diagnoses, default) or
|
|
86
|
-
* `"latin"` (9 practical-Latin subtypes). A stored value round-trips at every
|
|
87
|
-
* level; the level only governs how the pulp control presents it.
|
|
88
|
-
*/
|
|
89
|
-
pulpDetailLevel?: PulpDetailLevel;
|
|
90
|
-
/**
|
|
91
|
-
* Secondary-caries (CARS) granularity for the per-surface score picker:
|
|
92
|
-
* `"simple"` ([0,3]), `"standard"` ([0,1,3,6], default) or `"full"` ([0..6]).
|
|
93
|
-
* A stored score round-trips at every mode; the mode only governs the offered
|
|
94
|
-
* option list. (The mode UI lives in the Settings modal; this prop is the
|
|
95
|
-
* controlled entry point.)
|
|
96
|
-
*/
|
|
97
|
-
secondaryCariesMode?: SecondaryCariesMode;
|
|
98
|
-
/**
|
|
99
|
-
* Root-caries granularity for the per-tooth picker: `"simple"` (none /
|
|
100
|
-
* present, default) or `"severity"` (the full none/active/arrested/
|
|
101
|
-
* active-cavitated enum). Non-collapsing across modes.
|
|
102
|
-
*/
|
|
103
|
-
rootCariesMode?: RootCariesMode;
|
|
104
|
-
/**
|
|
105
|
-
* Radiographic-depth granularity for the per-surface picker: `"off"`
|
|
106
|
-
* (hidden, default), `"threeLevel"` (superficial/middle/deep) or `"detailed"`
|
|
107
|
-
* (E1..D3). When off, the per-surface radiographic badge is not shown.
|
|
108
|
-
*/
|
|
109
|
-
radiographicDepthMode?: RadiographicDepthMode;
|
|
110
|
-
/**
|
|
111
|
-
* Whether the visual caries-depth encoding (per-surface depth picker + the
|
|
112
|
-
* opacity/contour depth tier in the render) is active. Default `true`; set
|
|
113
|
-
* `false` to render caried surfaces at the SVG default with no depth tier.
|
|
114
|
-
*/
|
|
115
|
-
cariesDepthEnabled?: boolean;
|
|
116
|
-
/**
|
|
117
|
-
* Detail level for the per-tooth wear control: `"simple"` (yes/no toggle for
|
|
118
|
-
* attrition) or `"complex"` (wear type per edge and cervix, default).
|
|
119
|
-
*/
|
|
120
|
-
wearDetailLevel?: ToothDetailLevel;
|
|
121
|
-
/**
|
|
122
|
-
* Detail level for the per-tooth discoloration control: `"simple"` (yes/no
|
|
123
|
-
* toggle) or `"complex"` (choose the discoloration cause, default).
|
|
124
|
-
*/
|
|
125
|
-
discolorationDetailLevel?: ToothDetailLevel;
|
|
126
|
-
/**
|
|
127
|
-
* Surface-notation mode for caries/filling surface letters + captions:
|
|
128
|
-
* `"full"` (default) makes them position-aware (incisal on an anterior
|
|
129
|
-
* tooth, labial on an anterior buccal surface, palatal on an upper lingual
|
|
130
|
-
* surface) or `"simple"` (always the tooth-independent B/O/L set).
|
|
131
|
-
*/
|
|
132
|
-
surfaceNotation?: SurfaceNotation;
|
|
133
|
-
/**
|
|
134
|
-
* Whether the Statuses panel (`#statusCard`) is shown. Default `true`. The
|
|
135
|
-
* panel visibility is a settings-driven wrapper around the section — the
|
|
136
|
-
* section's own imperative collapse/expand behavior is unaffected.
|
|
137
|
-
*/
|
|
138
|
-
showStatusCard?: boolean;
|
|
139
|
-
/**
|
|
140
|
-
* Whether the Orthodontics panel (`#orthoCard`) is shown. Default `true`.
|
|
141
|
-
* Composes with the panel's own imperative ortho-eligibility gate (hidden
|
|
142
|
-
* when no selected tooth is ortho-eligible) — both must be satisfied for
|
|
143
|
-
* the panel to render.
|
|
144
|
-
*/
|
|
145
|
-
showOrthoCard?: boolean;
|
|
146
|
-
};
|
|
251
|
+
/** Apply the MIXED dentition preset — see {@link applyPrimaryDentition}; gated
|
|
252
|
+
* STRUCTURAL edit with per-tooth no-op signaling and the `edentulous` flip
|
|
253
|
+
* inside the gated closure. */
|
|
254
|
+
export declare function applyMixedDentition(): void;
|
|
255
|
+
|
|
256
|
+
/** Apply the PRIMARY (deciduous) dentition preset — a STRUCTURAL
|
|
257
|
+
* interactive edit (not a reset), routed through the batch gate. `targetFor`
|
|
258
|
+
* is the state each tooth ends up in; only teeth that actually change are
|
|
259
|
+
* passed to the gate so unchanged teeth are not marked plan-edited / mirrored
|
|
260
|
+
* (per-tooth no-op signaling). Uninitialized plan stays a pure passthrough.
|
|
261
|
+
* The `edentulous` flip + button state live INSIDE the gated closure so on the
|
|
262
|
+
* deferred-confirm path they take effect only on Accept — otherwise Cancel
|
|
263
|
+
* would leave `edentulous` flipped while every tooth
|
|
264
|
+
* is untouched (flag/teeth mismatch). `notifyStateChange()` moves inside too so
|
|
265
|
+
* the whole-mouth refresh fires when the batch actually applies. */
|
|
266
|
+
export declare function applyPrimaryDentition(): void;
|
|
267
|
+
|
|
268
|
+
export declare function applyStatusExtra(option: Any): void;
|
|
147
269
|
|
|
148
270
|
/** User cancelled: do NOT apply the edit; re-sync the active tooth's controls
|
|
149
271
|
* from stored state so the control the user just changed snaps back (no stale
|
|
150
272
|
* UI), then notify (refresh + close the modal). No-op when nothing is pending. */
|
|
151
273
|
export declare function cancelDualStateConfirm(): void;
|
|
152
274
|
|
|
275
|
+
export declare function CariesCard(): JSX_2.Element;
|
|
276
|
+
|
|
277
|
+
/** Case-level (whole-mouth / regional) dental diagnosis identifiers — authored
|
|
278
|
+
* on the case, not derived from a tooth. Separate from the tooth-level
|
|
279
|
+
* `DiagnosisKey`/`DX_CODES`. */
|
|
280
|
+
declare type CaseConditionKey = "jawSizeAnomaly" | "jawBaseAnomaly" | "archRelationAnomaly" | "toothPositionAnomaly" | "malocclusionUnspecified" | "dentofacialFunctional" | "tmjDisorder" | "odontogenicCyst" | "nonOdontogenicCyst" | "jawCystOther" | "oralCystOther" | "salivaryAtrophy" | "salivaryHypertrophy" | "sialadenitis" | "salivaryAbscess" | "salivaryFistula" | "sialolithiasis" | "mucocele" | "salivarySecretion" | "recurrentAphthae" | "stomatitisOther" | "oralCellulitis" | "oralMucositis" | "anodontia" | "hereditaryStructure" | "lipDisease" | "leukoplakia" | "mucosalLesionOther";
|
|
281
|
+
|
|
153
282
|
declare type ChartMode = "status" | "plan";
|
|
154
283
|
|
|
284
|
+
/** Remove the stored entry for the active (or default) key. */
|
|
285
|
+
export declare function clearPersistedState(): void;
|
|
286
|
+
|
|
155
287
|
/**
|
|
156
288
|
* Clear the current tooth selection and reset the active tooth. Useful when
|
|
157
289
|
* switching to view or quote-builder mode from the host application.
|
|
@@ -161,6 +293,28 @@ export declare function clearSelection(): void;
|
|
|
161
293
|
/** Close the perio-chart overlay. No-op (still notifies) if already closed. */
|
|
162
294
|
export declare function closePerioOverlay(): void;
|
|
163
295
|
|
|
296
|
+
/**
|
|
297
|
+
* A national code overlay. `translation` packs keep the WHO codes and only
|
|
298
|
+
* localize the display (cheap: BNO-10, MKCH-10, and the dental chapter of
|
|
299
|
+
* ICD-10-GM/CIM-10). `modification` packs remap the code itself (US ICD-10-CM,
|
|
300
|
+
* added in DX-5).
|
|
301
|
+
*/
|
|
302
|
+
declare interface CodingPack {
|
|
303
|
+
id: string;
|
|
304
|
+
system: string;
|
|
305
|
+
kind: "translation" | "modification";
|
|
306
|
+
displays?: Partial<Record<DiagnosisKey, string>>;
|
|
307
|
+
caseDisplays?: Partial<Record<CaseConditionKey, string>>;
|
|
308
|
+
codes?: Partial<Record<DiagnosisKey, {
|
|
309
|
+
code: string;
|
|
310
|
+
display: string;
|
|
311
|
+
}>>;
|
|
312
|
+
caseCodes?: Partial<Record<CaseConditionKey, {
|
|
313
|
+
code: string;
|
|
314
|
+
display: string;
|
|
315
|
+
}>>;
|
|
316
|
+
}
|
|
317
|
+
|
|
164
318
|
/**
|
|
165
319
|
* Tear down the odontogram engine: clear all DOM elements built by the engine,
|
|
166
320
|
* unsubscribe from i18n changes, and reset internal state. After this call,
|
|
@@ -168,12 +322,28 @@ export declare function closePerioOverlay(): void;
|
|
|
168
322
|
*/
|
|
169
323
|
export declare function destroyOdontogram(): void;
|
|
170
324
|
|
|
325
|
+
export declare function DiagnosesCard(): JSX_2.Element;
|
|
326
|
+
|
|
327
|
+
/** Internal dental-diagnosis identifiers. Extended per DX sub-project. */
|
|
328
|
+
declare type DiagnosisKey = "caries" | "periodontitis" | "gingivitis" | "cariesCementum" | "cariesArrested" | "pulpitis" | "pulpNecrosis" | "apicalPeriodontitisAcute" | "apicalPeriodontitisChronic" | "radicularCyst" | "periapicalAbscess" | "periapicalAbscessSinus" | "condensingOsteitis" | "resorption" | "attrition" | "abrasion" | "erosion" | "abfraction" | "calculus" | "fluorosis" | "tetracyclineStain" | "postEruptiveColour" | "toothLoss" | "retainedRoot" | "toothFracture" | "periImplantMucositis" | "periImplantitis";
|
|
329
|
+
|
|
330
|
+
/** Stop persisting. The stored entry is left in place (see clearPersistedState).
|
|
331
|
+
* A pending debounced save is flushed first so the last edit isn't lost. */
|
|
332
|
+
export declare function disablePersistence(): void;
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* Turn on localStorage persistence: restores a previously saved case (if any),
|
|
336
|
+
* then saves on every state change. Idempotent — calling again replaces the
|
|
337
|
+
* previous subscription and options. Call AFTER the odontogram has mounted.
|
|
338
|
+
*/
|
|
339
|
+
export declare function enablePersistence(options?: PersistenceOptions): void;
|
|
340
|
+
|
|
171
341
|
/**
|
|
172
342
|
* Export the current odontogram as an HL7 FHIR R4 collection Bundle (JSON).
|
|
173
343
|
* @param options - Optional subject reference (e.g. "Patient/123"); when
|
|
174
344
|
* omitted a placeholder Patient is embedded.
|
|
175
345
|
*/
|
|
176
|
-
export declare function exportFhir(options?: FhirExportOptions):
|
|
346
|
+
export declare function exportFhir(options?: FhirExportOptions): Bundle<Resource>;
|
|
177
347
|
|
|
178
348
|
/**
|
|
179
349
|
* Export the odontogram as PNG or JPG. Renders the serialized SVG via the
|
|
@@ -183,8 +353,8 @@ export declare function exportFhir(options?: FhirExportOptions): void;
|
|
|
183
353
|
export declare function exportImage(format?: "png" | "jpg"): Promise<void>;
|
|
184
354
|
|
|
185
355
|
/**
|
|
186
|
-
*
|
|
187
|
-
*
|
|
356
|
+
* Assemble a printable PDF report (jsPDF-native — vector text + raster chart
|
|
357
|
+
* PNGs, no svg2pdf.js). Gathers all `data` (SVG→PNG
|
|
188
358
|
* rasterization via {@link rasterizeSvgToPng}, summary/classification text,
|
|
189
359
|
* `hasAnyPerioData()`), drives the export-progress overlay, then hands off
|
|
190
360
|
* to the PURE `assemblePdf()` (`src/perioPdf.ts`), which decides section
|
|
@@ -194,23 +364,24 @@ export declare function exportImage(format?: "png" | "jpg"): Promise<void>;
|
|
|
194
364
|
* browser canvas/font internals jsdom doesn't fully provide, so this
|
|
195
365
|
* wrapper is NOT unit-tested directly — `assemblePdf`'s section-gating IS
|
|
196
366
|
* thoroughly unit-tested with an injectable fake doc (see
|
|
197
|
-
* `ui3b-export-pdf.test.ts`). This wrapper's own raster→layout→save path is
|
|
198
|
-
*
|
|
367
|
+
* `ui3b-export-pdf.test.ts`). This wrapper's own raster→layout→save path is a
|
|
368
|
+
* browser-verify item.
|
|
199
369
|
*/
|
|
200
370
|
export declare function exportPdf(opts: PdfExportOptions): Promise<void>;
|
|
201
371
|
|
|
202
|
-
/**
|
|
372
|
+
/** Export the full perio chart as PNG/JPG (SVG → canvas @2×, via the
|
|
203
373
|
* shared {@link rasterizeSvgToCanvas} raster core). */
|
|
204
374
|
export declare function exportPerioImage(format?: "png" | "jpg"): Promise<void>;
|
|
205
375
|
|
|
206
|
-
/**
|
|
376
|
+
/** Export the full perio chart as a standalone vector SVG file. */
|
|
207
377
|
export declare function exportPerioSvg(): Promise<void>;
|
|
208
378
|
|
|
209
379
|
export declare function exportStatus(): void;
|
|
210
380
|
|
|
211
|
-
/** Export the odontogram as a downloadable, scalable SVG file. */
|
|
212
381
|
export declare function exportSvg(): Promise<void>;
|
|
213
382
|
|
|
383
|
+
export declare type ExtractionPlanParent = "brokenCrownRow" | "bruxismRow" | "crownActionsRow";
|
|
384
|
+
|
|
214
385
|
/** Options for buildFhirBundle / exportFhir. */
|
|
215
386
|
export declare interface FhirExportOptions {
|
|
216
387
|
/**
|
|
@@ -219,8 +390,25 @@ export declare interface FhirExportOptions {
|
|
|
219
390
|
* referenced by every Observation.
|
|
220
391
|
*/
|
|
221
392
|
subject?: string;
|
|
393
|
+
/** Active national diagnosis coding pack (adds a second coding to each
|
|
394
|
+
* Condition). Resolved and passed by the export entry point. */
|
|
395
|
+
codingPack?: CodingPack;
|
|
396
|
+
/** Emit a SNOMED CT coding on each Condition when true (DX-6 overlay). Set
|
|
397
|
+
* from the `snomedEnabled` session flag by the export entry point. */
|
|
398
|
+
snomed?: boolean;
|
|
399
|
+
/** Embed the engine's own `CodeSystem` resource in the Bundle (default `true`)
|
|
400
|
+
* so validators can resolve the LOCAL_SYSTEM codes from the Bundle itself.
|
|
401
|
+
* Pass `false` for a leaner Bundle when the consumer already hosts the
|
|
402
|
+
* published `fhir/CodeSystem-odontogram.json`. */
|
|
403
|
+
includeCodeSystem?: boolean;
|
|
222
404
|
}
|
|
223
405
|
|
|
406
|
+
/** Fillings card complexity — "complex" = per-surface grid (default), "simple"
|
|
407
|
+
* = one filled/not-filled toggle for the whole tooth. */
|
|
408
|
+
export declare type FillingComplexity = "complex" | "simple";
|
|
409
|
+
|
|
410
|
+
export declare function FillingsCard(): JSX_2.Element;
|
|
411
|
+
|
|
224
412
|
/** Formats a tooth number for display using the active numbering system AND
|
|
225
413
|
* the milktooth display-remap ({@link getDisplayedToothNumber}) — the exact
|
|
226
414
|
* same formatting {@link getOdontogramSummary} uses for every tooth number
|
|
@@ -229,13 +417,57 @@ export declare interface FhirExportOptions {
|
|
|
229
417
|
* identically, without duplicating the numbering/milktooth logic. */
|
|
230
418
|
export declare function formatToothLabel(toothNo: number): string;
|
|
231
419
|
|
|
420
|
+
export declare function getActiveCaries(): ActiveCaries;
|
|
421
|
+
|
|
422
|
+
/** The active-tooth diagnoses card view-model — mirrors `getActiveRootPerio`'s
|
|
423
|
+
* active-tooth guard shape. `rows` covers the RAW derived set (each tagged
|
|
424
|
+
* `suppressed` per the tooth's `dxOverrides`) plus any `add`-mode override key
|
|
425
|
+
* that no rule derived; `addableKeys` is every other tooth-level diagnosis key
|
|
426
|
+
* not already covered by a row, for an "add a diagnosis" picker. Localized
|
|
427
|
+
* labels are resolved by the CARD via `t("dx."+key)` — this returns raw keys +
|
|
428
|
+
* codes only. `visible` is false (empty rows/addableKeys) with no active tooth
|
|
429
|
+
* or on a tooth that isn't naturally present (missing/implant/under-gum/
|
|
430
|
+
* extraction-socket — the same gate `deriveDentalDiagnoses` itself applies). */
|
|
431
|
+
export declare function getActiveDiagnoses(): ActiveDiagnoses;
|
|
432
|
+
|
|
433
|
+
export declare function getActiveFillings(): ActiveFillings;
|
|
434
|
+
|
|
435
|
+
export declare function getActiveOrtho(): ActiveOrtho | null;
|
|
436
|
+
|
|
437
|
+
export declare function getActiveRootPerio(): ActiveRootPerio;
|
|
438
|
+
|
|
439
|
+
export declare function getActiveToothDetails(): ActiveToothDetails;
|
|
440
|
+
|
|
232
441
|
export declare function getCariesDepthEnabled(): boolean;
|
|
233
442
|
|
|
443
|
+
export declare function getCariesDepthOptions(): Array<{
|
|
444
|
+
value: number;
|
|
445
|
+
label: string;
|
|
446
|
+
title?: string;
|
|
447
|
+
}>;
|
|
448
|
+
|
|
234
449
|
/** Current active chart mode ("status" | "plan"). */
|
|
235
450
|
export declare function getChartMode(): ChartMode;
|
|
236
451
|
|
|
452
|
+
export declare function getDiagnosisCodingPack(): string;
|
|
453
|
+
|
|
237
454
|
export declare function getDiscolorationDetailLevel(): ToothDetailLevel;
|
|
238
455
|
|
|
456
|
+
/** Read the whole-mouth edentulous flag. Backs the declarative Statuses card's
|
|
457
|
+
* `#btnEdentulous` `aria-pressed` via `useEngineState(getEdentulous)`, replacing
|
|
458
|
+
* the former imperative `setToggleButton($("#btnEdentulous"), …)` syncs — every
|
|
459
|
+
* path that flips `edentulous` fires `notifyStateChange()`, so the React button
|
|
460
|
+
* re-reads this and re-renders. */
|
|
461
|
+
export declare function getEdentulous(): boolean;
|
|
462
|
+
|
|
463
|
+
export declare function getFillingComplexity(): "complex" | "simple";
|
|
464
|
+
|
|
465
|
+
export declare function getFillingDefectEnabled(): boolean;
|
|
466
|
+
|
|
467
|
+
export declare function getFillingMaterialAvailability(): Record<string, boolean>;
|
|
468
|
+
|
|
469
|
+
export declare function getFissureSealingEnabled(): boolean;
|
|
470
|
+
|
|
239
471
|
export declare function getIcdasEnabled(): boolean;
|
|
240
472
|
|
|
241
473
|
/**
|
|
@@ -303,14 +535,72 @@ export declare function getRootCariesMode(): RootCariesMode;
|
|
|
303
535
|
|
|
304
536
|
export declare function getSecondaryCariesMode(): SecondaryCariesMode;
|
|
305
537
|
|
|
538
|
+
export declare function getSnomedEnabled(): boolean;
|
|
539
|
+
|
|
306
540
|
/**
|
|
307
541
|
* Export the STATUS chart's payload — identical to exportStatus()'s JSON
|
|
308
542
|
* (status-primary; unaffected by the current chart mode).
|
|
309
543
|
*/
|
|
310
544
|
export declare function getStatusChart(): Any;
|
|
311
545
|
|
|
546
|
+
export declare function getStatusExtras(): ({
|
|
547
|
+
label: string;
|
|
548
|
+
id: string;
|
|
549
|
+
labelKey: string;
|
|
550
|
+
type: string;
|
|
551
|
+
teeth: number[];
|
|
552
|
+
material: string;
|
|
553
|
+
arch?: undefined;
|
|
554
|
+
missingMaterial?: undefined;
|
|
555
|
+
implants?: undefined;
|
|
556
|
+
missing?: undefined;
|
|
557
|
+
} | {
|
|
558
|
+
label: string;
|
|
559
|
+
id: string;
|
|
560
|
+
labelKey: string;
|
|
561
|
+
type: string;
|
|
562
|
+
arch: string;
|
|
563
|
+
material: string;
|
|
564
|
+
missingMaterial: string;
|
|
565
|
+
teeth?: undefined;
|
|
566
|
+
implants?: undefined;
|
|
567
|
+
missing?: undefined;
|
|
568
|
+
} | {
|
|
569
|
+
label: string;
|
|
570
|
+
id: string;
|
|
571
|
+
labelKey: string;
|
|
572
|
+
type: string;
|
|
573
|
+
arch: string;
|
|
574
|
+
teeth?: undefined;
|
|
575
|
+
material?: undefined;
|
|
576
|
+
missingMaterial?: undefined;
|
|
577
|
+
implants?: undefined;
|
|
578
|
+
missing?: undefined;
|
|
579
|
+
} | {
|
|
580
|
+
label: string;
|
|
581
|
+
id: string;
|
|
582
|
+
labelKey: string;
|
|
583
|
+
type: string;
|
|
584
|
+
arch: string;
|
|
585
|
+
implants: number[];
|
|
586
|
+
missing: number[];
|
|
587
|
+
teeth?: undefined;
|
|
588
|
+
material?: undefined;
|
|
589
|
+
missingMaterial?: undefined;
|
|
590
|
+
})[];
|
|
591
|
+
|
|
312
592
|
export declare function getSurfaceNotation(): SurfaceNotation;
|
|
313
593
|
|
|
594
|
+
/** Current tooth-anatomy profile selector. Defaults to `"classic"`. */
|
|
595
|
+
export declare function getToothAnatomy(): ToothAnatomy;
|
|
596
|
+
|
|
597
|
+
/** A tooth's EFFECTIVE coded diagnoses (derived − suppressed + added), reused
|
|
598
|
+
* by both the tooltip ({@link getStateSummary}) and the whole-mouth summary
|
|
599
|
+
* ({@link getOdontogramSummary}). Reads the ACTIVE chart's tooth state (so
|
|
600
|
+
* it's transparently Status/Plan dual-state aware, like every other per-tooth
|
|
601
|
+
* getter). A tooth with no state (never touched) has no diagnoses. */
|
|
602
|
+
export declare function getToothDiagnoses(toothNo: number): ToothDiagnosis[];
|
|
603
|
+
|
|
314
604
|
/**
|
|
315
605
|
* Get a human-readable summary of all active states for a tooth.
|
|
316
606
|
* Useful for building custom tooltip or info-panel UIs.
|
|
@@ -322,8 +612,8 @@ export declare function getToothStateSummary(toothNo: number): string[];
|
|
|
322
612
|
|
|
323
613
|
export declare function getWearDetailLevel(): ToothDetailLevel;
|
|
324
614
|
|
|
325
|
-
/**
|
|
326
|
-
*
|
|
615
|
+
/** True iff ANY periodontal axis has been charted anywhere in the mouth. Used
|
|
616
|
+
* to auto-skip the perio section of an export and to disable the
|
|
327
617
|
* perio image-export menu items on a blank chart. Derived entirely from
|
|
328
618
|
* `getPerioSummary()` — no new traversal. */
|
|
329
619
|
export declare function hasAnyPerioData(): boolean;
|
|
@@ -343,6 +633,9 @@ export declare function isDualStateConfirmPending(): boolean;
|
|
|
343
633
|
/** Whether the perio-chart overlay is currently open. */
|
|
344
634
|
export declare function isPerioOverlayOpen(): boolean;
|
|
345
635
|
|
|
636
|
+
/** True while a state-change subscription is active. */
|
|
637
|
+
export declare function isPersistenceEnabled(): boolean;
|
|
638
|
+
|
|
346
639
|
/**
|
|
347
640
|
* Supported UI languages.
|
|
348
641
|
*
|
|
@@ -371,6 +664,8 @@ declare type Language = "hu" | "en" | "de" | "es" | "it" | "sk" | "pl" | "ru" |
|
|
|
371
664
|
*/
|
|
372
665
|
declare type NumberingSystem = "FDI" | "UNIVERSAL" | "PALMER";
|
|
373
666
|
|
|
667
|
+
export declare function OdontogramChartSurface(): JSX_2.Element;
|
|
668
|
+
|
|
374
669
|
/**
|
|
375
670
|
* Custom SVG plugin definition for the Odontogram engine.
|
|
376
671
|
*
|
|
@@ -418,15 +713,182 @@ export declare type OdontogramPlugin = {
|
|
|
418
713
|
panelSection?: "custom";
|
|
419
714
|
};
|
|
420
715
|
|
|
716
|
+
/**
|
|
717
|
+
* Owns all odontogram shell state, effects, and handlers and provides them to
|
|
718
|
+
* composed surfaces + modals. Renders only the `.odontogram-root` wrapper around
|
|
719
|
+
* `children` — no extra DOM node.
|
|
720
|
+
*/
|
|
721
|
+
export declare function OdontogramProvider({ children, language, onLanguageChange, numberingSystem, onNumberingChange, darkMode, onDarkModeChange, themeConfig, plugins, readOnly: readOnlyProp, enableNotes, enableIcdas, pulpDetailLevel, secondaryCariesMode, rootCariesMode, radiographicDepthMode, cariesDepthEnabled, wearDetailLevel, discolorationDetailLevel, surfaceNotation, showStatusCard: showStatusCardProp, showOrthoCard: showOrthoCardProp, fillingComplexity, onFillingComplexityChange, fillingDefectEnabled: fillingDefectEnabledProp, onFillingDefectEnabledChange, fillingMaterialAvailability, onFillingMaterialAvailabilityChange, fissureSealingEnabled: fissureSealingEnabledProp, onFissureSealingEnabledChange, }: OdontogramProviderProps): JSX_2.Element;
|
|
722
|
+
|
|
723
|
+
/**
|
|
724
|
+
* Props for {@link OdontogramProvider} — the full former `OdontogramShell`
|
|
725
|
+
* (`App`) props surface plus the composed `children`. All state/behavior props
|
|
726
|
+
* are optional: when omitted the provider operates in **standalone** mode with
|
|
727
|
+
* internal state; when provided it operates in **controlled** mode and delegates
|
|
728
|
+
* state to the parent.
|
|
729
|
+
*/
|
|
730
|
+
declare type OdontogramProviderProps = {
|
|
731
|
+
/** Override the UI language (controlled mode). */
|
|
732
|
+
language?: Language;
|
|
733
|
+
/** Callback when the user changes the language. */
|
|
734
|
+
onLanguageChange?: (lang: Language) => void;
|
|
735
|
+
/** Override the tooth numbering system (controlled mode). */
|
|
736
|
+
numberingSystem?: NumberingSystem;
|
|
737
|
+
/** Callback when the user changes the numbering system. */
|
|
738
|
+
onNumberingChange?: (system: NumberingSystem) => void;
|
|
739
|
+
/** Override dark mode state (controlled mode). */
|
|
740
|
+
darkMode?: boolean;
|
|
741
|
+
/** Callback when the user toggles dark mode. */
|
|
742
|
+
onDarkModeChange?: (dark: boolean) => void;
|
|
743
|
+
/**
|
|
744
|
+
* Custom theme configuration. Overrides the default color palette via
|
|
745
|
+
* CSS custom properties (`--odon-*`). See {@link OdontogramThemeConfig}.
|
|
746
|
+
*/
|
|
747
|
+
themeConfig?: OdontogramThemeConfig;
|
|
748
|
+
/**
|
|
749
|
+
* Custom SVG plugins for extending the odontogram with additional visual
|
|
750
|
+
* overlays and per-tooth custom state. See {@link OdontogramPlugin}.
|
|
751
|
+
*/
|
|
752
|
+
plugins?: OdontogramPlugin[];
|
|
753
|
+
/**
|
|
754
|
+
* When true, disables all interactions (click, touch, keyboard).
|
|
755
|
+
* Useful for print/report/view modes.
|
|
756
|
+
*/
|
|
757
|
+
readOnly?: boolean;
|
|
758
|
+
/**
|
|
759
|
+
* When true, enables per-tooth notes. Double-click a tooth to add/edit a note.
|
|
760
|
+
* Notes are shown in hover tooltips and included in JSON export/import.
|
|
761
|
+
*/
|
|
762
|
+
enableNotes?: boolean;
|
|
763
|
+
/**
|
|
764
|
+
* Enable ICDAS II per-surface caries scoring (0–6). When enabled, the depth
|
|
765
|
+
* selector/popup expose ICDAS codes 1–6 and the surface indicator shows a
|
|
766
|
+
* numeric badge; otherwise the 3-level scale is used.
|
|
767
|
+
*/
|
|
768
|
+
enableIcdas?: boolean;
|
|
769
|
+
/**
|
|
770
|
+
* Pulp-diagnosis detail level for the pulp control:
|
|
771
|
+
* `"simple"` (healthy / pulpitis), `"aae"` (4 AAE pulp diagnoses, default) or
|
|
772
|
+
* `"latin"` (9 practical-Latin subtypes). A stored value round-trips at every
|
|
773
|
+
* level; the level only governs how the pulp control presents it.
|
|
774
|
+
*/
|
|
775
|
+
pulpDetailLevel?: PulpDetailLevel;
|
|
776
|
+
/**
|
|
777
|
+
* Secondary-caries (CARS) granularity for the per-surface score picker:
|
|
778
|
+
* `"simple"` ([0,3]), `"standard"` ([0,1,3,6], default) or `"full"` ([0..6]).
|
|
779
|
+
* A stored score round-trips at every mode; the mode only governs the offered
|
|
780
|
+
* option list. (The mode UI lives in the Settings modal; this prop is the
|
|
781
|
+
* controlled entry point.)
|
|
782
|
+
*/
|
|
783
|
+
secondaryCariesMode?: SecondaryCariesMode;
|
|
784
|
+
/**
|
|
785
|
+
* Root-caries granularity for the per-tooth picker: `"simple"` (none /
|
|
786
|
+
* present, default) or `"severity"` (the full none/active/arrested/
|
|
787
|
+
* active-cavitated enum). Non-collapsing across modes.
|
|
788
|
+
*/
|
|
789
|
+
rootCariesMode?: RootCariesMode;
|
|
790
|
+
/**
|
|
791
|
+
* Radiographic-depth granularity for the per-surface picker: `"off"`
|
|
792
|
+
* (hidden, default), `"threeLevel"` (superficial/middle/deep) or `"detailed"`
|
|
793
|
+
* (E1..D3). When off, the per-surface radiographic badge is not shown.
|
|
794
|
+
*/
|
|
795
|
+
radiographicDepthMode?: RadiographicDepthMode;
|
|
796
|
+
/**
|
|
797
|
+
* Whether the visual caries-depth encoding (per-surface depth picker + the
|
|
798
|
+
* opacity/contour depth tier in the render) is active. Default `true`; set
|
|
799
|
+
* `false` to render caried surfaces at the SVG default with no depth tier.
|
|
800
|
+
*/
|
|
801
|
+
cariesDepthEnabled?: boolean;
|
|
802
|
+
/**
|
|
803
|
+
* Detail level for the per-tooth wear control: `"simple"` (yes/no toggle for
|
|
804
|
+
* attrition) or `"complex"` (wear type per edge and cervix, default).
|
|
805
|
+
*/
|
|
806
|
+
wearDetailLevel?: ToothDetailLevel;
|
|
807
|
+
/**
|
|
808
|
+
* Detail level for the per-tooth discoloration control: `"simple"` (yes/no
|
|
809
|
+
* toggle) or `"complex"` (choose the discoloration cause, default).
|
|
810
|
+
*/
|
|
811
|
+
discolorationDetailLevel?: ToothDetailLevel;
|
|
812
|
+
/**
|
|
813
|
+
* Surface-notation mode for caries/filling surface letters + captions:
|
|
814
|
+
* `"full"` (default) makes them position-aware (incisal on an anterior
|
|
815
|
+
* tooth, labial on an anterior buccal surface, palatal on an upper lingual
|
|
816
|
+
* surface) or `"simple"` (always the tooth-independent B/O/L set).
|
|
817
|
+
*/
|
|
818
|
+
surfaceNotation?: SurfaceNotation;
|
|
819
|
+
/**
|
|
820
|
+
* Whether the Statuses panel (`#statusCard`) is shown. Default `true`. The
|
|
821
|
+
* panel visibility is a settings-driven wrapper around the section — the
|
|
822
|
+
* section's own imperative collapse/expand behavior is unaffected.
|
|
823
|
+
*/
|
|
824
|
+
showStatusCard?: boolean;
|
|
825
|
+
/**
|
|
826
|
+
* Whether the Orthodontics panel (`#orthoCard`) is shown. Default `true`.
|
|
827
|
+
* Composes with the panel's own imperative ortho-eligibility gate (hidden
|
|
828
|
+
* when no selected tooth is ortho-eligible) — both must be satisfied for
|
|
829
|
+
* the panel to render.
|
|
830
|
+
*/
|
|
831
|
+
showOrthoCard?: boolean;
|
|
832
|
+
/**
|
|
833
|
+
* Filling-complexity level for the Fillings card: `"simple"` (one material
|
|
834
|
+
* per tooth, no per-surface picker) or `"complex"` (per-surface materials,
|
|
835
|
+
* default). Contrast with {@link settings.panels} — this one mirrors the
|
|
836
|
+
* `fillingComplexity` engine flag (Settings → Fillings). When provided, the
|
|
837
|
+
* value overrides the engine/UI default; when omitted, whatever the engine
|
|
838
|
+
* holds (module default or a prior `setFillingComplexity` call) stays put.
|
|
839
|
+
*/
|
|
840
|
+
fillingComplexity?: FillingComplexity;
|
|
841
|
+
/**
|
|
842
|
+
* Called after the user changes the filling-complexity level in the
|
|
843
|
+
* Settings modal: `(value: FillingComplexity) => void`. Not fired for
|
|
844
|
+
* prop-driven restores. The write-back counterpart of {@link fillingComplexity}.
|
|
845
|
+
*/
|
|
846
|
+
onFillingComplexityChange?: (value: FillingComplexity) => void;
|
|
847
|
+
/**
|
|
848
|
+
* Whether filling-defect findings are enabled on the Fillings card. Default
|
|
849
|
+
* `true`. Mirrors the `fillingDefectEnabled` engine flag (Settings →
|
|
850
|
+
* Fillings); same controlled/standalone contract as {@link fillingComplexity}.
|
|
851
|
+
*/
|
|
852
|
+
fillingDefectEnabled?: boolean;
|
|
853
|
+
/** See {@link onFillingComplexityChange} — the defect toggle's counterpart. */
|
|
854
|
+
onFillingDefectEnabledChange?: (enabled: boolean) => void;
|
|
855
|
+
/**
|
|
856
|
+
* Available filling materials as a `Record<material, boolean>` over
|
|
857
|
+
* `"amalgam" | "composite" | "gic" | "temporary"` (unknown keys are
|
|
858
|
+
* ignored). Default: all four available. Mirrors the `fillingMaterialAvail`
|
|
859
|
+
* engine map (Settings → Fillings). Hosts may pass an inline literal — the
|
|
860
|
+
* sync effect keys on a canonical serialized form, so re-renders with
|
|
861
|
+
* identical content do not re-fire.
|
|
862
|
+
*/
|
|
863
|
+
fillingMaterialAvailability?: Record<string, boolean>;
|
|
864
|
+
/**
|
|
865
|
+
* Called after the user toggles a material in the Settings modal:
|
|
866
|
+
* `(material: string, enabled: boolean) => void` — per-material, mirroring
|
|
867
|
+
* the engine's `setFillingMaterialAvailability` setter (no whole-record
|
|
868
|
+
* change ever happens). Not fired for prop-driven restores.
|
|
869
|
+
*/
|
|
870
|
+
onFillingMaterialAvailabilityChange?: (material: string, enabled: boolean) => void;
|
|
871
|
+
/**
|
|
872
|
+
* Whether fissure-sealing is offered on the Fillings card. Default `true`.
|
|
873
|
+
* Mirrors the `fissureSealingEnabled` engine flag (Settings → Fillings);
|
|
874
|
+
* same controlled/standalone contract as {@link fillingComplexity}.
|
|
875
|
+
*/
|
|
876
|
+
fissureSealingEnabled?: boolean;
|
|
877
|
+
/** See {@link onFillingComplexityChange} — the fissure-sealing toggle's counterpart. */
|
|
878
|
+
onFissureSealingEnabledChange?: (enabled: boolean) => void;
|
|
879
|
+
/** The composed UI (surfaces + shell layout). */
|
|
880
|
+
children?: ReactNode;
|
|
881
|
+
};
|
|
882
|
+
|
|
421
883
|
/** Structured, already-localized textual summary of the whole odontogram. */
|
|
422
884
|
export declare type OdontogramSummary = {
|
|
423
885
|
overview: string;
|
|
424
886
|
permanentList: string | null;
|
|
425
887
|
missingList: string | null;
|
|
426
|
-
/**
|
|
427
|
-
*
|
|
888
|
+
/** Grouped dentition table (the flat permanent/missing lists stay for
|
|
889
|
+
* back-compat). */
|
|
428
890
|
toothTable: OdontogramToothTable;
|
|
429
|
-
/**
|
|
891
|
+
/** True when any odontogram-markable periodontal finding
|
|
430
892
|
* (inflammation, mobility, calculus, …) exists — drives showing the perio
|
|
431
893
|
* summary line in the PDF's odontogram section even with no perio module. */
|
|
432
894
|
periodontalHasFindings: boolean;
|
|
@@ -438,13 +900,13 @@ export declare type OdontogramSummary = {
|
|
|
438
900
|
} | null;
|
|
439
901
|
periodontalTitle: string;
|
|
440
902
|
periodontalText: string;
|
|
441
|
-
/**
|
|
903
|
+
/** The status->plan diff (see {@link getPlanChanges}), verbatim.
|
|
442
904
|
* `[]` whenever the plan chart hasn't been initialized or plan === status —
|
|
443
905
|
* a distinct field, not a section, since it's a diff rather than a status
|
|
444
906
|
* list. The "What changes" box in App.tsx renders from this field only
|
|
445
907
|
* when it's non-empty. */
|
|
446
908
|
plannedChanges: PlanChange[];
|
|
447
|
-
/**
|
|
909
|
+
/** Per-tooth free-text notes — one "<tooth>: <note>" line per tooth
|
|
448
910
|
* that carries a note (gated on the notes-enabled setting, like the tooltip).
|
|
449
911
|
* `null` when no tooth has a note, so the panel/PDF omit the section entirely. */
|
|
450
912
|
individualNotes: {
|
|
@@ -522,6 +984,56 @@ declare interface OdontogramToothTable {
|
|
|
522
984
|
legend: string;
|
|
523
985
|
}
|
|
524
986
|
|
|
987
|
+
export declare function OdontogramTopbar(): JSX_2.Element;
|
|
988
|
+
|
|
989
|
+
/**
|
|
990
|
+
* Everything the surface components and shell-managed modals consume. Cross-cutting
|
|
991
|
+
* state read across ≥2 regions/modals lives here; strictly region-local state
|
|
992
|
+
* (the header dropdown open flags + outside-click effect) stays inside its surface.
|
|
993
|
+
*/
|
|
994
|
+
export declare type OdontogramUiContextValue = {
|
|
995
|
+
t: TranslateFn;
|
|
996
|
+
lang: Language;
|
|
997
|
+
setLang: (lang: Language) => void;
|
|
998
|
+
isDark: boolean;
|
|
999
|
+
toggleDark: () => void;
|
|
1000
|
+
currentNumbering: NumberingSystem;
|
|
1001
|
+
setNumbering: (next: NumberingSystem) => void;
|
|
1002
|
+
viewMode: PerioViewMode;
|
|
1003
|
+
activeView: "odontogram" | "dentalChart";
|
|
1004
|
+
setActiveView: (view: "odontogram" | "dentalChart") => void;
|
|
1005
|
+
isPerioView: boolean;
|
|
1006
|
+
perioChartAvailable: boolean;
|
|
1007
|
+
perioOpen: boolean;
|
|
1008
|
+
confirmOpen: boolean;
|
|
1009
|
+
hasPerio: boolean;
|
|
1010
|
+
exportPngOn: boolean;
|
|
1011
|
+
exportJpgOn: boolean;
|
|
1012
|
+
exportSvgOn: boolean;
|
|
1013
|
+
exportPdfOn: boolean;
|
|
1014
|
+
importStatusOn: boolean;
|
|
1015
|
+
importFhirOn: boolean;
|
|
1016
|
+
summary: OdontogramSummary | null;
|
|
1017
|
+
toothInfoOn: boolean;
|
|
1018
|
+
screenSpacing: ScreenToothSpacing;
|
|
1019
|
+
screenNumberSize: ScreenToothNumberSize;
|
|
1020
|
+
selectionColor: string;
|
|
1021
|
+
selectionBorderStyle: SelectionBorderStyle;
|
|
1022
|
+
toothAnatomy: ToothAnatomy;
|
|
1023
|
+
planModeAvailable: boolean;
|
|
1024
|
+
showStatusCard: boolean;
|
|
1025
|
+
showOrthoCard: boolean;
|
|
1026
|
+
settingsState: SettingsState;
|
|
1027
|
+
settingsOpen: boolean;
|
|
1028
|
+
setSettingsOpen: (open: boolean) => void;
|
|
1029
|
+
pdfOpen: boolean;
|
|
1030
|
+
setPdfOpen: (open: boolean) => void;
|
|
1031
|
+
creditsOpen: boolean;
|
|
1032
|
+
setCreditsOpen: (open: boolean) => void;
|
|
1033
|
+
caseDxOpen: boolean;
|
|
1034
|
+
setCaseDxOpen: (open: boolean) => void;
|
|
1035
|
+
};
|
|
1036
|
+
|
|
525
1037
|
/**
|
|
526
1038
|
* Subscribe to odontogram state changes. The callback runs after any tooth
|
|
527
1039
|
* state edit, the edentulous toggle, or an import.
|
|
@@ -531,33 +1043,50 @@ declare interface OdontogramToothTable {
|
|
|
531
1043
|
*/
|
|
532
1044
|
export declare function onStateChange(cb: () => void): () => void;
|
|
533
1045
|
|
|
1046
|
+
/** Public entry point for the declarative `CariesCard`'s per-surface `.surf-depth`
|
|
1047
|
+
* indicator click: opens the contextual severity popup for `surface`, anchored
|
|
1048
|
+
* to `anchor`, on the currently-active tooth — the exact call `wireControls()`
|
|
1049
|
+
* made (`showCariesDepthPopup(surface, ind, activeTooth)`). Kept as a thin
|
|
1050
|
+
* wrapper so the popup overlay itself stays imperative (module-private state:
|
|
1051
|
+
* `activeTooth` / `applyToSelected`). */
|
|
1052
|
+
export declare function openCariesDepthPopup(surface: string, anchor: HTMLElement): void;
|
|
1053
|
+
|
|
1054
|
+
/** Public entry point for the declarative `FillingsCard`'s per-surface LEFT-side
|
|
1055
|
+
* `.surf-defect` indicator click: opens the contextual filling-defect popup for
|
|
1056
|
+
* `surface`, anchored to `anchor`, on the currently-active tooth — the exact
|
|
1057
|
+
* call `wireControls()` made (`showFillingDefectPopup(surface, ind,
|
|
1058
|
+
* activeTooth)`). Thin wrapper so the popup itself stays imperative. */
|
|
1059
|
+
export declare function openFillingDefectPopup(surface: string, anchor: HTMLElement): void;
|
|
1060
|
+
|
|
534
1061
|
/** Open the perio-chart overlay. No-op (still notifies) if already open. */
|
|
535
1062
|
export declare function openPerioOverlay(): void;
|
|
536
1063
|
|
|
1064
|
+
export declare function OrthodonticsCard(): JSX_2.Element;
|
|
1065
|
+
|
|
1066
|
+
/** Parameter map for template placeholders (`{{key}}`). */
|
|
1067
|
+
declare type Params = Record<string, string | number>;
|
|
1068
|
+
|
|
537
1069
|
declare type PdfBorderThickness = "thin" | "medium" | "thick";
|
|
538
1070
|
|
|
539
|
-
/**
|
|
540
|
-
*
|
|
1071
|
+
/** Selectable report colour themes — the default is "blue"; the other three are
|
|
1072
|
+
* distinct but equally calm/medical. */
|
|
541
1073
|
declare type PdfColorTheme = "blue" | "teal" | "amber" | "slate";
|
|
542
1074
|
|
|
543
1075
|
declare type PdfDateFormat = "iso" | "dmy" | "mdy";
|
|
544
1076
|
|
|
545
|
-
/**
|
|
546
|
-
*
|
|
547
|
-
*
|
|
548
|
-
*
|
|
1077
|
+
/** Which PDF sections the user opted into. The perio sections are additionally
|
|
1078
|
+
* auto-skipped whenever `data.hasPerio` is false (see {@link assemblePdf}),
|
|
1079
|
+
* regardless of these flags — a blank perio chart never gets an empty
|
|
1080
|
+
* "Periodontal status" page. */
|
|
549
1081
|
declare interface PdfExportOptions {
|
|
550
1082
|
patientData: boolean;
|
|
551
|
-
/**
|
|
552
|
-
*
|
|
553
|
-
* selectable in the export dialog. */
|
|
1083
|
+
/** The odontogram chart IMAGE — selectable independently of its prose
|
|
1084
|
+
* description in the export dialog. */
|
|
554
1085
|
odontogramChart: boolean;
|
|
555
|
-
/**
|
|
556
|
-
* chart image under the old `odontogram` flag). */
|
|
1086
|
+
/** The whole-mouth odontogram summary PROSE. */
|
|
557
1087
|
odontogramDescription: boolean;
|
|
558
|
-
/**
|
|
559
|
-
*
|
|
560
|
-
* flag. */
|
|
1088
|
+
/** The per-tooth "Individual notes" section — omitted whenever no tooth
|
|
1089
|
+
* carries a note (`data.individualNotes` empty), regardless of this flag. */
|
|
561
1090
|
individualNotes: boolean;
|
|
562
1091
|
perioStatus: boolean;
|
|
563
1092
|
perioDescription: boolean;
|
|
@@ -626,24 +1155,19 @@ declare type PdfToothNumberSize = "small" | "normal" | "xlarge";
|
|
|
626
1155
|
declare type PdfToothSpacing = "wide" | "medium" | "close";
|
|
627
1156
|
|
|
628
1157
|
/**
|
|
629
|
-
* Full-
|
|
630
|
-
*
|
|
631
|
-
*
|
|
632
|
-
*
|
|
633
|
-
* (`
|
|
634
|
-
* `
|
|
635
|
-
* `change` listeners are enough here.
|
|
636
|
-
*
|
|
637
|
-
* The 32-tooth x 6-site grid (~450+ interactive cells) is built with plain
|
|
638
|
-
* DOM (`buildArch`), NOT JSX/React state, and updated via targeted
|
|
639
|
-
* `syncToothCells` calls rather than a full React re-render (R3 perf) — see
|
|
640
|
-
* `syncOneTooth`/`fullResync` below. Only the compact summary bar is
|
|
641
|
-
* React-controlled (`useState`), since re-rendering ~4 numbers on every edit
|
|
642
|
-
* is cheap. `suppressResyncRef` prevents the grid's own edits from ALSO
|
|
1158
|
+
* Full-mouth perio-chart. The 32-tooth x 6-site grid (~450+ interactive
|
|
1159
|
+
* cells) is built with plain DOM (`buildArch`), NOT JSX/React state, and
|
|
1160
|
+
* updated via targeted `syncToothCells` calls rather than a full React
|
|
1161
|
+
* re-render — see `syncOneTooth`/`fullResync` below. Only the compact summary
|
|
1162
|
+
* bar is React-controlled (`useState`), since re-rendering ~4 numbers on every
|
|
1163
|
+
* edit is cheap. `suppressResyncRef` prevents the grid's own edits from ALSO
|
|
643
1164
|
* triggering a redundant full resync via the `onStateChange` subscription
|
|
644
|
-
* (setPerioSite/setToothMobility both fire it synchronously) — external
|
|
645
|
-
*
|
|
646
|
-
*
|
|
1165
|
+
* (setPerioSite/setToothMobility both fire it synchronously) — external edits
|
|
1166
|
+
* (dual-state chart-mode switch, or another consumer editing perio data while
|
|
1167
|
+
* the overlay is open) still trigger the full resync normally. All writes go
|
|
1168
|
+
* through the data core (`setPerioSite`/`getToothPerio`/`getToothCal`/
|
|
1169
|
+
* `getPerioSummary`/`getPerioChart`); keyboard auto-advance between cells is
|
|
1170
|
+
* handled by `handleGridKeyDown`.
|
|
647
1171
|
*
|
|
648
1172
|
* Layers OVER the odontogram, which it never unmounts: `position: fixed`,
|
|
649
1173
|
* full-screen, high z-index (`.perio-overlay` in `index.css`). Mirrors
|
|
@@ -652,17 +1176,15 @@ declare type PdfToothSpacing = "wide" | "medium" | "close";
|
|
|
652
1176
|
* single element (`#perioOverlay` itself is the dialog; there is no separate
|
|
653
1177
|
* backdrop element, unlike `SettingsModal`).
|
|
654
1178
|
*
|
|
655
|
-
*
|
|
656
|
-
* optional `inline` prop selects a second chrome for the SAME body (grid +
|
|
1179
|
+
* The optional `inline` prop selects a second chrome for the SAME body (grid +
|
|
657
1180
|
* summary bar) — a plain panel (`#perioInlinePanel`) meant to fill the chart
|
|
658
1181
|
* area in place of the hidden-but-mounted odontogram, instead of the
|
|
659
1182
|
* fixed-position modal dialog. `open`/`onClose` are the MODAL chrome's
|
|
660
1183
|
* contract and are ignored when `inline` is true (the caller controls
|
|
661
|
-
* mount/unmount of an inline instance directly via conditional rendering
|
|
662
|
-
*
|
|
663
|
-
*
|
|
664
|
-
*
|
|
665
|
-
* to the inline chrome at all.
|
|
1184
|
+
* mount/unmount of an inline instance directly via conditional rendering) —
|
|
1185
|
+
* there is nothing to "close" in an embedded panel. Dialog-only concerns
|
|
1186
|
+
* (focus trap/restore, Esc-to-close, backdrop click, `role="dialog"`) do not
|
|
1187
|
+
* apply to the inline chrome at all.
|
|
666
1188
|
*/
|
|
667
1189
|
export declare function PerioChart({ open, onClose, inline, }: {
|
|
668
1190
|
open?: boolean;
|
|
@@ -678,6 +1200,15 @@ export declare type PerioRowId = "plaque" | "bop" | "cal" | "gm" | "pd" | "furca
|
|
|
678
1200
|
|
|
679
1201
|
export declare type PerioViewMode = "toggle" | "popup";
|
|
680
1202
|
|
|
1203
|
+
export declare type PersistenceOptions = {
|
|
1204
|
+
/** localStorage key. Default: "react-advanced-odontogram". */
|
|
1205
|
+
key?: string;
|
|
1206
|
+
/** Persist the plan chart too (payload's `plan` field). Default: false. */
|
|
1207
|
+
includePlan?: boolean;
|
|
1208
|
+
/** Called on any storage/parse error instead of console.warn. */
|
|
1209
|
+
onError?: (err: Error) => void;
|
|
1210
|
+
};
|
|
1211
|
+
|
|
681
1212
|
declare type PlanChange = {
|
|
682
1213
|
toothNo: number;
|
|
683
1214
|
axis: string;
|
|
@@ -700,6 +1231,15 @@ export declare type PulpDetailLevel = "simple" | "aae" | "latin";
|
|
|
700
1231
|
|
|
701
1232
|
export declare type RadiographicDepthMode = "off" | "threeLevel" | "detailed";
|
|
702
1233
|
|
|
1234
|
+
/**
|
|
1235
|
+
* Rebuild the SVG tooth grid after the chart column remounts (composable-UI
|
|
1236
|
+
* Tier 2). Preserves the current selection/active tooth across buildGrid()'s
|
|
1237
|
+
* internal reset, clears+rebuilds the four grid element maps, and bumps
|
|
1238
|
+
* `initToken` so any in-flight/toggle-spam build supersedes cleanly. No-op
|
|
1239
|
+
* before init or if a newer build/teardown supersedes this one mid-await.
|
|
1240
|
+
*/
|
|
1241
|
+
export declare function rebuildGrid(): Promise<void>;
|
|
1242
|
+
|
|
703
1243
|
/**
|
|
704
1244
|
* Register one or more custom SVG plugins. Plugins can inject visual overlays
|
|
705
1245
|
* into the tooth SVG and maintain per-tooth custom state included in export/import.
|
|
@@ -708,12 +1248,108 @@ export declare type RadiographicDepthMode = "off" | "threeLevel" | "detailed";
|
|
|
708
1248
|
*/
|
|
709
1249
|
export declare function registerPlugins(plugins: OdontogramPlugin[]): void;
|
|
710
1250
|
|
|
1251
|
+
/** Remove a tooth-level diagnosis from the current selection: clears the
|
|
1252
|
+
* underlying chart axis (so the glyph disappears too, through the repainting
|
|
1253
|
+
* apply path) AND drops any coded-layer override (add/suppress) for the key.
|
|
1254
|
+
* The card's delete (×) uses this — the full inverse of
|
|
1255
|
+
* {@link addDiagnosisToSelection}, extended to `caries` (clears the surfaces)
|
|
1256
|
+
* so every listed diagnosis is fully removable. Prototype-safe key guard. */
|
|
1257
|
+
export declare function removeDiagnosisFromSelection(key: string): void;
|
|
1258
|
+
|
|
1259
|
+
/** Reset the WHOLE mouth to a blank slate — the exact closure the imperative
|
|
1260
|
+
* `#btnResetAll` handler used, now called directly from the declarative Statuses
|
|
1261
|
+
* card's onClick. Clears the edentulous flag + case-level metadata, resets every
|
|
1262
|
+
* tooth to `defaultState()`, re-syncs the active tooth's controls, and notifies
|
|
1263
|
+
* once at the end so the mounted case-metadata/Statuses subscribers re-read the
|
|
1264
|
+
* cleared state. */
|
|
1265
|
+
export declare function resetMouth(): void;
|
|
1266
|
+
|
|
1267
|
+
/** Reset the whole current selection to `defaultState()` — the exact closure the
|
|
1268
|
+
* imperative `#btnResetTooth` handler used, now called from the declarative card
|
|
1269
|
+
* title button's onClick. */
|
|
1270
|
+
export declare function resetTooth(): void;
|
|
1271
|
+
|
|
1272
|
+
/**
|
|
1273
|
+
* Re-run control wiring after a controls surface remounts (composable-UI Tier 2).
|
|
1274
|
+
* `wireControls()` is idempotent per-element (bindOnce + populated-container
|
|
1275
|
+
* guards), so this wires ONLY the freshly-mounted nodes and leaves still-mounted
|
|
1276
|
+
* ones untouched; the trailing syncControlsFromState() re-derives the active
|
|
1277
|
+
* tooth's per-tooth option lists/values on the (possibly new) select nodes.
|
|
1278
|
+
* No-op before init (the provider's own init effect does the first wiring).
|
|
1279
|
+
*/
|
|
1280
|
+
export declare function rewireControls(): void;
|
|
1281
|
+
|
|
711
1282
|
export declare type RootCariesMode = "simple" | "severity";
|
|
712
1283
|
|
|
1284
|
+
/** Root-caries options at a given mode (defaults to the module setting).
|
|
1285
|
+
* simple -> none / present (present writes the canonical "active-cavitated"
|
|
1286
|
+
* enum — the most-severe value, so simple-mode "present" renders at full
|
|
1287
|
+
* opacity); severity -> the full rootCaries enum. Pure. */
|
|
1288
|
+
export declare function rootCariesOptions(mode?: RootCariesMode): {
|
|
1289
|
+
value: string;
|
|
1290
|
+
label: string;
|
|
1291
|
+
}[];
|
|
1292
|
+
|
|
1293
|
+
export declare function RootPeriodontiumCard(): JSX_2.Element;
|
|
1294
|
+
|
|
1295
|
+
export declare type RootPerioOptGroup = {
|
|
1296
|
+
label: string;
|
|
1297
|
+
options: RootPerioOption[];
|
|
1298
|
+
};
|
|
1299
|
+
|
|
1300
|
+
export declare type RootPerioOption = {
|
|
1301
|
+
value: string;
|
|
1302
|
+
label: string;
|
|
1303
|
+
};
|
|
1304
|
+
|
|
1305
|
+
declare type ScreenToothNumberSize = "small" | "normal" | "xlarge";
|
|
1306
|
+
|
|
1307
|
+
/**
|
|
1308
|
+
* The full set of live setting values + change handlers the modal drives.
|
|
1309
|
+
*
|
|
1310
|
+
* Every field maps 1:1 to an existing App-level piece of state / module
|
|
1311
|
+
* accessor — the modal never owns behavior, it only surfaces the controls.
|
|
1312
|
+
* New settings are added here and wired into a tab's `render()`.
|
|
1313
|
+
*/
|
|
1314
|
+
/** On-screen odontogram layout controls (distinct from the PDF/export
|
|
1315
|
+
* equivalents). Spacing = inter-tooth gap in the live grid; number size = the
|
|
1316
|
+
* tooth-number font size. Session-only, pure CSS via data-attributes on the
|
|
1317
|
+
* grid. */
|
|
1318
|
+
declare type ScreenToothSpacing = "wide" | "normal" | "close";
|
|
1319
|
+
|
|
713
1320
|
export declare type SecondaryCariesMode = "simple" | "standard" | "full";
|
|
714
1321
|
|
|
1322
|
+
/** Selection-ring border style (default dashed). */
|
|
1323
|
+
declare type SelectionBorderStyle = "solid" | "dashed" | "dotted";
|
|
1324
|
+
|
|
1325
|
+
/** Apical (AAE) diagnosis on the current selection — clears the periapical
|
|
1326
|
+
* lesion subtype unless the diagnosis is (a)symptomatic apical periodontitis. */
|
|
1327
|
+
export declare function setApicalDxForSelection(value: string): void;
|
|
1328
|
+
|
|
1329
|
+
/** Bridge-abutment toggle on the current selection. */
|
|
1330
|
+
export declare function setBridgePillarForSelection(on: boolean): void;
|
|
1331
|
+
|
|
1332
|
+
/** Broken distal corner toggle on the current selection. */
|
|
1333
|
+
export declare function setBrokenDistalForSelection(on: boolean): void;
|
|
1334
|
+
|
|
1335
|
+
/** Broken incisal corner toggle on the current selection. */
|
|
1336
|
+
export declare function setBrokenIncisalForSelection(on: boolean): void;
|
|
1337
|
+
|
|
1338
|
+
/** Broken mesial corner toggle on the current selection. */
|
|
1339
|
+
export declare function setBrokenMesialForSelection(on: boolean): void;
|
|
1340
|
+
|
|
1341
|
+
/** Calculus toggle on the current selection. */
|
|
1342
|
+
export declare function setCalculusForSelection(on: boolean): void;
|
|
1343
|
+
|
|
1344
|
+
/** Set the default (active) caries depth for newly-tapped surfaces. */
|
|
1345
|
+
export declare function setCariesActiveDepthForSelection(value: number): void;
|
|
1346
|
+
|
|
715
1347
|
export declare function setCariesDepthEnabled(value: boolean): void;
|
|
716
1348
|
|
|
1349
|
+
/** Toggle one caries surface (or the subcrown) on the current selection —
|
|
1350
|
+
* wraps the exact `cariesOnToggle` closure `wireControls()` bound. */
|
|
1351
|
+
export declare function setCariesSurfaceForSelection(id: string, on: boolean): void;
|
|
1352
|
+
|
|
717
1353
|
/**
|
|
718
1354
|
* Switch the active chart between "status" (current findings) and "plan"
|
|
719
1355
|
* (proposed treatment). The first time "plan" is entered, it is deep-cloned
|
|
@@ -728,8 +1364,79 @@ export declare function setCariesDepthEnabled(value: boolean): void;
|
|
|
728
1364
|
*/
|
|
729
1365
|
export declare function setChartMode(mode: ChartMode): void;
|
|
730
1366
|
|
|
1367
|
+
/** Distal contact-loss toggle on the current selection. */
|
|
1368
|
+
export declare function setContactDistalForSelection(on: boolean): void;
|
|
1369
|
+
|
|
1370
|
+
/** Mesial contact-loss toggle on the current selection. */
|
|
1371
|
+
export declare function setContactMesialForSelection(on: boolean): void;
|
|
1372
|
+
|
|
1373
|
+
/** Crown marginal-leakage toggle on the current selection. */
|
|
1374
|
+
export declare function setCrownLeakageForSelection(on: boolean): void;
|
|
1375
|
+
|
|
1376
|
+
/** Crown-needed toggle on the current selection. */
|
|
1377
|
+
export declare function setCrownNeededForSelection(on: boolean): void;
|
|
1378
|
+
|
|
1379
|
+
/** Crown-replacement toggle on the current selection. */
|
|
1380
|
+
export declare function setCrownReplaceForSelection(on: boolean): void;
|
|
1381
|
+
|
|
1382
|
+
export declare function setDiagnosisCodingPack(id: string): void;
|
|
1383
|
+
|
|
731
1384
|
export declare function setDiscolorationDetailLevel(value: ToothDetailLevel): void;
|
|
732
1385
|
|
|
1386
|
+
/** Discoloration cause on the current selection (complex-mode select). */
|
|
1387
|
+
export declare function setDiscolorationForSelection(value: string): void;
|
|
1388
|
+
|
|
1389
|
+
/** Discoloration simple-mode toggle (other / none) on the selection. */
|
|
1390
|
+
export declare function setDiscolorationToggleForSelection(on: boolean): void;
|
|
1391
|
+
|
|
1392
|
+
/** Add/suppress/clear one coded diagnosis on the current selection —
|
|
1393
|
+
* validates `key` against {@link TOOTH_LEVEL_DX_KEYS} and `mode` against
|
|
1394
|
+
* {@link VALID_DX_OVERRIDE_VALUE} (or `null`, which clears any existing
|
|
1395
|
+
* override for `key`); anything else is a silent no-op. Routed through
|
|
1396
|
+
* {@link gateToothEditBatch} directly (not `applyToSelected`) since
|
|
1397
|
+
* `dxOverrides` has no SVG/DOM side effect to re-render per tooth. */
|
|
1398
|
+
export declare function setDxOverrideForSelection(key: string, mode: "add" | "suppress" | null): void;
|
|
1399
|
+
|
|
1400
|
+
export declare function setEdentulous(on: Any): void;
|
|
1401
|
+
|
|
1402
|
+
/** Apicoectomy (resected tooth) toggle on the current selection. */
|
|
1403
|
+
export declare function setEndoResectionForSelection(on: boolean): void;
|
|
1404
|
+
|
|
1405
|
+
/** Planned-extraction toggle on the current selection. */
|
|
1406
|
+
export declare function setExtractionPlanForSelection(on: boolean): void;
|
|
1407
|
+
|
|
1408
|
+
/** Extraction-wound toggle on the current selection. */
|
|
1409
|
+
export declare function setExtractionWoundForSelection(on: boolean): void;
|
|
1410
|
+
|
|
1411
|
+
export declare function setFillingComplexity(v: "complex" | "simple"): void;
|
|
1412
|
+
|
|
1413
|
+
export declare function setFillingDefectEnabled(v: boolean): void;
|
|
1414
|
+
|
|
1415
|
+
export declare function setFillingMaterialAvailability(material: string, v: boolean): void;
|
|
1416
|
+
|
|
1417
|
+
/** Set the active filling material on the current selection — wraps the exact
|
|
1418
|
+
* `#fillingSelect` closure `wireControls()` bound (clearing "none" removes any
|
|
1419
|
+
* orphaned per-surface fillings). */
|
|
1420
|
+
export declare function setFillingMaterialForSelection(mat: string): void;
|
|
1421
|
+
|
|
1422
|
+
/** Simple-mode filling-defect select — applies a defect to EVERY filled surface.
|
|
1423
|
+
* Wraps the `#fillingSimpleDefectSelect` closure. */
|
|
1424
|
+
export declare function setFillingSimpleDefectForSelection(value: string): void;
|
|
1425
|
+
|
|
1426
|
+
/** Simple-mode filled/not-filled toggle — applies the current material to ALL
|
|
1427
|
+
* surfaces (or clears them). Wraps the `#fillingSimpleToggle` closure. */
|
|
1428
|
+
export declare function setFillingSimpleToggleForSelection(on: boolean): void;
|
|
1429
|
+
|
|
1430
|
+
/** Toggle one filling surface on the current selection — wraps the exact
|
|
1431
|
+
* `buildSurfaceCross($("#fillingSurfaceChecks"), …)` closure. */
|
|
1432
|
+
export declare function setFillingSurfaceForSelection(surf: string, on: boolean): void;
|
|
1433
|
+
|
|
1434
|
+
export declare function setFissureSealingEnabled(v: boolean): void;
|
|
1435
|
+
|
|
1436
|
+
/** Fissure-sealing toggle on the current selection. Wraps the `#fissureSealing`
|
|
1437
|
+
* closure. */
|
|
1438
|
+
export declare function setFissureSealingForSelection(on: boolean): void;
|
|
1439
|
+
|
|
733
1440
|
/** Toggle visibility of the healthy-pulp layer on all teeth. */
|
|
734
1441
|
export declare function setHealthyPulpVisible(on: Any): void;
|
|
735
1442
|
|
|
@@ -738,6 +1445,16 @@ export declare function setIcdasEnabled(value: boolean): void;
|
|
|
738
1445
|
/** Set which parser the next file import uses. Defaults back to "status" after each import. */
|
|
739
1446
|
export declare function setImportFormat(format: "status" | "fhir"): void;
|
|
740
1447
|
|
|
1448
|
+
/** Closed-gap toggle on the current selection. */
|
|
1449
|
+
export declare function setMissingClosedForSelection(on: boolean): void;
|
|
1450
|
+
|
|
1451
|
+
/** Tooth mobility grade on the current selection. */
|
|
1452
|
+
export declare function setMobilityForSelection(value: string): void;
|
|
1453
|
+
|
|
1454
|
+
/** Toggle one `#modsChecks` modifier (parodontal / inflammation) on the current
|
|
1455
|
+
* selection — wraps the exact set add/delete closure `wireControls()` bound. */
|
|
1456
|
+
export declare function setModForSelection(id: string, on: boolean): void;
|
|
1457
|
+
|
|
741
1458
|
/**
|
|
742
1459
|
* Enable or disable per-tooth notes. When enabled, double-clicking a tooth
|
|
743
1460
|
* opens a note editor popover, and notes are shown in hover tooltips with
|
|
@@ -756,15 +1473,32 @@ export declare function setNumberingSystem(system: NumberingSystem): void;
|
|
|
756
1473
|
/** Toggle visibility of occlusal-view tiles (premolars and molars). */
|
|
757
1474
|
export declare function setOcclusalVisible(on: Any): void;
|
|
758
1475
|
|
|
1476
|
+
export declare function setOrthoApplianceForSelection(value: string): void;
|
|
1477
|
+
|
|
1478
|
+
export declare function setOrthoDriftForSelection(value: string): void;
|
|
1479
|
+
|
|
1480
|
+
export declare function setOrthoRotationForSelection(on: boolean): void;
|
|
1481
|
+
|
|
1482
|
+
export declare function setOrthoVerticalForSelection(value: string): void;
|
|
1483
|
+
|
|
1484
|
+
/** Parapulpal pin toggle on the current selection. */
|
|
1485
|
+
export declare function setParapulpalPinForSelection(on: boolean): void;
|
|
1486
|
+
|
|
759
1487
|
export declare function setPdfSettings(patch: Partial<PdfSettings>): void;
|
|
760
1488
|
|
|
761
|
-
/**
|
|
1489
|
+
/** Periapical lesion subtype on the current selection. */
|
|
1490
|
+
export declare function setPeriapicalTypeForSelection(value: string): void;
|
|
1491
|
+
|
|
1492
|
+
/** Peri-implant status on the current selection. */
|
|
1493
|
+
export declare function setPeriImplantForSelection(value: string): void;
|
|
1494
|
+
|
|
1495
|
+
/** Switch the perio index-name display mode. No-op (does not notify) if unchanged. */
|
|
762
1496
|
export declare function setPerioIndexNameMode(mode: PerioIndexNameMode): void;
|
|
763
1497
|
|
|
764
|
-
/** Show/hide one perio-chart index row. No-op (
|
|
1498
|
+
/** Show/hide one perio-chart index row. No-op (does not notify) if unchanged. */
|
|
765
1499
|
export declare function setPerioRowVisibility(id: PerioRowId, visible: boolean): void;
|
|
766
1500
|
|
|
767
|
-
/** Switch the perio-chart housing mode. No-op (
|
|
1501
|
+
/** Switch the perio-chart housing mode. No-op (does not notify) if unchanged. */
|
|
768
1502
|
export declare function setPerioViewMode(mode: PerioViewMode): void;
|
|
769
1503
|
|
|
770
1504
|
/**
|
|
@@ -789,6 +1523,11 @@ export declare function setPluginState(toothNo: number, pluginId: string, value:
|
|
|
789
1523
|
|
|
790
1524
|
export declare function setPulpDetailLevel(value: PulpDetailLevel): void;
|
|
791
1525
|
|
|
1526
|
+
/** Merged pulp/endo selection on the current selection — wraps the exact
|
|
1527
|
+
* `pulpEndoOnSelect` closure `wireControls()` bound (incl. the endo↔pulpDx
|
|
1528
|
+
* mutual-exclusion normalization). */
|
|
1529
|
+
export declare function setPulpEndoForSelection(value: string): void;
|
|
1530
|
+
|
|
792
1531
|
export declare function setRadiographicDepthMode(value: RadiographicDepthMode): void;
|
|
793
1532
|
|
|
794
1533
|
/**
|
|
@@ -800,6 +1539,19 @@ export declare function setRadiographicDepthMode(value: RadiographicDepthMode):
|
|
|
800
1539
|
*/
|
|
801
1540
|
export declare function setReadOnly(value: boolean): void;
|
|
802
1541
|
|
|
1542
|
+
/** Root resorption type on the current selection. */
|
|
1543
|
+
export declare function setResorptionForSelection(value: string): void;
|
|
1544
|
+
|
|
1545
|
+
/** Combined restoration dropdown on the current selection — wraps the exact
|
|
1546
|
+
* `#restorationSelect` closure (`applyRestorationSelection` decode of
|
|
1547
|
+
* `${type}|${material}` / `prosthesis|<value>` + the trailing
|
|
1548
|
+
* `setEdentulous(false)`). */
|
|
1549
|
+
export declare function setRestorationForSelection(value: string): void;
|
|
1550
|
+
|
|
1551
|
+
/** Set the per-tooth root-caries value (the picker already emits the canonical
|
|
1552
|
+
* enum value; simple-mode "present" maps to "active-cavitated"). */
|
|
1553
|
+
export declare function setRootCariesForSelection(value: string): void;
|
|
1554
|
+
|
|
803
1555
|
export declare function setRootCariesMode(value: RootCariesMode): void;
|
|
804
1556
|
|
|
805
1557
|
export declare function setSecondaryCariesMode(value: SecondaryCariesMode): void;
|
|
@@ -807,30 +1559,229 @@ export declare function setSecondaryCariesMode(value: SecondaryCariesMode): void
|
|
|
807
1559
|
/** Toggle visibility of the bone/gum base layer on all teeth. */
|
|
808
1560
|
export declare function setShowBase(on: Any): void;
|
|
809
1561
|
|
|
1562
|
+
export declare function setSnomedEnabled(v: boolean): void;
|
|
1563
|
+
|
|
1564
|
+
/** Substrate (natural / radix / broken / crown-prep) on the current selection —
|
|
1565
|
+
* wraps the exact `#substrateSelect` closure (broken-part + crown-needed clears
|
|
1566
|
+
* and the trailing `setEdentulous(false)`). */
|
|
1567
|
+
export declare function setSubstrateForSelection(value: string): void;
|
|
1568
|
+
|
|
810
1569
|
export declare function setSurfaceNotation(value: SurfaceNotation): void;
|
|
811
1570
|
|
|
1571
|
+
declare type SettingsState = {
|
|
1572
|
+
numbering: NumberingSystem;
|
|
1573
|
+
onNumbering: (value: NumberingSystem) => void;
|
|
1574
|
+
language: Language;
|
|
1575
|
+
onLanguage: (value: Language) => void;
|
|
1576
|
+
isDark: boolean;
|
|
1577
|
+
onToggleDark: () => void;
|
|
1578
|
+
toothInfo: boolean;
|
|
1579
|
+
onToothInfo: (value: boolean) => void;
|
|
1580
|
+
exportPng: boolean;
|
|
1581
|
+
onExportPng: (value: boolean) => void;
|
|
1582
|
+
exportJpg: boolean;
|
|
1583
|
+
onExportJpg: (value: boolean) => void;
|
|
1584
|
+
exportSvg: boolean;
|
|
1585
|
+
onExportSvg: (value: boolean) => void;
|
|
1586
|
+
exportPdf: boolean;
|
|
1587
|
+
onExportPdf: (value: boolean) => void;
|
|
1588
|
+
importStatus: boolean;
|
|
1589
|
+
onImportStatus: (value: boolean) => void;
|
|
1590
|
+
importFhir: boolean;
|
|
1591
|
+
onImportFhir: (value: boolean) => void;
|
|
1592
|
+
codingPack: string;
|
|
1593
|
+
onDiagnosisCodingPack: (value: string) => void;
|
|
1594
|
+
snomedEnabled: boolean;
|
|
1595
|
+
onSnomedEnabled: (value: boolean) => void;
|
|
1596
|
+
secondaryCariesMode: SecondaryCariesMode;
|
|
1597
|
+
onSecondaryCariesMode: (value: SecondaryCariesMode) => void;
|
|
1598
|
+
icdas: boolean;
|
|
1599
|
+
onIcdas: (value: boolean) => void;
|
|
1600
|
+
cariesDepth: boolean;
|
|
1601
|
+
onCariesDepth: (value: boolean) => void;
|
|
1602
|
+
rootCariesMode: RootCariesMode;
|
|
1603
|
+
onRootCariesMode: (value: RootCariesMode) => void;
|
|
1604
|
+
radiographicDepthMode: RadiographicDepthMode;
|
|
1605
|
+
onRadiographicDepthMode: (value: RadiographicDepthMode) => void;
|
|
1606
|
+
selectionColor: string;
|
|
1607
|
+
onSelectionColor: (value: string) => void;
|
|
1608
|
+
selectionBorderStyle: SelectionBorderStyle;
|
|
1609
|
+
onSelectionBorderStyle: (value: SelectionBorderStyle) => void;
|
|
1610
|
+
pulpLevel: PulpDetailLevel;
|
|
1611
|
+
onPulpLevel: (value: PulpDetailLevel) => void;
|
|
1612
|
+
wearDetailLevel: ToothDetailLevel;
|
|
1613
|
+
onWearDetailLevel: (value: ToothDetailLevel) => void;
|
|
1614
|
+
discolorationDetailLevel: ToothDetailLevel;
|
|
1615
|
+
onDiscolorationDetailLevel: (value: ToothDetailLevel) => void;
|
|
1616
|
+
surfaceNotation: SurfaceNotation;
|
|
1617
|
+
onSurfaceNotation: (value: SurfaceNotation) => void;
|
|
1618
|
+
notes: boolean;
|
|
1619
|
+
onNotes: (value: boolean) => void;
|
|
1620
|
+
planModeAvailable: boolean;
|
|
1621
|
+
onPlanModeAvailable: (value: boolean) => void;
|
|
1622
|
+
screenToothSpacing: ScreenToothSpacing;
|
|
1623
|
+
onScreenToothSpacing: (value: ScreenToothSpacing) => void;
|
|
1624
|
+
screenToothNumberSize: ScreenToothNumberSize;
|
|
1625
|
+
onScreenToothNumberSize: (value: ScreenToothNumberSize) => void;
|
|
1626
|
+
toothAnatomy: ToothAnatomy;
|
|
1627
|
+
onToothAnatomy: (value: ToothAnatomy) => void;
|
|
1628
|
+
showStatusCard: boolean;
|
|
1629
|
+
onShowStatusCard: (value: boolean) => void;
|
|
1630
|
+
showOrthoCard: boolean;
|
|
1631
|
+
onShowOrthoCard: (value: boolean) => void;
|
|
1632
|
+
perioChartAvailable: boolean;
|
|
1633
|
+
onPerioChartAvailable: (value: boolean) => void;
|
|
1634
|
+
perioViewMode: PerioViewMode;
|
|
1635
|
+
onPerioViewMode: (value: PerioViewMode) => void;
|
|
1636
|
+
perioRowVisibility: Record<PerioRowId, boolean>;
|
|
1637
|
+
onPerioRowVisibility: (id: PerioRowId, visible: boolean) => void;
|
|
1638
|
+
perioIndexNameMode: PerioIndexNameMode;
|
|
1639
|
+
onPerioIndexNameMode: (value: PerioIndexNameMode) => void;
|
|
1640
|
+
fillingDefectEnabled: boolean;
|
|
1641
|
+
onFillingDefectEnabled: (value: boolean) => void;
|
|
1642
|
+
fillingComplexity: FillingComplexity;
|
|
1643
|
+
onFillingComplexity: (value: FillingComplexity) => void;
|
|
1644
|
+
fillingMaterials: Record<string, boolean>;
|
|
1645
|
+
onFillingMaterial: (material: string, value: boolean) => void;
|
|
1646
|
+
fissureSealingEnabled: boolean;
|
|
1647
|
+
onFissureSealingEnabled: (value: boolean) => void;
|
|
1648
|
+
pdfSettings: PdfSettings;
|
|
1649
|
+
onPdfSettings: (patch: Partial<PdfSettings>) => void;
|
|
1650
|
+
};
|
|
1651
|
+
|
|
1652
|
+
/** Switch the tooth-anatomy profile. No-op (does not notify) if unchanged.
|
|
1653
|
+
* Invalidates the perio-chart template cache so that chart re-parses the new
|
|
1654
|
+
* profile's templates on its next load (the odontogram grid is rebuilt by the
|
|
1655
|
+
* caller via `rebuildGrid()`). */
|
|
1656
|
+
export declare function setToothAnatomy(v: ToothAnatomy): void;
|
|
1657
|
+
|
|
1658
|
+
/** Base tooth picker on the current selection — wraps the exact `#toothSelect`
|
|
1659
|
+
* closure `wireControls()` bound (the `defaultState()` reset with the milk-block
|
|
1660
|
+
* guard + the extraction/caries/endo/filling clears, and the trailing
|
|
1661
|
+
* `setEdentulous(false)` when the base is not "none"). */
|
|
1662
|
+
export declare function setToothSelectionForSelection(value: string): void;
|
|
1663
|
+
|
|
1664
|
+
/** Cervical wear type on the current selection (complex-mode select). */
|
|
1665
|
+
export declare function setWearCervicalForSelection(value: string): void;
|
|
1666
|
+
|
|
1667
|
+
/** Cervical wear simple-mode toggle (abrasion / none) on the selection. */
|
|
1668
|
+
export declare function setWearCervicalToggleForSelection(on: boolean): void;
|
|
1669
|
+
|
|
812
1670
|
export declare function setWearDetailLevel(value: ToothDetailLevel): void;
|
|
813
1671
|
|
|
1672
|
+
/** Incisal/occlusal wear type on the current selection (complex-mode select). */
|
|
1673
|
+
export declare function setWearEdgeForSelection(value: string): void;
|
|
1674
|
+
|
|
1675
|
+
/** Incisal/occlusal wear simple-mode toggle (attrition / none) on the selection. */
|
|
1676
|
+
export declare function setWearEdgeToggleForSelection(on: boolean): void;
|
|
1677
|
+
|
|
814
1678
|
/** Toggle visibility of wisdom teeth (18, 28, 38, 48). */
|
|
815
1679
|
export declare function setWisdomVisible(on: Any): void;
|
|
816
1680
|
|
|
817
|
-
/** Start the
|
|
1681
|
+
/** Start the interactive intro tour. */
|
|
818
1682
|
export declare function startIntroTour(): void;
|
|
819
1683
|
|
|
1684
|
+
export declare function StatusesCard(): JSX_2.Element;
|
|
1685
|
+
|
|
1686
|
+
/** One surface-cross cell's fully-resolved render state. */
|
|
1687
|
+
export declare type SurfaceCell = {
|
|
1688
|
+
value: string;
|
|
1689
|
+
pos: string;
|
|
1690
|
+
letter: string;
|
|
1691
|
+
label: string;
|
|
1692
|
+
labelId: string;
|
|
1693
|
+
checked: boolean;
|
|
1694
|
+
disabled: boolean;
|
|
1695
|
+
onToggle: (checked: boolean) => void;
|
|
1696
|
+
indicators?: SurfaceIndicator[];
|
|
1697
|
+
attrs?: Record<string, string>;
|
|
1698
|
+
};
|
|
1699
|
+
|
|
1700
|
+
export declare function SurfaceCross({ cells }: {
|
|
1701
|
+
cells: SurfaceCell[];
|
|
1702
|
+
}): JSX_2.Element;
|
|
1703
|
+
|
|
1704
|
+
/** One injected per-cell indicator span (e.g. the `.surf-depth` severity popup
|
|
1705
|
+
* affordance). `side` decides whether it renders before the checkbox (left) or
|
|
1706
|
+
* after the caption (right), matching the imperative insert order. */
|
|
1707
|
+
export declare type SurfaceIndicator = {
|
|
1708
|
+
key: string;
|
|
1709
|
+
className: string;
|
|
1710
|
+
title: string;
|
|
1711
|
+
side: "left" | "right";
|
|
1712
|
+
attrs?: Record<string, string>;
|
|
1713
|
+
children?: ReactNode;
|
|
1714
|
+
onClick?: (anchor: HTMLElement) => void;
|
|
1715
|
+
};
|
|
1716
|
+
|
|
820
1717
|
export declare type SurfaceNotation = "simple" | "full";
|
|
821
1718
|
|
|
1719
|
+
/** Selectable tooth-anatomy profiles. Stage A: only `classic` is realized;
|
|
1720
|
+
* `measured` is accepted but falls back to the classic profile (harmless). */
|
|
1721
|
+
export declare type ToothAnatomy = "classic" | "measured";
|
|
1722
|
+
|
|
1723
|
+
export declare function ToothControlsSurface(): JSX_2.Element;
|
|
1724
|
+
|
|
822
1725
|
export declare type ToothDetailLevel = "simple" | "complex";
|
|
823
1726
|
|
|
1727
|
+
export declare function ToothDetailsCard(): JSX_2.Element;
|
|
1728
|
+
|
|
1729
|
+
export declare type ToothDetailsOption = {
|
|
1730
|
+
value: string;
|
|
1731
|
+
label: string;
|
|
1732
|
+
disabled?: boolean;
|
|
1733
|
+
};
|
|
1734
|
+
|
|
1735
|
+
/** One EFFECTIVE coded diagnosis on a tooth (after `dxOverrides` are applied):
|
|
1736
|
+
* a rule-derived finding not suppressed, or an explicitly added one. */
|
|
1737
|
+
export declare type ToothDiagnosis = {
|
|
1738
|
+
key: DiagnosisKey;
|
|
1739
|
+
icd10: string | null;
|
|
1740
|
+
icd10Display: string;
|
|
1741
|
+
source: "derived" | "added";
|
|
1742
|
+
};
|
|
1743
|
+
|
|
1744
|
+
export declare function ToothInfoSurface(): JSX_2.Element;
|
|
1745
|
+
|
|
824
1746
|
declare interface ToothTableCell {
|
|
825
1747
|
toothNo: number;
|
|
826
1748
|
label: string;
|
|
827
1749
|
status: ToothTableStatus;
|
|
828
1750
|
}
|
|
829
1751
|
|
|
830
|
-
/**
|
|
1752
|
+
/** Per-tooth status in the grouped dentition table — `empty`
|
|
831
1753
|
* (nothing charted), `content` (has some finding/treatment — shown bold/accent),
|
|
832
1754
|
* `problem` (caries / root inflammation / diagnosis / wear / discoloration —
|
|
833
1755
|
* shown bold-italic in a warning colour). */
|
|
834
1756
|
declare type ToothTableStatus = "empty" | "content" | "problem";
|
|
835
1757
|
|
|
1758
|
+
/** The translate function surfaced by {@link useI18n}. */
|
|
1759
|
+
declare type TranslateFn = ReturnType<typeof useI18n>["t"];
|
|
1760
|
+
|
|
1761
|
+
export declare function useEngineState<T>(read: () => T): T;
|
|
1762
|
+
|
|
1763
|
+
/**
|
|
1764
|
+
* React hook for i18n. Supports both **controlled** mode (parent provides
|
|
1765
|
+
* `language` prop) and **standalone** mode (internal state).
|
|
1766
|
+
*
|
|
1767
|
+
* @param options - Optional controlled-mode props.
|
|
1768
|
+
* @returns `{ lang, setLang, t }` — current language, setter, and scoped translate function.
|
|
1769
|
+
*/
|
|
1770
|
+
declare function useI18n(options?: UseI18nOptions): {
|
|
1771
|
+
lang: Language;
|
|
1772
|
+
setLang: (next: Language) => void;
|
|
1773
|
+
t: (key: string, params?: Params) => string;
|
|
1774
|
+
};
|
|
1775
|
+
|
|
1776
|
+
declare type UseI18nOptions = {
|
|
1777
|
+
language?: Language;
|
|
1778
|
+
onLanguageChange?: (lang: Language) => void;
|
|
1779
|
+
};
|
|
1780
|
+
|
|
1781
|
+
/**
|
|
1782
|
+
* Read the shared odontogram UI context. Throws when used outside an
|
|
1783
|
+
* {@link OdontogramProvider}, so a misplaced surface fails loudly at mount.
|
|
1784
|
+
*/
|
|
1785
|
+
export declare function useOdontogramUi(): OdontogramUiContextValue;
|
|
1786
|
+
|
|
836
1787
|
export { }
|