@primocaredentgroup/dental-digital-intake-ui 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +284 -0
- package/dist/index.js +2567 -0
- package/dist/index.js.map +1 -0
- package/package.json +57 -0
- package/src/styles/intake.css +819 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { AcquisitionListRow, CadProjectMetadata, ExternalReferencesMap, NormalizedManifest } from '@primocaredentgroup/dental-digital-intake-shared';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
|
|
5
|
+
type DashboardFilters = {
|
|
6
|
+
status: string;
|
|
7
|
+
origin: string;
|
|
8
|
+
vendor: string;
|
|
9
|
+
hostApp: string;
|
|
10
|
+
validationProfile: string;
|
|
11
|
+
};
|
|
12
|
+
declare const defaultDashboardFilters: () => DashboardFilters;
|
|
13
|
+
declare function DigitalIntakeDashboard({ acquisitions, filters, onFiltersChange, onOpen, onCreateOpen, onSeedDemo, }: {
|
|
14
|
+
acquisitions: AcquisitionListRow[] | undefined;
|
|
15
|
+
filters: DashboardFilters;
|
|
16
|
+
onFiltersChange: (patch: Partial<DashboardFilters>) => void;
|
|
17
|
+
onOpen: (id: string) => void;
|
|
18
|
+
onCreateOpen?: () => void;
|
|
19
|
+
onSeedDemo?: () => Promise<void>;
|
|
20
|
+
}): react_jsx_runtime.JSX.Element;
|
|
21
|
+
|
|
22
|
+
type PipelineBridge = {
|
|
23
|
+
beginUpload: () => Promise<void>;
|
|
24
|
+
markUploaded: () => Promise<void>;
|
|
25
|
+
parse: () => Promise<void>;
|
|
26
|
+
validate: () => Promise<void>;
|
|
27
|
+
markReady: () => Promise<void>;
|
|
28
|
+
archive: () => Promise<void>;
|
|
29
|
+
fail: (reason: string) => Promise<void>;
|
|
30
|
+
updateLinkedEntity: (args: {
|
|
31
|
+
patientId?: string;
|
|
32
|
+
prescriptionId?: string;
|
|
33
|
+
labWorkOrderId?: string;
|
|
34
|
+
customerId?: string;
|
|
35
|
+
externalCaseId?: string;
|
|
36
|
+
}) => Promise<void>;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** Confine host → UI per l’upload: implementato con mutation Convex nell’app host. */
|
|
40
|
+
|
|
41
|
+
type UploadRegisterSingleResult = {
|
|
42
|
+
kind: "zip";
|
|
43
|
+
} | {
|
|
44
|
+
kind: "single";
|
|
45
|
+
} | {
|
|
46
|
+
kind: "zip_too_large";
|
|
47
|
+
} | {
|
|
48
|
+
kind: "client_zip";
|
|
49
|
+
};
|
|
50
|
+
type ClientExtractedFilePayload = {
|
|
51
|
+
storageId: string;
|
|
52
|
+
originalName: string;
|
|
53
|
+
extractedPath: string;
|
|
54
|
+
extension: string;
|
|
55
|
+
sizeBytes: number;
|
|
56
|
+
contentType?: string;
|
|
57
|
+
};
|
|
58
|
+
type UploadBridge = {
|
|
59
|
+
generatePackageUploadUrl: () => Promise<string>;
|
|
60
|
+
generateBulkPackageUploadUrls: (count: number) => Promise<string[]>;
|
|
61
|
+
registerUploadedPackage: (args: {
|
|
62
|
+
storageId: string;
|
|
63
|
+
originalFileName: string;
|
|
64
|
+
declaredContentType?: string;
|
|
65
|
+
}) => Promise<UploadRegisterSingleResult>;
|
|
66
|
+
registerClientExtractedZipFiles: (args: {
|
|
67
|
+
originalZipFileName?: string;
|
|
68
|
+
zipWarnings: string[];
|
|
69
|
+
cadProjectMetadata?: CadProjectMetadata;
|
|
70
|
+
files: ClientExtractedFilePayload[];
|
|
71
|
+
}) => Promise<{
|
|
72
|
+
kind: "client_zip";
|
|
73
|
+
}>;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
type ReviewBridge = {
|
|
77
|
+
saveReview: (args: {
|
|
78
|
+
acquisitionId: string;
|
|
79
|
+
updates: Array<{
|
|
80
|
+
fileId: string;
|
|
81
|
+
role: string;
|
|
82
|
+
}>;
|
|
83
|
+
markRejected?: boolean;
|
|
84
|
+
}) => Promise<void>;
|
|
85
|
+
beginManualReview: (args: {
|
|
86
|
+
acquisitionId: string;
|
|
87
|
+
}) => Promise<void>;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
type ScanFile = {
|
|
91
|
+
_id: string;
|
|
92
|
+
originalName: string;
|
|
93
|
+
originalPath: string;
|
|
94
|
+
extension: string;
|
|
95
|
+
format: string;
|
|
96
|
+
role: string;
|
|
97
|
+
sizeBytes: number;
|
|
98
|
+
classificationSource: string;
|
|
99
|
+
warnings: string[];
|
|
100
|
+
storageId?: string;
|
|
101
|
+
extractedFromZip?: boolean;
|
|
102
|
+
extractedPath?: string;
|
|
103
|
+
};
|
|
104
|
+
declare function FileList({ files, onVisualizeMesh, renderFileActions, }: {
|
|
105
|
+
files: ScanFile[] | undefined;
|
|
106
|
+
onVisualizeMesh?: (file: ScanFile) => void;
|
|
107
|
+
/** Host (es. Convex) fornisce link download / azioni per riga senza accoppiare questo package al client generato. */
|
|
108
|
+
renderFileActions?: (file: ScanFile) => ReactNode;
|
|
109
|
+
}): react_jsx_runtime.JSX.Element;
|
|
110
|
+
|
|
111
|
+
type AcquisitionEventRow = {
|
|
112
|
+
_id: string;
|
|
113
|
+
_creationTime: number;
|
|
114
|
+
type: string;
|
|
115
|
+
message: string;
|
|
116
|
+
createdAt: number;
|
|
117
|
+
payload?: unknown;
|
|
118
|
+
};
|
|
119
|
+
declare function EventTimeline({ events, }: {
|
|
120
|
+
events: AcquisitionEventRow[] | undefined;
|
|
121
|
+
}): react_jsx_runtime.JSX.Element;
|
|
122
|
+
|
|
123
|
+
type MeshViewerFile = {
|
|
124
|
+
_id: string;
|
|
125
|
+
originalName: string;
|
|
126
|
+
format: string;
|
|
127
|
+
sizeBytes: number;
|
|
128
|
+
role: string;
|
|
129
|
+
storageId?: string;
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* Opzionale: inferenza MeshSegNet (o altro) lato host — es. HTTP verso worker Python.
|
|
133
|
+
* Se omesso, il pulsante «Segmenta» usa solo la demo locale {@link applyMockToothBandColors}.
|
|
134
|
+
* @see https://github.com/Tai-Hsien/MeshSegNet
|
|
135
|
+
*/
|
|
136
|
+
type MeshSegmentationBridge = {
|
|
137
|
+
segmentMesh?: (args: {
|
|
138
|
+
arrayBuffer: ArrayBuffer;
|
|
139
|
+
format: string;
|
|
140
|
+
fileName: string;
|
|
141
|
+
}) => Promise<Float32Array | null>;
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* Viewer 3D basato sullo stack DentalGeom (camera ortografica, luci, OrbitControls `three-stdlib`).
|
|
145
|
+
* Scarica la mesh da `meshDownloadUrl`.
|
|
146
|
+
*/
|
|
147
|
+
declare function MeshViewer({ meshDownloadUrl, selectedFile, segmentationBridge, }: {
|
|
148
|
+
meshDownloadUrl: string | null | undefined;
|
|
149
|
+
selectedFile: MeshViewerFile | null;
|
|
150
|
+
segmentationBridge?: MeshSegmentationBridge | null;
|
|
151
|
+
}): react_jsx_runtime.JSX.Element;
|
|
152
|
+
|
|
153
|
+
/** Solo UI example: etichette leggibili (il profilo effettivo è solo backend). */
|
|
154
|
+
type ValidationProfileIdUi = "clinic_intraoral_default" | "lab_bench_scan_default" | "generic_default";
|
|
155
|
+
type OriginUi = "clinic_intraoral" | "lab_bench_scan" | "unknown";
|
|
156
|
+
declare function defaultProfileForOriginUi(origin: OriginUi): ValidationProfileIdUi;
|
|
157
|
+
declare const validationProfileLabel: Record<ValidationProfileIdUi, string>;
|
|
158
|
+
declare const readinessLabelUi: Record<"ready_for_lab" | "ready_for_cad" | "ready_for_next_step", string>;
|
|
159
|
+
|
|
160
|
+
/** Snapshot documento acquisizione (campi usati dalla UI). */
|
|
161
|
+
type AcquisitionDocumentModel = {
|
|
162
|
+
title: string;
|
|
163
|
+
status: string;
|
|
164
|
+
origin: string;
|
|
165
|
+
hostApp: string;
|
|
166
|
+
reviewStatus: string;
|
|
167
|
+
sourceVendor: string;
|
|
168
|
+
vendorConfidence: number;
|
|
169
|
+
warnings?: string[];
|
|
170
|
+
/** Solo se acquisizione originata da adapter/provider ingestion. */
|
|
171
|
+
sourceAdapterType?: string;
|
|
172
|
+
sourceProviderId?: string;
|
|
173
|
+
externalCaseId?: string;
|
|
174
|
+
externalPatientId?: string;
|
|
175
|
+
/** Borsa opaca persistita dai vendor / bridge host (JSON Convex-safe). */
|
|
176
|
+
externalReferences?: ExternalReferencesMap | null;
|
|
177
|
+
linkedEntity: {
|
|
178
|
+
patientId?: string;
|
|
179
|
+
prescriptionId?: string;
|
|
180
|
+
labWorkOrderId?: string;
|
|
181
|
+
customerId?: string;
|
|
182
|
+
externalCaseId?: string;
|
|
183
|
+
};
|
|
184
|
+
extractionStatus?: string;
|
|
185
|
+
extractionError?: string;
|
|
186
|
+
originalPackageName?: string;
|
|
187
|
+
originalPackageSizeBytes?: number;
|
|
188
|
+
originalPackageStorageId?: string;
|
|
189
|
+
validationProfile?: ValidationProfileIdUi;
|
|
190
|
+
validationResult?: {
|
|
191
|
+
isValid: boolean;
|
|
192
|
+
blockingIssues: string[];
|
|
193
|
+
warnings: string[];
|
|
194
|
+
checkedAt: number;
|
|
195
|
+
profileUsed: ValidationProfileIdUi;
|
|
196
|
+
readinessLabel: keyof typeof readinessLabelUi;
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
type DigitalAcquisitionDetailProps = {
|
|
200
|
+
acquisitionId: string;
|
|
201
|
+
onBack: () => void;
|
|
202
|
+
/** Dati server; `undefined` durante il caricamento iniziale */
|
|
203
|
+
doc: AcquisitionDocumentModel | undefined;
|
|
204
|
+
files: ScanFile[] | undefined;
|
|
205
|
+
events: AcquisitionEventRow[] | undefined;
|
|
206
|
+
manifest: NormalizedManifest | null | undefined;
|
|
207
|
+
packageDownloadUrl: string | null | undefined;
|
|
208
|
+
/** URL mesh selezionata per il viewer (undefined = loading) */
|
|
209
|
+
meshDownloadUrl: string | null | undefined;
|
|
210
|
+
pipeline: PipelineBridge;
|
|
211
|
+
upload: UploadBridge;
|
|
212
|
+
review: ReviewBridge;
|
|
213
|
+
/** Host rende il link “Scarica” per ogni riga file (es. Convex useQuery per URL) */
|
|
214
|
+
renderFileListActions?: (file: ScanFile) => ReactNode;
|
|
215
|
+
/** Controllato dall’host per collegare `getScanFileDownloadUrl` */
|
|
216
|
+
previewMeshId: string | null;
|
|
217
|
+
onPreviewMeshIdChange: (id: string | null) => void;
|
|
218
|
+
/** Opzionale: servizio segmentazione denti (es. worker Python MeshSegNet). */
|
|
219
|
+
meshSegmentationBridge?: MeshSegmentationBridge | null;
|
|
220
|
+
};
|
|
221
|
+
declare function DigitalAcquisitionDetail({ acquisitionId, onBack, doc, files, events, manifest, packageDownloadUrl, meshDownloadUrl, meshSegmentationBridge, pipeline, upload, review, renderFileListActions, previewMeshId, onPreviewMeshIdChange, }: DigitalAcquisitionDetailProps): react_jsx_runtime.JSX.Element;
|
|
222
|
+
|
|
223
|
+
declare function UploadPanel({ upload, }: {
|
|
224
|
+
upload: UploadBridge;
|
|
225
|
+
}): react_jsx_runtime.JSX.Element;
|
|
226
|
+
|
|
227
|
+
type ManifestFileRef = {
|
|
228
|
+
originalName: string;
|
|
229
|
+
};
|
|
230
|
+
declare function CadProjectMetadataPanel({ cadProject, manifestFiles, }: {
|
|
231
|
+
cadProject: CadProjectMetadata;
|
|
232
|
+
manifestFiles?: ManifestFileRef[];
|
|
233
|
+
}): react_jsx_runtime.JSX.Element;
|
|
234
|
+
|
|
235
|
+
/** Riepilogo "umano" del caso (paziente, lavorazione, scanner, denti, shade, componentistica). */
|
|
236
|
+
declare function CaseSummaryCard({ cadProject, fallbackTitle, }: {
|
|
237
|
+
cadProject: CadProjectMetadata;
|
|
238
|
+
fallbackTitle?: string;
|
|
239
|
+
}): react_jsx_runtime.JSX.Element;
|
|
240
|
+
|
|
241
|
+
type FileRow = {
|
|
242
|
+
_id: string;
|
|
243
|
+
originalName: string;
|
|
244
|
+
role: string;
|
|
245
|
+
format: string;
|
|
246
|
+
storageId?: string;
|
|
247
|
+
};
|
|
248
|
+
declare function ReviewPanel({ acquisitionId, files, review, onPreviewMesh, }: {
|
|
249
|
+
acquisitionId: string;
|
|
250
|
+
files: FileRow[] | undefined;
|
|
251
|
+
review: ReviewBridge;
|
|
252
|
+
onPreviewMesh?: (fileId: string) => void;
|
|
253
|
+
}): react_jsx_runtime.JSX.Element | null;
|
|
254
|
+
|
|
255
|
+
declare function ManifestViewer({ manifest }: {
|
|
256
|
+
manifest: unknown;
|
|
257
|
+
}): react_jsx_runtime.JSX.Element;
|
|
258
|
+
|
|
259
|
+
type MeshSelectable = {
|
|
260
|
+
_id: string;
|
|
261
|
+
originalName: string;
|
|
262
|
+
format: string;
|
|
263
|
+
role: string;
|
|
264
|
+
sizeBytes: number;
|
|
265
|
+
};
|
|
266
|
+
declare function MeshFileSelector({ files, selectedId, onSelect, }: {
|
|
267
|
+
files: MeshSelectable[] | undefined;
|
|
268
|
+
selectedId: string | null;
|
|
269
|
+
onSelect: (file: MeshSelectable) => void;
|
|
270
|
+
}): react_jsx_runtime.JSX.Element;
|
|
271
|
+
|
|
272
|
+
declare function StatusBadge({ status }: {
|
|
273
|
+
status: string;
|
|
274
|
+
}): react_jsx_runtime.JSX.Element;
|
|
275
|
+
declare function SmallBadge({ children, variant, }: {
|
|
276
|
+
children: ReactNode;
|
|
277
|
+
variant: "format" | "role";
|
|
278
|
+
}): react_jsx_runtime.JSX.Element;
|
|
279
|
+
|
|
280
|
+
declare const hostAppLabel: (h: string) => string;
|
|
281
|
+
declare const originLabel: (o: string) => string;
|
|
282
|
+
declare const vendorLabel: (v: string) => string;
|
|
283
|
+
|
|
284
|
+
export { type AcquisitionDocumentModel, type AcquisitionEventRow, CadProjectMetadataPanel, CaseSummaryCard, type ClientExtractedFilePayload, type DashboardFilters, DigitalAcquisitionDetail, type DigitalAcquisitionDetailProps, DigitalIntakeDashboard, EventTimeline, FileList, ManifestViewer, MeshFileSelector, type MeshSegmentationBridge, MeshViewer, type MeshViewerFile, type OriginUi, type PipelineBridge, type ReviewBridge, ReviewPanel, type ScanFile, SmallBadge, StatusBadge, type UploadBridge, UploadPanel, type UploadRegisterSingleResult, type ValidationProfileIdUi, defaultDashboardFilters, defaultProfileForOriginUi, hostAppLabel, originLabel, readinessLabelUi, validationProfileLabel, vendorLabel };
|