@alfadocs/ui-kit 1.129.0 → 1.130.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/dist/_chunks/calendar-appointment-editor-dialog-CXch4Pmu.js +13663 -0
- package/dist/_chunks/contact-round-DiSvB3LP.js +18 -0
- package/dist/_chunks/{entity-summary-Dzk54yom.js → entity-summary-KHM0PnSI.js} +55 -67
- package/dist/_chunks/{header-settings-DsvheAOt.js → header-settings-ZGvYAuKF.js} +101 -97
- package/dist/_chunks/{marketplace-app-shell-BOBWmzoT.js → marketplace-app-shell-D_HA8CKx.js} +2 -2
- package/dist/_chunks/{patient-search-D_S7joff.js → patient-search-OAwFgOW3.js} +2 -2
- package/dist/_chunks/{toast-BNoN8Qjh.js → toast-DQ1Zu1kk.js} +264 -251
- package/dist/_chunks/use-appointment-details-read-BrykoTOR.js +2475 -0
- package/dist/agent-catalog.json +1 -1
- package/dist/browser-support.js +1 -1
- package/dist/components/appointment-details-panel/appointment-details-panel.d.ts +7 -0
- package/dist/components/appointment-details-panel/appointment-details-panel.links.d.ts +2 -0
- package/dist/components/appointment-details-panel/appointment-details-panel.sections.d.ts +5 -1
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/toast/index.js +1 -1
- package/dist/core.css +1 -1
- package/dist/i18n/locales/ar.d.ts +12 -4
- package/dist/i18n/locales/ar.js +15 -7
- package/dist/i18n/locales/de.d.ts +12 -4
- package/dist/i18n/locales/de.js +15 -7
- package/dist/i18n/locales/el.d.ts +12 -4
- package/dist/i18n/locales/el.js +15 -7
- package/dist/i18n/locales/en.d.ts +12 -4
- package/dist/i18n/locales/en.js +12 -4
- package/dist/i18n/locales/es.d.ts +12 -4
- package/dist/i18n/locales/es.js +15 -7
- package/dist/i18n/locales/fr.d.ts +12 -4
- package/dist/i18n/locales/fr.js +15 -7
- package/dist/i18n/locales/hi.d.ts +12 -4
- package/dist/i18n/locales/hi.js +15 -7
- package/dist/i18n/locales/it.d.ts +12 -4
- package/dist/i18n/locales/it.js +15 -7
- package/dist/i18n/locales/ja.d.ts +12 -4
- package/dist/i18n/locales/ja.js +15 -7
- package/dist/i18n/locales/nl.d.ts +12 -4
- package/dist/i18n/locales/nl.js +15 -7
- package/dist/i18n/locales/pl.d.ts +12 -4
- package/dist/i18n/locales/pl.js +15 -7
- package/dist/i18n/locales/pt.d.ts +12 -4
- package/dist/i18n/locales/pt.js +15 -7
- package/dist/i18n/locales/ro.d.ts +12 -4
- package/dist/i18n/locales/ro.js +15 -7
- package/dist/i18n/locales/ru.d.ts +12 -4
- package/dist/i18n/locales/ru.js +15 -7
- package/dist/i18n/locales/sq.d.ts +12 -4
- package/dist/i18n/locales/sq.js +15 -7
- package/dist/i18n/locales/sv.d.ts +12 -4
- package/dist/i18n/locales/sv.js +15 -7
- package/dist/i18n/locales/tr.d.ts +12 -4
- package/dist/i18n/locales/tr.js +15 -7
- package/dist/i18n/locales/zh.d.ts +12 -4
- package/dist/i18n/locales/zh.js +15 -7
- package/dist/index.js +6 -6
- package/dist/locales/ar.json +15 -7
- package/dist/locales/de.json +15 -7
- package/dist/locales/el.json +15 -7
- package/dist/locales/en.json +12 -4
- package/dist/locales/es.json +15 -7
- package/dist/locales/fr.json +15 -7
- package/dist/locales/hi.json +15 -7
- package/dist/locales/it.json +15 -7
- package/dist/locales/ja.json +15 -7
- package/dist/locales/nl.json +15 -7
- package/dist/locales/pl.json +15 -7
- package/dist/locales/pt.json +15 -7
- package/dist/locales/ro.json +15 -7
- package/dist/locales/ru.json +15 -7
- package/dist/locales/sq.json +15 -7
- package/dist/locales/sv.json +15 -7
- package/dist/locales/tr.json +15 -7
- package/dist/locales/zh.json +15 -7
- package/dist/patterns/calendar/calendar-appointment-details.d.ts +10 -1
- package/dist/patterns/calendar/calendar-workspace.d.ts +27 -0
- package/dist/patterns/calendar/calendar-workspace.model.d.ts +5 -6
- package/dist/patterns/calendar/calendar.model.d.ts +57 -8
- package/dist/patterns/calendar/calendar.sheets.d.ts +46 -3
- package/dist/patterns/calendar/calendar.types.d.ts +13 -5
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/calendar-appointment-editor-dialog-DnPADcj9.js +0 -13438
- package/dist/_chunks/use-appointment-details-read-n7kycxrm.js +0 -2439
|
@@ -112,6 +112,15 @@ export interface CalendarAppointmentDetailsPanelProps {
|
|
|
112
112
|
* The host opens its own flow (the To complete one). Absent = withheld;
|
|
113
113
|
* `readOnly` withholds it too. */
|
|
114
114
|
onAssignPatient?: () => void;
|
|
115
|
+
/** Open the patient's record: the host's navigation, given the patient
|
|
116
|
+
* the panel shows. Absent = no "Open patient record" button. Never
|
|
117
|
+
* offered with no patient or under `privacy`. Opening a record is a
|
|
118
|
+
* read, so `readOnly` keeps it. */
|
|
119
|
+
onOpenPatient?: (patient: CalendarPatient) => void;
|
|
120
|
+
/** Sign on the practice's device, beside Request signature and only
|
|
121
|
+
* while a document is still to sign. The host opens its own flow.
|
|
122
|
+
* Absent = withheld. Counted as `request-signature`. */
|
|
123
|
+
onSignOnDevice?: () => void;
|
|
115
124
|
onEdit?: () => void;
|
|
116
125
|
/** Arm a Move placement: the next slot click places the appointment. */
|
|
117
126
|
onMove?: () => void;
|
|
@@ -162,5 +171,5 @@ export interface CalendarAppointmentDetailsPanelProps {
|
|
|
162
171
|
/** The appointment details panel of the calendar (P-C2, P-C3): the published
|
|
163
172
|
* AppointmentDetailsPanel, fed from CalendarData and the calendar's read.
|
|
164
173
|
* It docks in the rail, is no dialog and asks no series scope. */
|
|
165
|
-
export declare function CalendarAppointmentDetailsPanel({ details, patientId, notesSeam, onOpenNotes, readOnly, onAssignPatient, onEdit, onMove, onCopy, onDelete, deleteConfirm, onDeleteInitiated, onDocumentCreateClicked, onDetailsActionUsed, onStatusChange, onDescriptionChange, mapsLink, noteUnrecordedEdits, privacy, privacyTitle, locale, }: CalendarAppointmentDetailsPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
174
|
+
export declare function CalendarAppointmentDetailsPanel({ details, patientId, notesSeam, onOpenNotes, readOnly, onAssignPatient, onOpenPatient, onSignOnDevice, onEdit, onMove, onCopy, onDelete, deleteConfirm, onDeleteInitiated, onDocumentCreateClicked, onDetailsActionUsed, onStatusChange, onDescriptionChange, mapsLink, noteUnrecordedEdits, privacy, privacyTitle, locale, }: CalendarAppointmentDetailsPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
166
175
|
//# sourceMappingURL=calendar-appointment-details.d.ts.map
|
|
@@ -123,6 +123,12 @@ export interface CalendarWorkspaceRecurrence {
|
|
|
123
123
|
/** Start value of "Skip closed days" (on when absent); the user can
|
|
124
124
|
* still flip it. */
|
|
125
125
|
skipClosedDaysDefault?: boolean;
|
|
126
|
+
/** The Custom repeat rule: every N days, weeks, months or years, chosen
|
|
127
|
+
* weekdays, the Nth or last weekday. The host receives it as `interval`
|
|
128
|
+
* and `byDay` on the draft's `recurrence`. `false` when the host cannot
|
|
129
|
+
* save those two fields, so the user is never offered "every 2 weeks" and
|
|
130
|
+
* given every week. Defaults to on. */
|
|
131
|
+
custom?: boolean;
|
|
126
132
|
}
|
|
127
133
|
export interface CalendarWorkspaceAnalytics {
|
|
128
134
|
/** A built-in tool panel opened. Not raised again while it stays open,
|
|
@@ -410,6 +416,18 @@ export interface CalendarWorkspaceProps {
|
|
|
410
416
|
* pure: see `EditorPlatformOptions.medicalDevicesForCares`.
|
|
411
417
|
*/
|
|
412
418
|
medicalDevicesForCares?: EditorPlatformOptions['medicalDevicesForCares'];
|
|
419
|
+
/**
|
|
420
|
+
* Same-day reminder seam (rule B8): see
|
|
421
|
+
* `EditorPlatformOptions.sameDayReminders`. Omit it and neither message
|
|
422
|
+
* appears.
|
|
423
|
+
*/
|
|
424
|
+
sameDayReminders?: EditorPlatformOptions['sameDayReminders'];
|
|
425
|
+
/**
|
|
426
|
+
* The practice's signature credits (rule B10): see
|
|
427
|
+
* `EditorPlatformOptions.signatureCredits`. Omit it and the editor shows
|
|
428
|
+
* neither the no-credits message nor any limit on the sign mode.
|
|
429
|
+
*/
|
|
430
|
+
signatureCredits?: EditorPlatformOptions['signatureCredits'];
|
|
413
431
|
/**
|
|
414
432
|
* Create a patient from an online booking that has none (PRD 01). The
|
|
415
433
|
* editor shows "Create patient" in the booking card while no patient is
|
|
@@ -434,6 +452,15 @@ export interface CalendarWorkspaceProps {
|
|
|
434
452
|
* `createPatientFromBooking` keeps its own button and prefill.
|
|
435
453
|
*/
|
|
436
454
|
createPatient?: CalendarCreatePatient;
|
|
455
|
+
/**
|
|
456
|
+
* Propose the first-visit answer on a NEW appointment (PRD 01, B12). The
|
|
457
|
+
* editor asks once a patient is chosen, and again when the date changes,
|
|
458
|
+
* and sets the answer unless the user has already picked one. Resolve
|
|
459
|
+
* `'unknown'` when the host cannot tell; a rejection is ignored. The
|
|
460
|
+
* answer starts on unknown without this seam. An edit shows the saved
|
|
461
|
+
* `EditorPrefill.firstVisit` and never asks.
|
|
462
|
+
*/
|
|
463
|
+
proposeFirstVisit?: EditorPlatformOptions['proposeFirstVisit'];
|
|
437
464
|
/** Where the cog's settings, the view, the days shown and the
|
|
438
465
|
* chair / operator selections are remembered — the host's per-user
|
|
439
466
|
* store. Defaults to the session-scoped in-memory adapter. */
|
|
@@ -309,10 +309,9 @@ export declare function signChannelStates(ref: PatientRef): {
|
|
|
309
309
|
sms: PatientChannelState;
|
|
310
310
|
email: PatientChannelState;
|
|
311
311
|
};
|
|
312
|
-
/**
|
|
313
|
-
*
|
|
314
|
-
|
|
315
|
-
export declare function defaultSignMode(ref: PatientRef): RequiredDocsSignMode;
|
|
312
|
+
/** Sign mode starts on "not now" (rule B10): staff pick SMS or email on
|
|
313
|
+
* purpose, even when the patient could take either. */
|
|
314
|
+
export declare function defaultSignMode(): RequiredDocsSignMode;
|
|
316
315
|
export { patientAddressLabel, patientAddressLine, patientMapsUrl, } from '../../components/_shared/appointment-format';
|
|
317
316
|
/** A CREATE mode armed by a deep link (`createParameters`) or the
|
|
318
317
|
* Backlog's Schedule: the next empty-slot click opens the editor with
|
|
@@ -337,11 +336,11 @@ export interface PlacementRequest {
|
|
|
337
336
|
}
|
|
338
337
|
/** The platform's "Copia & incolla": the same appointment on a new slot
|
|
339
338
|
* with a fresh id — never a series member, treatments only on request.
|
|
339
|
+
* The clicked slot sets the date and time only: the copy keeps the
|
|
340
|
+
* SOURCE chair and operator, whichever column was clicked (rule C5).
|
|
340
341
|
* An all-day source stays all-day on the target date. */
|
|
341
342
|
export declare function copyRowAt(source: CalendarRow, target: {
|
|
342
343
|
start: Date;
|
|
343
|
-
resourceId?: string;
|
|
344
|
-
axisKind: DisplaySettings['resourceKind'];
|
|
345
344
|
}, id: string, withTreatments: boolean): CalendarRow;
|
|
346
345
|
/** Apply an edit saved with "this and following" / "all" to the other
|
|
347
346
|
* occurrences: each keeps its own day shifted by the same delta as the
|
|
@@ -17,7 +17,7 @@ import { APPOINTMENT_STATUS_BADGE_VARIANT } from '../../components/appointment-d
|
|
|
17
17
|
import type { AppointmentRecurrenceFrequency } from '../../components/appointment-details-panel';
|
|
18
18
|
import type { CalendarData } from './calendar.data';
|
|
19
19
|
import type { StatusColours } from './calendar-status-colours';
|
|
20
|
-
import { type CareDescriptionMode, type ColorAssociation, type CalendarBaseEvent, type CalendarBookingContact, type CalendarCareEntry, type CalendarCareLink, type CalendarClosure, type CalendarDayHours, type CalendarHistoryEntry, type CalendarPatient, type CalendarPhoneNumber, type CalendarSignDocument, type CalendarWaitingEntry, type CatalogueState, type PatientRef } from './calendar.types';
|
|
20
|
+
import { type CareDescriptionMode, type ColorAssociation, type CalendarBaseEvent, type CalendarBookingContact, type CalendarCare, type CalendarCareEntry, type CalendarCareLink, type CalendarClosure, type CalendarDayHours, type CalendarHistoryEntry, type CalendarPatient, type CalendarPhoneNumber, type CalendarSignDocument, type CalendarWaitingEntry, type CatalogueState, type PatientRef } from './calendar.types';
|
|
21
21
|
export declare const STATUS_UI_KEY: Record<CalendarEventStatus, string>;
|
|
22
22
|
export interface CalendarRow {
|
|
23
23
|
event: CalendarEvent;
|
|
@@ -168,10 +168,28 @@ export interface CalendarEditorCapabilities {
|
|
|
168
168
|
}
|
|
169
169
|
/** The editor field an arrival lands focus on. */
|
|
170
170
|
export type EditorInitialFocus = 'patient' | 'operator' | 'chair';
|
|
171
|
+
/** "First visit" is yes, no or unknown (rule B12). */
|
|
172
|
+
export type FirstVisitAnswer = 'yes' | 'no' | 'unknown';
|
|
171
173
|
export interface EditorPrefill {
|
|
172
174
|
/** Set = the editor EDITS this existing event; unset = create. */
|
|
173
175
|
editEventId?: string;
|
|
174
176
|
patientId?: string;
|
|
177
|
+
/** The reminder ticks SAVED with the appointment. An edit keeps them
|
|
178
|
+
* (rule B7): a host that leaves one out reads as off in the boxes, and
|
|
179
|
+
* the save then omits that field unless the user changes it, so the
|
|
180
|
+
* host keeps its stored value (B23). A new appointment
|
|
181
|
+
* and an online booking being completed ignore them and take the
|
|
182
|
+
* practice defaults. */
|
|
183
|
+
emailReminder?: boolean;
|
|
184
|
+
smsReminder?: boolean;
|
|
185
|
+
/** The saved first-visit answer; absent reads as unknown, and the save
|
|
186
|
+
* omits `firstVisit` on an edit until the user answers. */
|
|
187
|
+
firstVisit?: FirstVisitAnswer;
|
|
188
|
+
/** An edit only: the appointment is in the waiting list. The editor
|
|
189
|
+
* offers "Add to waiting list" on an edit when this is passed, ticked
|
|
190
|
+
* when true, and unticking sends `addToWaitingList: false`. Leave it out
|
|
191
|
+
* when the host cannot remove the entry: the tick is then withheld. */
|
|
192
|
+
addToWaitingList?: boolean;
|
|
175
193
|
isTelehealth?: boolean;
|
|
176
194
|
date?: Date;
|
|
177
195
|
time?: {
|
|
@@ -292,14 +310,14 @@ export declare function isPracticeClosedDay(dateIso: string, data: Pick<Calendar
|
|
|
292
310
|
* so the series and the calendar never disagree. Chair-only bookings
|
|
293
311
|
* check the practice alone.
|
|
294
312
|
*/
|
|
295
|
-
export declare function isUnbookableDay(date: Date, operatorId: string | undefined, data: CalendarData): boolean;
|
|
313
|
+
export declare function isUnbookableDay(date: Date, operatorId: string | null | undefined, data: CalendarData): boolean;
|
|
296
314
|
/**
|
|
297
315
|
* Expand a rule into the dates that actually get booked. Skipped
|
|
298
316
|
* candidates do NOT consume the count — asking for 4 appointments
|
|
299
317
|
* yields 4 appointments, with the closed days stepped over rather than
|
|
300
318
|
* silently swallowing an occurrence.
|
|
301
319
|
*/
|
|
302
|
-
export declare function expandRecurrence(start: Date, rule: EditorRecurrence, operatorId: string | undefined, data: CalendarData): {
|
|
320
|
+
export declare function expandRecurrence(start: Date, rule: EditorRecurrence, operatorId: string | null | undefined, data: CalendarData): {
|
|
303
321
|
dates: Date[];
|
|
304
322
|
skipped: number;
|
|
305
323
|
};
|
|
@@ -310,6 +328,10 @@ export declare function expandRecurrence(start: Date, rule: EditorRecurrence, op
|
|
|
310
328
|
export interface CalendarSeries {
|
|
311
329
|
id: string;
|
|
312
330
|
frequency: RecurrenceFrequency;
|
|
331
|
+
/** The Custom rule's step and weekdays, as `EditorRecurrence` carries
|
|
332
|
+
* them. Absent for a plain rule. */
|
|
333
|
+
interval?: number;
|
|
334
|
+
byDay?: readonly RecurrenceByDay[];
|
|
313
335
|
/** 1-based position of this occurrence. */
|
|
314
336
|
index: number;
|
|
315
337
|
total: number;
|
|
@@ -323,7 +345,10 @@ export interface CalendarSeries {
|
|
|
323
345
|
}
|
|
324
346
|
export interface EditorDraft {
|
|
325
347
|
editEventId?: string;
|
|
326
|
-
|
|
348
|
+
/** The save carries the whole appointment (rule B23): an empty field is
|
|
349
|
+
* sent as empty, never left out. `null` = no patient (cleared or never
|
|
350
|
+
* chosen); absent only while the patient is locked and cannot change. */
|
|
351
|
+
patientId?: string | null;
|
|
327
352
|
isTelehealth: boolean;
|
|
328
353
|
date: Date;
|
|
329
354
|
time: {
|
|
@@ -331,17 +356,33 @@ export interface EditorDraft {
|
|
|
331
356
|
minutes: number;
|
|
332
357
|
};
|
|
333
358
|
durationMin: number;
|
|
334
|
-
|
|
335
|
-
|
|
359
|
+
/** `null` = None: clear the operator. */
|
|
360
|
+
operatorId?: string | null;
|
|
361
|
+
/** `null` = None: clear the chair. */
|
|
362
|
+
chairId?: string | null;
|
|
336
363
|
colorHex: string;
|
|
364
|
+
/** The description. Always sent when the editor offers it: an emptied one is `''` (rule B23), never left out. */
|
|
337
365
|
care?: string;
|
|
338
366
|
cares?: CalendarCareEntry[];
|
|
339
367
|
careLink?: CalendarCareLink;
|
|
340
368
|
/** The waiting-list entry this save settles (removed from the queue). */
|
|
341
369
|
waitingEntryId?: string;
|
|
370
|
+
/** Always sent: `false` turns all day off. */
|
|
342
371
|
allDay?: boolean;
|
|
343
|
-
/**
|
|
372
|
+
/** The waiting-list tick, on create and on edit. `false` on an edit of
|
|
373
|
+
* an appointment in the list removes its entry. Absent when the editor
|
|
374
|
+
* does not offer the tick. */
|
|
344
375
|
addToWaitingList?: boolean;
|
|
376
|
+
/** The two reminder ticks. Always sent on a create; on an edit sent when
|
|
377
|
+
* the host passed the saved tick in the prefill or the user changed it,
|
|
378
|
+
* otherwise omitted and the stored value stands. `false` also when no
|
|
379
|
+
* patient is chosen or the patient cannot take the channel. */
|
|
380
|
+
emailReminder?: boolean;
|
|
381
|
+
smsReminder?: boolean;
|
|
382
|
+
/** Sent once the editor shows the question (on an edit only when the
|
|
383
|
+
* prefill carried it or the user answered); `unknown` until the user or
|
|
384
|
+
* `proposeFirstVisit` answers. */
|
|
385
|
+
firstVisit?: FirstVisitAnswer;
|
|
345
386
|
/** Edit mode only — the platform changes status from the popover, but
|
|
346
387
|
the rail's details-as-form surface owns it here. */
|
|
347
388
|
status?: CalendarEventStatus;
|
|
@@ -426,9 +467,15 @@ export declare function scheduleByEntryId(rows: ReadonlyArray<{
|
|
|
426
467
|
eventId: string;
|
|
427
468
|
startIso: string;
|
|
428
469
|
}>>;
|
|
470
|
+
/** B22: a care's length for the phases chosen. With the host's
|
|
471
|
+
* `phaseShares` and a phase pick, it is the sum of the picked phases'
|
|
472
|
+
* shares (percent) of `base`; with no shares, no pick, or shares that
|
|
473
|
+
* name none of the picked phases, it is `base` whole. */
|
|
474
|
+
export declare function careLengthForPhases(care: Pick<CalendarCare, 'phaseShares'>, base: number, picked?: readonly string[]): number;
|
|
429
475
|
/** What a link implies for the form (platform `_getAppointmentDuration`,
|
|
430
476
|
* `_getColorIdFromCarePlanEntry` / `_getColorIdFromPriceList`): the
|
|
431
|
-
* summed duration
|
|
477
|
+
* summed duration (each line's phases counted by share, B22), the FIRST
|
|
478
|
+
* line's care colour in plan order, a label. */
|
|
432
479
|
export declare function deriveCareLinkDefaults(link: CalendarCareLink | undefined, data: CalendarData): {
|
|
433
480
|
durationMin?: number;
|
|
434
481
|
colorHex?: string;
|
|
@@ -626,6 +673,8 @@ export declare const SLOT_STEP_MIN = 30;
|
|
|
626
673
|
export declare const FREE_SLOT_MAX_RANGE_DAYS = 185;
|
|
627
674
|
/** The From→To span the finder opens on — the platform's own default. */
|
|
628
675
|
export declare const FREE_SLOT_DEFAULT_HORIZON_DAYS = 30;
|
|
676
|
+
/** The finder's length with no care chosen (the old finder's DEFAULT_DURATION). */
|
|
677
|
+
export declare const FREE_SLOT_DEFAULT_DURATION_MIN = 30;
|
|
629
678
|
/** Whole days between two dates — the finder's range rule. */
|
|
630
679
|
export declare function rangeDays(from: Date, to: Date): number;
|
|
631
680
|
export interface CalendarFreeSlot {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
import { type ReactNode } from 'react';
|
|
25
25
|
import { AppointmentHistoryTimeline } from '../../components/appointment-details-panel/appointment-details-panel.history';
|
|
26
26
|
import { IndicatorChips } from '../../components/appointment-details-panel/appointment-details-panel.identity';
|
|
27
|
-
import type { CalendarEditorCapabilities } from './calendar.model';
|
|
27
|
+
import type { CalendarEditorCapabilities, FirstVisitAnswer } from './calendar.model';
|
|
28
28
|
import type { CalendarEditorSeries } from './calendar-editor-hydration';
|
|
29
29
|
import { type CalendarResource } from '../../components/calendar';
|
|
30
30
|
import { type NotesPanelNote, type NotesPanelProps, type NotesPanelSubmission, type AiConsentGate } from '../../components/notes-panel';
|
|
@@ -189,6 +189,11 @@ export declare function DurationCombobox({ value, onChange, }: {
|
|
|
189
189
|
export type ReminderChannel = 'whatsapp' | 'sms' | 'email';
|
|
190
190
|
/** The Final State's full set — the default when a host says nothing. */
|
|
191
191
|
export declare const REMINDER_CHANNELS: readonly ReminderChannel[];
|
|
192
|
+
/** The earliest same-day reminder per channel (B8). */
|
|
193
|
+
export interface SameDayReminders {
|
|
194
|
+
sms?: Date | string;
|
|
195
|
+
email?: Date | string;
|
|
196
|
+
}
|
|
192
197
|
/** The platform facts the Increment 1 editor adds — every field optional,
|
|
193
198
|
* so a host that passes nothing gets the Final State form unchanged. */
|
|
194
199
|
export interface EditorPlatformOptions {
|
|
@@ -294,12 +299,50 @@ export interface EditorPlatformOptions {
|
|
|
294
299
|
* "(disabled)" suffix on the label (audit C10). */
|
|
295
300
|
reminderCapability?: boolean;
|
|
296
301
|
/** The practice's default reminder channels (Practice settings, patient
|
|
297
|
-
* notices).
|
|
298
|
-
*
|
|
302
|
+
* notices). A new appointment and an online booking being completed
|
|
303
|
+
* start the reminder boxes from them; a channel the host does not pass
|
|
304
|
+
* starts OFF (the move confirm reads it the same way). An edit keeps
|
|
305
|
+
* the ticks saved with the appointment (`EditorPrefill.emailReminder`
|
|
306
|
+
* and `smsReminder`; one left out is not sent on a save the user did
|
|
307
|
+
* not change it in, so the host keeps its stored value). A patient who
|
|
308
|
+
* cannot take a channel still disables it. */
|
|
299
309
|
defaultReminders?: {
|
|
300
310
|
sms?: boolean;
|
|
301
311
|
email?: boolean;
|
|
302
312
|
};
|
|
313
|
+
/** B12: propose the first-visit answer on a NEW appointment once a
|
|
314
|
+
* patient is chosen, and again when the date changes, from the patient's
|
|
315
|
+
* history. Resolve `unknown` when the host cannot tell. A proposal never
|
|
316
|
+
* overrides an answer the user already picked, and a failure or a late
|
|
317
|
+
* answer for an earlier patient is ignored. Omit it and the answer
|
|
318
|
+
* starts, and stays, on unknown until the user answers. */
|
|
319
|
+
proposeFirstVisit?: (query: {
|
|
320
|
+
patientId: string;
|
|
321
|
+
date: Date;
|
|
322
|
+
}) => FirstVisitAnswer | Promise<FirstVisitAnswer>;
|
|
323
|
+
/** B8: when the chosen patient already has an appointment that day with
|
|
324
|
+
* a reminder, answer the time of the EARLIEST one per channel (a
|
|
325
|
+
* `Date` or an ISO string), or leave a channel out. Asked when the
|
|
326
|
+
* patient or the day changes, for a channel only if its practice
|
|
327
|
+
* default is on (`defaultReminders`). The editor then compares the
|
|
328
|
+
* form's own time: a LATER visit has that channel's tick removed with a
|
|
329
|
+
* message, an EARLIER one keeps it with a message. On an edit, leave
|
|
330
|
+
* the edited appointment (`eventId`) out of the answer. A failure
|
|
331
|
+
* shows nothing. Omit it and neither message appears. */
|
|
332
|
+
sameDayReminders?: (query: {
|
|
333
|
+
patientId: string;
|
|
334
|
+
date: Date;
|
|
335
|
+
eventId?: string;
|
|
336
|
+
}) => SameDayReminders | Promise<SameDayReminders>;
|
|
337
|
+
/** B10: the practice's signature credits. With none left, a NEW
|
|
338
|
+
* appointment whose patient has unsigned required documents says so and
|
|
339
|
+
* links to `buyHref` (opens in a new tab), and the sign-mode choice is withheld, since sending a
|
|
340
|
+
* request uses a credit. Omit it and the editor shows neither the
|
|
341
|
+
* message nor any limit on the sign mode. */
|
|
342
|
+
signatureCredits?: {
|
|
343
|
+
available: number;
|
|
344
|
+
buyHref: string;
|
|
345
|
+
};
|
|
303
346
|
/** Show "First visit" only once a patient is chosen (audit C11). */
|
|
304
347
|
firstVisitRequiresPatient?: boolean;
|
|
305
348
|
/** Give each price-list row its catalogue phases, and lock a row the
|
|
@@ -110,22 +110,25 @@ export interface PracticeCalendarSettings {
|
|
|
110
110
|
*
|
|
111
111
|
* `moved` is the platform's ONE "appointment moved" switch (it replaces the
|
|
112
112
|
* old per-channel pair). The move confirm's SMS and email ticks then follow
|
|
113
|
-
* `reminderSms` and `reminderEmail`.
|
|
114
|
-
*
|
|
113
|
+
* `reminderSms` and `reminderEmail`. `confirmationSms` is the SMS the
|
|
114
|
+
* platform sends when an appointment is created; the kit only edits the
|
|
115
|
+
* switch and sends nothing.
|
|
115
116
|
*/
|
|
116
117
|
export interface PracticePatientNotices {
|
|
117
118
|
reminderSms?: boolean;
|
|
118
119
|
reminderEmail?: boolean;
|
|
120
|
+
confirmationSms?: boolean;
|
|
119
121
|
moved?: boolean;
|
|
120
122
|
}
|
|
121
123
|
/**
|
|
122
|
-
* Operator notices
|
|
123
|
-
*
|
|
124
|
-
*
|
|
124
|
+
* Operator notices. `onCancel` and `onChange` are sent when a PATIENT
|
|
125
|
+
* cancels or changes; `onUserChange` is the one notice sent when a USER of
|
|
126
|
+
* the practice creates, changes or cancels. A key left out gets no switch.
|
|
125
127
|
*/
|
|
126
128
|
export interface PracticeOperatorNotices {
|
|
127
129
|
onCancel?: boolean;
|
|
128
130
|
onChange?: boolean;
|
|
131
|
+
onUserChange?: boolean;
|
|
129
132
|
}
|
|
130
133
|
/** The WhatsApp default message and what the host allows in it. */
|
|
131
134
|
export interface PracticeWhatsappMessage {
|
|
@@ -280,6 +283,11 @@ export interface CalendarCare {
|
|
|
280
283
|
/** Catalogue phases (platform `care.carePhases`) — a price-list row
|
|
281
284
|
* books a subset of them, exactly as a plan line does. */
|
|
282
285
|
phases?: string[];
|
|
286
|
+
/** Each phase's share of `durationMin`, in percent, keyed by the phase
|
|
287
|
+
* label (platform `phase.durationPercentage`). With it, an appointment
|
|
288
|
+
* that books some phases takes the sum of their shares as its length
|
|
289
|
+
* (B22); without it, the whole care length. */
|
|
290
|
+
phaseShares?: Record<string, number>;
|
|
283
291
|
}
|
|
284
292
|
/**
|
|
285
293
|
* The card's care line (platform `getAppointmentNameSuffixAndPopoverName`):
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as s, C as r, a as t, b as S, c as E, d as n, e as o, f as i, D as A, g as C, S as d, V as P, W as D, h as l, i as _, m as O, r as c, u as p, j as L, k as R } from "../../_chunks/calendar-appointment-editor-dialog-
|
|
1
|
+
import { A as s, C as r, a as t, b as S, c as E, d as n, e as o, f as i, D as A, g as C, S as d, V as P, W as D, h as l, i as _, m as O, r as c, u as p, j as L, k as R } from "../../_chunks/calendar-appointment-editor-dialog-CXch4Pmu.js";
|
|
2
2
|
export {
|
|
3
3
|
s as AppointmentEditorDialog,
|
|
4
4
|
r as CALENDAR_PREFERENCE_KEYS,
|