@primocaredentgroup/prescriptions-component 0.1.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/LICENSE +21 -0
- package/README.md +84 -0
- package/dist/_internal/client/PrescriptionsComponentClient.d.ts +25 -0
- package/dist/_internal/client/PrescriptionsComponentClient.d.ts.map +1 -0
- package/dist/_internal/client/PrescriptionsComponentClient.js +61 -0
- package/dist/_internal/client/PrescriptionsComponentClient.js.map +1 -0
- package/dist/_internal/client/index.d.ts +3 -0
- package/dist/_internal/client/index.d.ts.map +1 -0
- package/dist/_internal/client/index.js +2 -0
- package/dist/_internal/client/index.js.map +1 -0
- package/dist/_internal/client/types.d.ts +47 -0
- package/dist/_internal/client/types.d.ts.map +1 -0
- package/dist/_internal/client/types.js +2 -0
- package/dist/_internal/client/types.js.map +1 -0
- package/dist/_internal/component/convex.config.d.ts +7 -0
- package/dist/_internal/component/convex.config.d.ts.map +1 -0
- package/dist/_internal/component/convex.config.js +8 -0
- package/dist/_internal/component/convex.config.js.map +1 -0
- package/dist/_internal/component/functions.d.ts +9 -0
- package/dist/_internal/component/functions.d.ts.map +1 -0
- package/dist/_internal/component/functions.js +11 -0
- package/dist/_internal/component/functions.js.map +1 -0
- package/dist/_internal/component/index.d.ts +18 -0
- package/dist/_internal/component/index.d.ts.map +1 -0
- package/dist/_internal/component/index.js +20 -0
- package/dist/_internal/component/index.js.map +1 -0
- package/dist/_internal/component/schema.d.ts +2 -0
- package/dist/_internal/component/schema.d.ts.map +1 -0
- package/dist/_internal/component/schema.js +2 -0
- package/dist/_internal/component/schema.js.map +1 -0
- package/dist/_internal/react/PrescriptionsWidget.d.ts +18 -0
- package/dist/_internal/react/PrescriptionsWidget.d.ts.map +1 -0
- package/dist/_internal/react/PrescriptionsWidget.js +137 -0
- package/dist/_internal/react/PrescriptionsWidget.js.map +1 -0
- package/dist/_internal/react/index.d.ts +3 -0
- package/dist/_internal/react/index.d.ts.map +1 -0
- package/dist/_internal/react/index.js +2 -0
- package/dist/_internal/react/index.js.map +1 -0
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.js +1 -0
- package/dist/component/convex.config.d.ts +2 -0
- package/dist/component/convex.config.js +2 -0
- package/dist/component/index.d.ts +1 -0
- package/dist/component/index.js +1 -0
- package/dist/convex/lib/auth.d.ts +7 -0
- package/dist/convex/lib/auth.d.ts.map +1 -0
- package/dist/convex/lib/auth.js +38 -0
- package/dist/convex/lib/auth.js.map +1 -0
- package/dist/convex/lib/clinicalNormalize.d.ts +13 -0
- package/dist/convex/lib/clinicalNormalize.d.ts.map +1 -0
- package/dist/convex/lib/clinicalNormalize.js +82 -0
- package/dist/convex/lib/clinicalNormalize.js.map +1 -0
- package/dist/convex/lib/dental.d.ts +13 -0
- package/dist/convex/lib/dental.d.ts.map +1 -0
- package/dist/convex/lib/dental.js +79 -0
- package/dist/convex/lib/dental.js.map +1 -0
- package/dist/convex/lib/dynamicFieldsStrict.d.ts +9 -0
- package/dist/convex/lib/dynamicFieldsStrict.d.ts.map +1 -0
- package/dist/convex/lib/dynamicFieldsStrict.js +65 -0
- package/dist/convex/lib/dynamicFieldsStrict.js.map +1 -0
- package/dist/convex/lib/dynamicRules.d.ts +61 -0
- package/dist/convex/lib/dynamicRules.d.ts.map +1 -0
- package/dist/convex/lib/dynamicRules.js +221 -0
- package/dist/convex/lib/dynamicRules.js.map +1 -0
- package/dist/convex/lib/storage.d.ts +59 -0
- package/dist/convex/lib/storage.d.ts.map +1 -0
- package/dist/convex/lib/storage.js +120 -0
- package/dist/convex/lib/storage.js.map +1 -0
- package/dist/convex/lib/utils.d.ts +61 -0
- package/dist/convex/lib/utils.d.ts.map +1 -0
- package/dist/convex/lib/utils.js +135 -0
- package/dist/convex/lib/utils.js.map +1 -0
- package/dist/convex/lib/validation.d.ts +24 -0
- package/dist/convex/lib/validation.d.ts.map +1 -0
- package/dist/convex/lib/validation.js +333 -0
- package/dist/convex/lib/validation.js.map +1 -0
- package/dist/convex/mutations/digitalAssets.d.ts +54 -0
- package/dist/convex/mutations/digitalAssets.d.ts.map +1 -0
- package/dist/convex/mutations/digitalAssets.js +297 -0
- package/dist/convex/mutations/digitalAssets.js.map +1 -0
- package/dist/convex/mutations/operational.d.ts +38 -0
- package/dist/convex/mutations/operational.d.ts.map +1 -0
- package/dist/convex/mutations/operational.js +226 -0
- package/dist/convex/mutations/operational.js.map +1 -0
- package/dist/convex/mutations/phases.d.ts +45 -0
- package/dist/convex/mutations/phases.d.ts.map +1 -0
- package/dist/convex/mutations/phases.js +334 -0
- package/dist/convex/mutations/phases.js.map +1 -0
- package/dist/convex/mutations/prescriptions.d.ts +191 -0
- package/dist/convex/mutations/prescriptions.d.ts.map +1 -0
- package/dist/convex/mutations/prescriptions.js +1263 -0
- package/dist/convex/mutations/prescriptions.js.map +1 -0
- package/dist/convex/mutations/syncJobs.d.ts +37 -0
- package/dist/convex/mutations/syncJobs.d.ts.map +1 -0
- package/dist/convex/mutations/syncJobs.js +238 -0
- package/dist/convex/mutations/syncJobs.js.map +1 -0
- package/dist/convex/prescriptions/fields.d.ts +50 -0
- package/dist/convex/prescriptions/fields.d.ts.map +1 -0
- package/dist/convex/prescriptions/fields.js +242 -0
- package/dist/convex/prescriptions/fields.js.map +1 -0
- package/dist/convex/queries/dynamicFields.d.ts +27 -0
- package/dist/convex/queries/dynamicFields.d.ts.map +1 -0
- package/dist/convex/queries/dynamicFields.js +119 -0
- package/dist/convex/queries/dynamicFields.js.map +1 -0
- package/dist/convex/queries/prescriptions.d.ts +583 -0
- package/dist/convex/queries/prescriptions.d.ts.map +1 -0
- package/dist/convex/queries/prescriptions.js +208 -0
- package/dist/convex/queries/prescriptions.js.map +1 -0
- package/dist/convex/schema.d.ts +962 -0
- package/dist/convex/schema.d.ts.map +1 -0
- package/dist/convex/schema.js +434 -0
- package/dist/convex/schema.js.map +1 -0
- package/dist/convex/types.d.ts +267 -0
- package/dist/convex/types.d.ts.map +1 -0
- package/dist/convex/types.js +2 -0
- package/dist/convex/types.js.map +1 -0
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.js +1 -0
- package/dist/react/styles.css +54 -0
- package/package.json +82 -0
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import { Id } from "./_generated/dataModel";
|
|
2
|
+
export type PrescriptionStatus = "DRAFT" | "PENDING_DOCTOR" | "SIGNED" | "SYNCED" | "ERROR" | "CANCELLED" | "SUPERSEDED";
|
|
3
|
+
export type PhaseStatus = "NOT_STARTED" | "SCHEDULED" | "DONE_OK" | "DONE_KO" | "SKIPPED" | "REPEAT";
|
|
4
|
+
export type FlowStatus = "ACTIVE" | "DRAFT" | "ARCHIVED";
|
|
5
|
+
export type UserRole = "SECRETARY" | "DOCTOR";
|
|
6
|
+
export type ActorRole = "SECRETARY" | "DOCTOR" | "SYSTEM";
|
|
7
|
+
export type SyncTarget = "PRIMOCORE" | "LAB";
|
|
8
|
+
export type SyncKind = "POST_CLINICAL" | "UPSERT_APPOINTMENT" | "LAB_REQUEST";
|
|
9
|
+
export type SyncJobStatus = "PENDING" | "RUNNING" | "OK" | "FAILED";
|
|
10
|
+
export type EntityType = "PATIENT" | "PDC_ITEM" | "APPOINTMENT" | "DOCTOR" | "CLINIC";
|
|
11
|
+
export type ToothRole = "abutment" | "pontic";
|
|
12
|
+
export interface BridgeElement {
|
|
13
|
+
toothNumber: number;
|
|
14
|
+
role: ToothRole;
|
|
15
|
+
}
|
|
16
|
+
export type ApplicationType = {
|
|
17
|
+
type: "TOOTH";
|
|
18
|
+
toothNumber: number;
|
|
19
|
+
} | {
|
|
20
|
+
type: "MULTI_TOOTH";
|
|
21
|
+
teeth: number[];
|
|
22
|
+
} | {
|
|
23
|
+
type: "BRIDGE";
|
|
24
|
+
teeth: BridgeElement[];
|
|
25
|
+
} | {
|
|
26
|
+
type: "QUADRANT";
|
|
27
|
+
quadrant: number;
|
|
28
|
+
} | {
|
|
29
|
+
type: "SEXTANT";
|
|
30
|
+
sextant: number;
|
|
31
|
+
} | {
|
|
32
|
+
type: "ARCH";
|
|
33
|
+
arch: "UPPER" | "LOWER";
|
|
34
|
+
} | {
|
|
35
|
+
type: "FULL_MOUTH";
|
|
36
|
+
};
|
|
37
|
+
export interface ClinicalData {
|
|
38
|
+
patient: {
|
|
39
|
+
corePatientId: string;
|
|
40
|
+
};
|
|
41
|
+
clinic: {
|
|
42
|
+
coreClinicId: string;
|
|
43
|
+
};
|
|
44
|
+
doctor: {
|
|
45
|
+
coreDoctorId: string;
|
|
46
|
+
};
|
|
47
|
+
prostheticService: {
|
|
48
|
+
pdcItemId: string;
|
|
49
|
+
listinoId: string;
|
|
50
|
+
serviceCode: string;
|
|
51
|
+
serviceLabel: string;
|
|
52
|
+
};
|
|
53
|
+
application?: ApplicationType;
|
|
54
|
+
shade?: string;
|
|
55
|
+
notePreparazione?: string;
|
|
56
|
+
lineaMargine?: string;
|
|
57
|
+
}
|
|
58
|
+
export interface Signature {
|
|
59
|
+
signedAt: number;
|
|
60
|
+
signedByDoctorId: string;
|
|
61
|
+
signatureType: "weak-digital";
|
|
62
|
+
signaturePayload: string;
|
|
63
|
+
clinicalHash: string;
|
|
64
|
+
}
|
|
65
|
+
export interface PhaseAppointment {
|
|
66
|
+
coreAppointmentId?: string;
|
|
67
|
+
startAt?: number;
|
|
68
|
+
endAt?: number;
|
|
69
|
+
doctorId?: string;
|
|
70
|
+
}
|
|
71
|
+
export interface PhaseFeedback {
|
|
72
|
+
outcome: "OK" | "KO" | null;
|
|
73
|
+
comment?: string;
|
|
74
|
+
updatedBy: string;
|
|
75
|
+
updatedAt: number;
|
|
76
|
+
}
|
|
77
|
+
export interface CoreRefs {
|
|
78
|
+
corePrescriptionId?: string;
|
|
79
|
+
coreAppointmentIds?: string[];
|
|
80
|
+
}
|
|
81
|
+
export interface LabRefs {
|
|
82
|
+
labRequestId?: string;
|
|
83
|
+
lastLabStatus?: string;
|
|
84
|
+
}
|
|
85
|
+
export interface FlowPhase {
|
|
86
|
+
phaseTypeKey: string;
|
|
87
|
+
label: string;
|
|
88
|
+
required: boolean;
|
|
89
|
+
repeatable: boolean;
|
|
90
|
+
requiredFields: string[];
|
|
91
|
+
appointmentRequired: boolean;
|
|
92
|
+
}
|
|
93
|
+
export interface FlowCondition {
|
|
94
|
+
when: {
|
|
95
|
+
fieldPath: string;
|
|
96
|
+
op: "eq" | "neq" | "in" | "exists";
|
|
97
|
+
value?: unknown;
|
|
98
|
+
};
|
|
99
|
+
then: {
|
|
100
|
+
setPhaseRequired?: {
|
|
101
|
+
phaseTypeKey: string;
|
|
102
|
+
required: boolean;
|
|
103
|
+
};
|
|
104
|
+
setFieldRequired?: {
|
|
105
|
+
fieldPath: string;
|
|
106
|
+
required: boolean;
|
|
107
|
+
};
|
|
108
|
+
allowSkipToNext?: boolean;
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
export interface FlowValidation {
|
|
112
|
+
type: "requiredFields" | "customRule";
|
|
113
|
+
rule?: string;
|
|
114
|
+
fieldPaths?: string[];
|
|
115
|
+
message: string;
|
|
116
|
+
}
|
|
117
|
+
export interface FlowDefinition {
|
|
118
|
+
phases: FlowPhase[];
|
|
119
|
+
validations: FlowValidation[];
|
|
120
|
+
conditions: FlowCondition[];
|
|
121
|
+
}
|
|
122
|
+
export type PrescriptionType = "ANALOG" | "DIGITAL";
|
|
123
|
+
export interface DigitalAsset {
|
|
124
|
+
assetId: string;
|
|
125
|
+
fileName: string;
|
|
126
|
+
fileSize: number;
|
|
127
|
+
mimeType: string;
|
|
128
|
+
description?: string;
|
|
129
|
+
storageProvider: "CONVEX" | "S3";
|
|
130
|
+
storageId: string;
|
|
131
|
+
storageUrl?: string;
|
|
132
|
+
uploadedAt: number;
|
|
133
|
+
uploadedBy: string;
|
|
134
|
+
}
|
|
135
|
+
export interface Prescription {
|
|
136
|
+
_id: Id<"prescriptions">;
|
|
137
|
+
prescriptionId: number;
|
|
138
|
+
deleted_at?: number;
|
|
139
|
+
clinicId: string;
|
|
140
|
+
doctorId: string;
|
|
141
|
+
patientId: string;
|
|
142
|
+
pdcItemId: string;
|
|
143
|
+
listinoId: string;
|
|
144
|
+
flowKey: string;
|
|
145
|
+
flowVersion: number;
|
|
146
|
+
status: PrescriptionStatus;
|
|
147
|
+
createdByUserId: string;
|
|
148
|
+
createdAt: number;
|
|
149
|
+
updatedAt: number;
|
|
150
|
+
coreRefs: CoreRefs;
|
|
151
|
+
labRefs: LabRefs;
|
|
152
|
+
latestClinicalRevisionId?: Id<"clinicalRevisions">;
|
|
153
|
+
prescriptionType?: PrescriptionType;
|
|
154
|
+
digitalAssets?: DigitalAsset[];
|
|
155
|
+
}
|
|
156
|
+
export interface ClinicalRevision {
|
|
157
|
+
_id: Id<"clinicalRevisions">;
|
|
158
|
+
clinicalRevisionId: number;
|
|
159
|
+
deleted_at?: number;
|
|
160
|
+
prescriptionRef: Id<"prescriptions">;
|
|
161
|
+
revisionNumber: number;
|
|
162
|
+
clinicalData: ClinicalData;
|
|
163
|
+
clinicalHash: string;
|
|
164
|
+
signature: Signature | null;
|
|
165
|
+
frozen: boolean;
|
|
166
|
+
createdAt: number;
|
|
167
|
+
}
|
|
168
|
+
export interface PhaseInstance {
|
|
169
|
+
_id: Id<"phaseInstances">;
|
|
170
|
+
phaseInstanceId: number;
|
|
171
|
+
deleted_at?: number;
|
|
172
|
+
prescriptionRef: Id<"prescriptions">;
|
|
173
|
+
phaseTypeKey: string;
|
|
174
|
+
ordinal: number;
|
|
175
|
+
iteration: number;
|
|
176
|
+
status: PhaseStatus;
|
|
177
|
+
appointment?: PhaseAppointment;
|
|
178
|
+
feedback?: PhaseFeedback;
|
|
179
|
+
createdAt: number;
|
|
180
|
+
updatedAt: number;
|
|
181
|
+
}
|
|
182
|
+
export interface AuditEvent {
|
|
183
|
+
_id: Id<"auditEvents">;
|
|
184
|
+
auditEventId: number;
|
|
185
|
+
deleted_at?: number;
|
|
186
|
+
prescriptionRef?: Id<"prescriptions">;
|
|
187
|
+
at: number;
|
|
188
|
+
actorUserId: string;
|
|
189
|
+
actorRole: ActorRole;
|
|
190
|
+
type: string;
|
|
191
|
+
payload: unknown;
|
|
192
|
+
}
|
|
193
|
+
export interface SyncJob {
|
|
194
|
+
_id: Id<"syncJobs">;
|
|
195
|
+
syncJobId: number;
|
|
196
|
+
deleted_at?: number;
|
|
197
|
+
prescriptionRef: Id<"prescriptions">;
|
|
198
|
+
target: SyncTarget;
|
|
199
|
+
kind: SyncKind;
|
|
200
|
+
idempotencyKey: string;
|
|
201
|
+
requestPayload: unknown;
|
|
202
|
+
status: SyncJobStatus;
|
|
203
|
+
attempts: number;
|
|
204
|
+
lastError?: string;
|
|
205
|
+
nextRetryAt: number;
|
|
206
|
+
createdAt: number;
|
|
207
|
+
updatedAt: number;
|
|
208
|
+
}
|
|
209
|
+
export interface User {
|
|
210
|
+
_id: Id<"users">;
|
|
211
|
+
userId: number;
|
|
212
|
+
deleted_at?: number;
|
|
213
|
+
email: string;
|
|
214
|
+
name: string;
|
|
215
|
+
role: UserRole;
|
|
216
|
+
clinicId: string;
|
|
217
|
+
coreDoctorId?: string;
|
|
218
|
+
active: boolean;
|
|
219
|
+
}
|
|
220
|
+
export interface Flow {
|
|
221
|
+
_id: Id<"flows">;
|
|
222
|
+
flowId: number;
|
|
223
|
+
deleted_at?: number;
|
|
224
|
+
flowKey: string;
|
|
225
|
+
version: number;
|
|
226
|
+
status: FlowStatus;
|
|
227
|
+
createdAt: number;
|
|
228
|
+
definition: FlowDefinition;
|
|
229
|
+
}
|
|
230
|
+
export interface Snapshot {
|
|
231
|
+
_id: Id<"snapshots">;
|
|
232
|
+
snapshotId: number;
|
|
233
|
+
deleted_at?: number;
|
|
234
|
+
entityType: EntityType;
|
|
235
|
+
entityId: string;
|
|
236
|
+
data: unknown;
|
|
237
|
+
fetchedAt: number;
|
|
238
|
+
}
|
|
239
|
+
export interface OperationalData {
|
|
240
|
+
_id: Id<"operationalData">;
|
|
241
|
+
operationalDataId: number;
|
|
242
|
+
deleted_at?: number;
|
|
243
|
+
prescriptionRef: Id<"prescriptions">;
|
|
244
|
+
noteInterne?: string;
|
|
245
|
+
allegati?: {
|
|
246
|
+
fileId: string;
|
|
247
|
+
fileName: string;
|
|
248
|
+
uploadedAt: number;
|
|
249
|
+
uploadedBy: string;
|
|
250
|
+
}[];
|
|
251
|
+
uiState?: unknown;
|
|
252
|
+
}
|
|
253
|
+
export type AuditEventType = "PRESCRIPTION_CREATED" | "CLINICAL_DRAFT_UPDATED" | "SUBMITTED_TO_DOCTOR" | "DOCTOR_UPDATED_DRAFT" | "PRESCRIPTION_SIGNED" | "REVISION_CREATED" | "PHASE_FEEDBACK_UPDATED" | "PHASE_APPOINTMENT_SCHEDULED" | "SYNC_JOB_CREATED" | "SYNC_JOB_COMPLETED" | "SYNC_JOB_FAILED" | "PRESCRIPTION_CANCELLED";
|
|
254
|
+
export interface ValidationError {
|
|
255
|
+
field: string;
|
|
256
|
+
message: string;
|
|
257
|
+
}
|
|
258
|
+
export interface CreatePrescriptionResult {
|
|
259
|
+
prescriptionId: Id<"prescriptions">;
|
|
260
|
+
revisionId: Id<"clinicalRevisions">;
|
|
261
|
+
}
|
|
262
|
+
export interface SignPrescriptionResult {
|
|
263
|
+
success: boolean;
|
|
264
|
+
clinicalHash: string;
|
|
265
|
+
syncJobIds: Id<"syncJobs">[];
|
|
266
|
+
}
|
|
267
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../convex/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,wBAAwB,CAAC;AAO5C,MAAM,MAAM,kBAAkB,GAC1B,OAAO,GACP,gBAAgB,GAChB,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,WAAW,GACX,YAAY,CAAC;AAEjB,MAAM,MAAM,WAAW,GACnB,aAAa,GACb,WAAW,GACX,SAAS,GACT,SAAS,GACT,SAAS,GACT,QAAQ,CAAC;AAE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AAC,EAAE;QACT,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;KACpB,EAAE,CAAC;IACJ,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAGD,MAAM,MAAM,cAAc,GACtB,sBAAsB,GACtB,wBAAwB,GACxB,qBAAqB,GACrB,sBAAsB,GACtB,qBAAqB,GACrB,kBAAkB,GAClB,wBAAwB,GACxB,6BAA6B,GAC7B,kBAAkB,GAClB,oBAAoB,GACpB,iBAAiB,GACjB,wBAAwB,CAAC;AAG7B,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAGD,MAAM,WAAW,wBAAwB;IACvC,cAAc,EAAE,EAAE,CAAC,eAAe,CAAC,CAAC;IACpC,UAAU,EAAE,EAAE,CAAC,mBAAmB,CAAC,CAAC;CACrC;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC;CAC9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../convex/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../_internal/react/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../_internal/react/index.js";
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
.pcw-root {
|
|
2
|
+
font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
3
|
+
color: #111827;
|
|
4
|
+
background: #ffffff;
|
|
5
|
+
border: 1px solid #e5e7eb;
|
|
6
|
+
border-radius: 12px;
|
|
7
|
+
padding: 16px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.pcw-toolbar {
|
|
11
|
+
display: flex;
|
|
12
|
+
gap: 8px;
|
|
13
|
+
margin-bottom: 12px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.pcw-toolbar button,
|
|
17
|
+
.pcw-panel button {
|
|
18
|
+
border: 1px solid #d1d5db;
|
|
19
|
+
background: #f9fafb;
|
|
20
|
+
color: #111827;
|
|
21
|
+
border-radius: 8px;
|
|
22
|
+
padding: 8px 12px;
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.pcw-panel {
|
|
27
|
+
border: 1px solid #e5e7eb;
|
|
28
|
+
border-radius: 10px;
|
|
29
|
+
padding: 12px;
|
|
30
|
+
background: #ffffff;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.pcw-error {
|
|
34
|
+
border-color: #fecaca;
|
|
35
|
+
background: #fff1f2;
|
|
36
|
+
margin-bottom: 12px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.pcw-list {
|
|
40
|
+
list-style: none;
|
|
41
|
+
margin: 0;
|
|
42
|
+
padding: 0;
|
|
43
|
+
display: grid;
|
|
44
|
+
gap: 8px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.pcw-list li button {
|
|
48
|
+
width: 100%;
|
|
49
|
+
text-align: left;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.pcw-detail p {
|
|
53
|
+
margin: 6px 0;
|
|
54
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@primocaredentgroup/prescriptions-component",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"description": "Convex component + React widget for prescriptions workflow integration.",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/primocaredentgroup/PrescrizioniProd.git"
|
|
10
|
+
},
|
|
11
|
+
"main": "./dist/client/index.js",
|
|
12
|
+
"types": "./dist/client/index.d.ts",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/client/index.d.ts",
|
|
16
|
+
"import": "./dist/client/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./react": {
|
|
19
|
+
"types": "./dist/react/index.d.ts",
|
|
20
|
+
"import": "./dist/react/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./component": {
|
|
23
|
+
"types": "./dist/component/index.d.ts",
|
|
24
|
+
"import": "./dist/component/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./component/convex.config": {
|
|
27
|
+
"types": "./dist/component/convex.config.d.ts",
|
|
28
|
+
"import": "./dist/component/convex.config.js"
|
|
29
|
+
},
|
|
30
|
+
"./styles.css": "./dist/react/styles.css"
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"dist",
|
|
34
|
+
"README.md",
|
|
35
|
+
"LICENSE"
|
|
36
|
+
],
|
|
37
|
+
"scripts": {
|
|
38
|
+
"dev": "vite --config example/vite.config.ts",
|
|
39
|
+
"dev:app": "vite",
|
|
40
|
+
"build": "npm run build:package",
|
|
41
|
+
"clean:dist": "rm -rf dist",
|
|
42
|
+
"build:package": "npm run clean:dist && tsc -p tsconfig.package.json && node scripts/prepare-package-entries.mjs",
|
|
43
|
+
"build:example": "vite build --config example/vite.config.ts",
|
|
44
|
+
"prepublishOnly": "npm run build",
|
|
45
|
+
"typecheck": "tsc -p tsconfig.package.json --noEmit",
|
|
46
|
+
"lint": "eslint .",
|
|
47
|
+
"preview": "vite preview --config example/vite.config.ts"
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"@tanstack/react-query": "^5.90.19",
|
|
51
|
+
"@types/three": "^0.182.0",
|
|
52
|
+
"clsx": "^2.1.1",
|
|
53
|
+
"convex": "^1.31.5",
|
|
54
|
+
"date-fns": "^4.1.0",
|
|
55
|
+
"jsbarcode": "^3.12.3",
|
|
56
|
+
"react-router-dom": "^7.12.0",
|
|
57
|
+
"three": "^0.182.0",
|
|
58
|
+
"zod": "^4.3.6"
|
|
59
|
+
},
|
|
60
|
+
"peerDependencies": {
|
|
61
|
+
"react": "^19.0.0",
|
|
62
|
+
"react-dom": "^19.0.0"
|
|
63
|
+
},
|
|
64
|
+
"devDependencies": {
|
|
65
|
+
"@eslint/js": "^9.39.1",
|
|
66
|
+
"@tailwindcss/postcss": "^4.1.18",
|
|
67
|
+
"@types/node": "^24.10.1",
|
|
68
|
+
"@types/react": "^19.2.5",
|
|
69
|
+
"@types/react-dom": "^19.2.3",
|
|
70
|
+
"@vitejs/plugin-react": "^5.1.1",
|
|
71
|
+
"autoprefixer": "^10.4.23",
|
|
72
|
+
"eslint": "^9.39.1",
|
|
73
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
74
|
+
"eslint-plugin-react-refresh": "^0.4.24",
|
|
75
|
+
"globals": "^16.5.0",
|
|
76
|
+
"postcss": "^8.5.6",
|
|
77
|
+
"tailwindcss": "^4.1.18",
|
|
78
|
+
"typescript": "~5.9.3",
|
|
79
|
+
"typescript-eslint": "^8.46.4",
|
|
80
|
+
"vite": "^7.2.4"
|
|
81
|
+
}
|
|
82
|
+
}
|